/**
 * BEAUMONT MANOR — CHRISTMAS EVE COLD CASE (1898)
 * Forensic Timeline Styles
 * Interactive Scrubber (21:30 - 23:00) with 10:05 Blackout & Death Window Markers
 */

/* ==========================================================================
   1. TIMELINE SCRUBBER HUD & CONTROL PANEL
   ========================================================================== */
.timeline-scrubber-hud {
  background: var(--bg-surface);
  border: 1px solid var(--border-brass);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg), var(--shadow-brass);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 120px;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.scrubber-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.scrubber-clock-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.clock-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--brass);
  color: var(--brass-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 12px var(--brass-glow);
}

.clock-time-val {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 800;
  color: var(--brass-light);
  letter-spacing: 0.04em;
}

.clock-period-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.scrubber-nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-scrub-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-scrub-step:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--brass);
  color: var(--brass-light);
}

/* ==========================================================================
   2. SLIDER TRACK & FORENSIC HIGHLIGHT ZONES
   ========================================================================== */
.scrubber-track-container {
  position: relative;
  width: 100%;
  padding: 0.75rem 0 1.5rem 0;
}

/* Range input scrubber */
.timeline-slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  background: #09101c;
  border-radius: 5px;
  outline: none;
  border: 1px solid var(--border-subtle);
  position: relative;
  z-index: 5;
  cursor: pointer;
}

.timeline-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #ffd700 35%, #c59b27 70%, #5c3a00 100%);
  border: 2px solid #ffffff;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.8), 0 3px 8px rgba(0, 0, 0, 0.8);
  cursor: grab;
  transition: transform var(--transition-fast);
}

.timeline-slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.timeline-slider-input::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.25);
}

/* Scrubber Zone Banner Markers under the slider */
.timeline-zones-bar {
  position: relative;
  width: 100%;
  height: 26px;
  margin-top: 0.5rem;
}

/* 10:00 - 10:25 PM Death Window Highlight Zone */
.zone-death-window {
  position: absolute;
  /* Range: 21:30 (0%) to 23:00 (100%) = 90 mins total */
  /* 22:00 is 30 mins in = 33.33% */
  /* 22:25 is 55 mins in = 61.11% */
  left: 33.33%;
  width: 27.78%;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(239, 68, 68, 0.25),
    rgba(239, 68, 68, 0.25) 6px,
    rgba(185, 28, 28, 0.45) 6px,
    rgba(185, 28, 28, 0.45) 12px
  );
  border: 1.5px solid var(--crimson-bright);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: #fca5a5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 0 12px var(--crimson-glow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.25rem;
}

/* 10:05 PM Blackout Marker Flag */
.marker-blackout-flag {
  position: absolute;
  /* 22:05 is 35 mins in = 38.88% */
  left: 38.88%;
  top: -30px;
  transform: translateX(-50%);
  background: #020408;
  border: 1.5px solid var(--brass-light);
  border-radius: var(--radius-xs);
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--brass-light);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 0 14px var(--brass-glow);
  z-index: 6;
  animation: pulseBeacon 2.5s infinite ease-in-out;
}

.marker-blackout-flag::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--brass-light);
}

/* ==========================================================================
   3. MILESTONE CARDS RAIL
   ========================================================================== */
.timeline-rail-stream,
.timeline-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-left: 2rem;
}

/* Vertical guide line */
.timeline-rail-stream::before,
.timeline-line {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 20px;
  left: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--brass) 0%, var(--border-subtle) 100%);
  z-index: 1;
}

.timeline-milestone-node,
.timeline-node {
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 2;
  transition: transform var(--transition-fast);
}

.timeline-milestone-node:hover,
.timeline-node:hover {
  transform: translateX(4px);
}

.timeline-pin {
  position: absolute;
  left: -2rem;
  top: 1.25rem;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--brass);
  color: var(--brass-light);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px var(--brass-glow);
  z-index: 3;
}

.timeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timeline-node-blackout .timeline-card {
  border: 2px solid var(--brass-light);
  box-shadow: 0 0 20px var(--brass-glow);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.timeline-time {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brass-light);
}

