/* Pip-boy-ish ASCII debrief row layout */
.debrief-row-label {
  flex: 0 0 auto;
  opacity: 0.75;
  color: currentColor;
  font-family: var(--theme-font-data, var(--font-legible, 'Courier New', monospace));
  font-weight: 750;
  min-width: 1.2em;
  text-align: center;
}

/* Portrait mobile: hide macro labels for resources + ammo, keep PASSIVES/STATUS */
@media (max-width: 767px) and (orientation: portrait) {
  .debrief-nav-row.row-resources .debrief-row-label,
  .debrief-nav-row.row-ammo .debrief-row-label {
    min-width: 1em;
  }
}

.debrief-row-panel {
  /* Aesthetic mono for panels, but keep it thicker if Classic Console Neue is available */
  font-family: var(--theme-font-data, var(--font-legible, 'Courier New', monospace));
  white-space: pre;
  padding: 1px 2px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  opacity: 0.9;
  /* letter-spacing managed dynamically by _applyAdaptiveSpacing() */
  font-weight: 650;
  line-height: 1.1;
}

/* Per-row color grammar — RESOURCE_COLOR driven */
.debrief-nav-row.row-resources { color: #FF6B9D; }
.debrief-nav-row.row-ammo { color: #DA70D6; }
/* SIGNAL row is battery grammar */
.debrief-nav-row.row-signal { color: #00FFA6; }

/* Signal pulse: color/glow pulse without changing row width */
@keyframes signalPulse {
  0% { filter: brightness(1); text-shadow: 0 0 6px color-mix(in srgb, currentColor 45%, transparent); }
  40% { filter: brightness(1.35); text-shadow: 0 0 10px color-mix(in srgb, currentColor 70%, transparent); }
  100% { filter: brightness(1); text-shadow: 0 0 6px color-mix(in srgb, currentColor 45%, transparent); }
}

.debrief-nav-row.row-signal.signal-pulse {
  animation: signalPulse 320ms ease-out;
}
.debrief-nav-row.row-passives { color: rgba(191, 255, 227, 0.92); }
.debrief-nav-row.row-status { color: rgba(255, 160, 100, 0.92); }
.debrief-nav-row.row-mok { color: rgba(191, 255, 227, 0.90); }
.debrief-nav-row.row-api { color: rgba(191, 255, 227, 0.82); }
.debrief-nav-row.row-accessibility { color: rgba(100, 200, 255, 0.90); }

/* Accessibility panel: link + toggle buttons styled as terminal text */
.debrief-acc-link {
  color: currentColor;
  text-decoration: underline;
  cursor: pointer;
}
.debrief-acc-btn {
  background: transparent;
  border: none;
  color: currentColor;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  cursor: pointer;
  opacity: 0.9;
}
.debrief-acc-btn:hover { opacity: 1; filter: brightness(1.3); }

/* colored sublines inside resources — each row full width in RESOURCE_COLOR */
.debrief-row-panel .debrief-line { padding: 0; margin: 0; width: 100%; box-sizing: border-box; }
.debrief-row-panel .debrief-line.hp { color: #FF6B9D; }
.debrief-row-panel .debrief-line.energy { color: #00D4FF; }
.debrief-row-panel .debrief-line.focus { color: #FFF9B0; }
.debrief-row-panel .debrief-line.ammo { color: #DA70D6; }
.debrief-row-panel .debrief-line.key-ammo { color: #FF8A3D; }

.debrief-row-summary {
  flex: 1 1 auto;
  text-align: left; /* was right — adaptive letter-spacing distributes chars across full width */
  opacity: 1;
  color: currentColor;
  text-shadow: 0 0 6px color-mix(in srgb, currentColor 45%, transparent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--theme-font-data, var(--font-legible, 'Courier New', monospace));
  font-weight: 750;
}

.debrief-feed-content.summary .resource-bar {
  margin: 0;
}

/* Make the summary HP line more compact */
.debrief-feed-content.summary .resource-name,
.debrief-feed-content.summary .resource-value {
  font-size: 0.9em;
}

/* Rogue expanded resources: no emojis, tighter rows, pipboy alignment */
body.gone-rogue-active .debrief-feed-content .resource-icon { display: none !important; }
body.gone-rogue-active .debrief-feed-content .resource-name { opacity: 0.92; }
body.gone-rogue-active .debrief-feed-content .resource-row { padding: 1px 0; }
body.gone-rogue-active .debrief-feed-content .resource-value { opacity: 0.75; }


/* Resource pulse (monochrome glow bump) */
@keyframes debriefPulsePos {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.35); }
  100% { filter: brightness(1); }
}
@keyframes debriefPulseNeg {
  0% { filter: brightness(1); }
  40% { filter: brightness(0.85); }
  100% { filter: brightness(1); }
}

#debrief-screen.debrief-pulse-pos { animation: debriefPulsePos 260ms ease-out; }
#debrief-screen.debrief-pulse-neg { animation: debriefPulseNeg 260ms ease-out; }

/* Make RESOURCES/HP summary feel critical */
#debrief-summary-hp { opacity: 0.92; }

/* Signal row does not need a label if it visually reads as battery signal */
/* SIGNAL row: no label; summary left-aligned */
.debrief-nav-row[data-row="signal"] .debrief-row-label { display: none; }
.debrief-nav-row[data-row="signal"] .debrief-row-summary { text-align: left; }

/* Device battery depleted: signal row goes grey, pulse stops, non-interactive */
.debrief-nav-row.row-signal.signal-depleted {
  filter: grayscale(1) brightness(0.5);
  animation: none !important;
  pointer-events: none;
}

/* ── Battery signal brackets ((( ))) pulse in resource row ── */
@keyframes batterySignalPulse {
  0%   { color: #00FFA6; opacity: 0.6; }
  33%  { color: #00D4FF; opacity: 0.9; }
  66%  { color: #00FFD0; opacity: 0.75; }
  100% { color: #00FFA6; opacity: 0.6; }
}
.battery-signal-live {
  animation: batterySignalPulse 2.4s ease-in-out infinite;
}
.battery-signal-dead {
  color: #666 !important;
  opacity: 0.5;
  animation: none !important;
}
/* Battery row depleted: entire row goes grey and non-interactive */
.debrief-line.battery.resource-row[data-resource="Battery"].depleted {
  color: #666 !important;
  filter: grayscale(1);
  pointer-events: none;
}

/* ── Monochrome symbol idle animation (gentle pulse) ── */
@keyframes symbolIdlePulse {
  0%, 100% { opacity: 0.85; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.2); }
}

/* Resource row panels: full-width lines with per-resource color animation */
.debrief-row-panel .debrief-line.resource-row {
  width: 100%;
  position: relative;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  animation: symbolIdlePulse 2.4s ease-in-out infinite;
}

/* Gaining/losing flash per resource panel line */
.debrief-row-panel .debrief-line.resource-row.gaining {
  animation: resource-gain-pulse 0.6s ease-out;
}
.debrief-row-panel .debrief-line.resource-row.losing {
  animation: resource-loss-flash 0.4s ease-out;
}
