/* ================================================================
   hold-timer.css — 10-minute slot-hold countdown pill + expiry overlay
   All colour/font values use tokens from tokens.css
   ================================================================ */

/* ── Countdown pill ─────────────────────────────────────────────── */
#hold-timer {
  position: fixed;
  top: 72px;              /* below the 60px sticky nav */
  right: 20px;
  z-index: 90;            /* above content, below .loading-overlay (200) */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s;
}

.hold-timer-label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.hold-timer-digits {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

/* Warn state — under 3 minutes */
#hold-timer[data-state="warn"] {
  border-color: rgba(244,208,111,0.35);
}

#hold-timer[data-state="warn"] .hold-timer-digits {
  color: var(--jasmine);
}

/* Crit state — under 1 minute */
#hold-timer[data-state="crit"] {
  border-color: rgba(254,95,85,0.45);
}

#hold-timer[data-state="crit"] .hold-timer-label {
  color: rgba(254,95,85,0.8);
}

#hold-timer[data-state="crit"] .hold-timer-digits {
  color: var(--bittersweet);
}

/* Subtle pulse on crit only — respects reduced-motion preference */
@media (prefers-reduced-motion: no-preference) {
  @keyframes holdPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(254,95,85,0); }
    50%      { box-shadow: 0 0 0 5px rgba(254,95,85,0.16); }
  }

  #hold-timer[data-state="crit"] {
    animation: holdPulse 1.2s ease-in-out infinite;
  }
}

/* Visually-hidden announcer (threshold crossings only) */
.hold-timer-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Hold-expired interstitial overlay ──────────────────────────── */
.hold-expired-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6,9,32,0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 220;           /* above .loading-overlay (200) and the pill */
}

.hold-expired-card {
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  max-width: 400px;
  text-align: center;
}

.hold-expired-heading {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0 0 10px;
}

.hold-expired-body {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 22px;
}

/* ── Mobile: slim full-width bottom strip ───────────────────────── */
@media (max-width: 767px) {
  #hold-timer {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    height: 40px;
    padding: 0 16px;
    justify-content: center;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    background: rgba(6, 9, 32, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* The price bar is sticky bottom on mobile — lift its stick point above
     the 40px timer strip so the two never overlap */
  body.has-hold-timer .price-bar {
    bottom: 40px;
  }

  /* Keep the last page content clear of the fixed strip */
  body.has-hold-timer #booking-app {
    padding-bottom: 120px;
  }
}
