/* decision-detail.css -- OCA Team Dashboard v2 (Agent JJ)
   Decision detail side panel: slides in from the right.
   Uses design tokens from tokens.css.
*/

/* Semi-transparent backdrop */
.dd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.28);
  animation: dd-fade-in 0.18s ease forwards;
}

@keyframes dd-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Panel (off-screen by default, slides in when .dd-panel--visible) */
.dd-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 96vw;
  z-index: 301;
  background: var(--surface-0);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(40, 48, 68, .14);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: Manrope, sans-serif;
}

.dd-panel--visible {
  transform: translateX(0);
}

/* Header */
.dd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.dd-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Francois One', sans-serif;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}

.dd-header-text {
  flex: 1;
  min-width: 0;
}

.dd-persona-name {
  font-family: 'Francois One', sans-serif;
  font-size: 13px;
  color: var(--ink-1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dd-decision-label {
  font-size: 11px;
  color: var(--coral);
  font-weight: 600;
  margin-top: 2px;
}

.dd-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  flex-shrink: 0;
  transition: background 0.12s;
}

.dd-close-btn:hover {
  background: var(--hover-strong);
}

/* Scrollable body */
.dd-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dd-title {
  font-family: 'Francois One', sans-serif;
  font-size: 18px;
  color: var(--ink-1);
  margin: 0;
  line-height: 1.3;
  font-weight: 400;
}

.dd-question {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-1);
  line-height: 1.5;
  padding: 12px 14px;
  background: var(--surface-1);
  border-radius: 8px;
  border-left: 3px solid var(--teal);
}

.dd-body-text {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
  white-space: pre-wrap;
}

.dd-options-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dd-options-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dd-option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.dd-option-row:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.dd-option-row--selected {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.dd-option-radio {
  accent-color: var(--teal);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.dd-option-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-1);
  line-height: 1.4;
}

.dd-no-options {
  font-size: 13px;
  color: var(--ink-2);
  font-style: italic;
}

/* Footer */
.dd-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.dd-submit-btn {
  height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  border: none;
  background: var(--coral);
  color: #fff;
  font-family: Manrope, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.12s;
}

.dd-submit-btn:hover:not(:disabled) {
  opacity: 0.88;
}

.dd-submit-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.dd-cancel-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink-2);
  font-family: Manrope, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
}

.dd-cancel-btn:hover {
  background: var(--hover-strong);
}

.dd-status-msg {
  font-size: 12px;
  font-family: Manrope, sans-serif;
  flex: 1;
  min-width: 0;
}

.dd-status-msg--error {
  color: var(--red);
}

.dd-status-msg--success {
  color: var(--teal);
  font-weight: 600;
}

/* Dark mode adjustments */
html[data-theme="dark"] .dd-backdrop {
  background: rgba(0, 0, 0, 0.50);
}

html[data-theme="dark"] .dd-panel {
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.50);
}
