/* src/ui-death-overlay.css
 * UI-FEEDBACK-20 (#2802) — Death-state overlay modal.
 * Template 5 (ui-system-v2-modal-templates.md): centered ~720×360 band over
 * the visible world. World canvas continues rendering above and below.
 * Full-viewport backdrop at 0.7 alpha — world is visible but dimmed.
 * z-index: 9999 — highest in the app per Template 5 z-order spec.
 */

/* ── Backdrop (full-viewport dim, world still renders behind) ────────── */

#ui-death-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.70);
  pointer-events: auto;
}

#ui-death-overlay.is-open {
  display: flex;
}

/* ── Band container (~720×auto, max 360px height) ────────────────────── */

.death-overlay__band {
  width: 720px;
  max-width: calc(100vw - 48px);
  background: rgba(10, 10, 20, 0.96);
  border: 1px solid rgba(255, 60, 60, 0.30);
  border-radius: 10px;
  padding: 28px 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 0 48px rgba(200, 30, 30, 0.18);
}

/* ── Headline ────────────────────────────────────────────────────────── */

.death-overlay__headline {
  font-size: 28px;
  font-weight: 800;
  color: #f87171;
  letter-spacing: 0.08em;
  line-height: 1.1;
  margin: 0;
  text-transform: uppercase;
}

/* DEATH-DUR-UI (sprint 6.5): cause sub-line under YOU FELL + banked-safe note. */
.death-overlay__cause {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #cbd5e1;
  opacity: 0.85;
  margin: 2px 0 4px;
}
.death-overlay__safe-note {
  font-size: 12px;
  color: #86efac;
  margin: 6px 0 2px;
}

/* ── Section rows ────────────────────────────────────────────────────── */

.death-overlay__section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.death-overlay__section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(200, 210, 220, 0.50);
}

.death-overlay__section-value {
  font-size: 14px;
  color: #c4ccd8;
  line-height: 1.5;
}

/* ── Per-slot durability damage list ─────────────────────────────────── */
/* Durability model: equipped gear is DAMAGED (current ↓), never destroyed.
   Each row leads with a condition ICON + WORD (.death-overlay__slot-cond) so
   severity never depends on colour alone (WCAG 2.2 §1.4.1). Row text is
   neutral; colour is a redundant fourth channel keyed by condition. */

.death-overlay__slot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.death-overlay__slot-item {
  font-size: 13px;
  color: #c4ccd8;            /* neutral — severity carried by the condition tag */
  padding-left: 12px;
  position: relative;
}

.death-overlay__slot-item::before {
  content: '–';
  position: absolute;
  left: 0;
  color: rgba(200, 210, 220, 0.45);
}

/* Condition tag — the non-colour signal (icon + word). Fixed-width so the
   labels align into a column the eye can scan. */
.death-overlay__slot-cond {
  display: inline-block;
  min-width: 96px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.death-overlay__slot-cond--healthy  { color: #86efac; }
.death-overlay__slot-cond--damaged  { color: #fde047; }
.death-overlay__slot-cond--critical { color: #fb923c; }
.death-overlay__slot-cond--low      { color: #f87171; }
.death-overlay__slot-cond--broken   { color: #ef4444; }

/* BROKEN tag (in the summary line and on a broken row). */
.death-overlay__broken {
  color: #ef4444;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ── Retrieval countdown ─────────────────────────────────────────────── */

.death-overlay__countdown {
  font-size: 13px;
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
}

.death-overlay__countdown--expired {
  color: rgba(200, 210, 220, 0.45);
}

/* ── XP delta ────────────────────────────────────────────────────────── */

.death-overlay__xp-delta {
  font-size: 13px;
  color: #fb923c;
}

/* ── CTA row ─────────────────────────────────────────────────────────── */

.death-overlay__cta-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 4px;
}

.death-overlay__btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1;
  letter-spacing: 0.01em;
  transition: opacity 0.1s;
}

.death-overlay__btn:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

/* Respawn — the PRIMARY (and only) forward action on the death screen. A filled,
   high-contrast "get back in" green so it reads as the obvious CTA against the dark
   red-tinted panel (the layout-only .death-overlay__btn had no colour → invisible). */
.death-overlay__btn--respawn {
  background: rgba(74, 222, 128, 0.20);
  border-color: rgba(74, 222, 128, 0.60);
  color: #bbf7d0;
  font-weight: 700;
}
.death-overlay__btn--respawn:hover {
  background: rgba(74, 222, 128, 0.32);
}

.death-overlay__btn--ren {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
}

.death-overlay__btn--ren:hover {
  background: rgba(56, 189, 248, 0.25);
}

.death-overlay__btn--skip {
  background: rgba(100, 116, 139, 0.18);
  border-color: rgba(100, 116, 139, 0.35);
  color: #94a3b8;
}

.death-overlay__btn--skip:hover {
  background: rgba(100, 116, 139, 0.30);
}

/* Hide Ren CTA when retrieval window is expired */
.death-overlay__btn--ren.is-hidden {
  display: none;
}