.timeline-room-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ice-cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.timeline-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.timeline-desc {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-main);
}

.timeline-witnesses {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding-top: 0.35rem;
}

/* Milestone Pin Anchor */
.milestone-pin-anchor {
  position: absolute;
  left: -2rem;
  top: 1.25rem;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--brass);
  color: var(--brass-light);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px var(--brass-glow);
  z-index: 3;
}

.timeline-milestone-node.is-blackout .milestone-pin-anchor {
  border-color: var(--brass-light);
  background: #020408;
  color: #fbbf24;
  box-shadow: 0 0 16px var(--brass-glow);
}

.timeline-milestone-node.is-death-window .milestone-pin-anchor {
  border-color: var(--crimson-bright);
  color: #fca5a5;
  box-shadow: 0 0 16px var(--crimson-glow);
}

/* Milestone Card Body */
.milestone-card-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.timeline-milestone-node:hover .milestone-card-frame,
.timeline-milestone-node.active .milestone-card-frame {
  border-color: var(--border-brass);
  box-shadow: var(--shadow-lg), var(--shadow-brass);
}

.milestone-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.milestone-time-badge {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brass-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.milestone-location-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ice-cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.milestone-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.milestone-narrative {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-main);
}

/* Witnesses Chips Cluster */
.milestone-witnesses-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding-top: 0.35rem;
}

.witness-chip {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

/* Forensic Callout Alert inside milestone */
.milestone-forensic-callout {
  background: rgba(139, 0, 0, 0.12);
  border-left: 3px solid var(--crimson-bright);
  padding: 0.65rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: #fecaca;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

/* ==========================================================================
   3B. DETECTIVE BRIEFING & LIVE SUSPECT WHEREABOUTS TRACKER
   ========================================================================== */
.timeline-briefing-card {
  background: linear-gradient(135deg, rgba(16, 25, 42, 0.95) 0%, rgba(10, 16, 28, 0.98) 100%);
  border: 1px solid var(--border-brass);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--brass);
}

.briefing-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.briefing-icon {
  font-size: 1.1rem;
}

.briefing-title {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--brass-light);
  text-transform: uppercase;
}

.briefing-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
}

.briefing-text strong {
  color: #fff;
}

/* Live Tracker Panel inside Scrubber HUD */
.timeline-live-tracker-panel {
  background: #050b14;
  border: 1px solid rgba(197, 155, 39, 0.35);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-top: 0.5rem;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.tracker-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.45rem;
}

.tracker-header-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brass-light);
  text-transform: uppercase;
}

.tracker-window-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all var(--transition-fast);
}

.tracker-window-badge.in-death-window {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid var(--crimson-bright);
  color: #fca5a5;
  box-shadow: 0 0 10px var(--crimson-glow);
  animation: pulseDeathBadge 1.5s infinite alternate;
}

.tracker-window-badge.in-blackout {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

@keyframes pulseDeathBadge {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.tracker-suspects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.5rem;
}

.tracker-suspect-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.tracker-suspect-chip:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: var(--border-brass);
}

.tracker-chip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--border-subtle);
}

.tracker-chip-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.tracker-chip-name {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tracker-chip-status {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-chip-exonerated {
  color: #6ee7b7;
}

.status-chip-unverified {
  color: #fca5a5;
  font-weight: 700;
}

.status-chip-theft {
  color: #fde047;
}

.status-chip-asleep {
  color: #93c5fd;
}

/* ==========================================================================
   4. RESPONSIVE DESIGN ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
  .timeline-scrubber-hud {
    top: 60px;
    padding: 1rem;
  }

  .zone-death-window {
    font-size: 0.55rem;
  }

  .marker-blackout-flag {
    font-size: 0.58rem;
  }

  .timeline-rail-stream {
    padding-left: 1.5rem;
  }

  .timeline-rail-stream::before {
    left: 12px;
  }

  .milestone-pin-anchor {
    left: -1.5rem;
    width: 26px;
    height: 26px;
    font-size: 0.72rem;
  }

  .milestone-card-frame {
    padding: 1rem;
  }
}
