/* ==========================================================================
   TIMELINE SCRUBBER & CONTROLS (~6 BC – 100 AD)
   Fluid range slider, era tabs, playback engine, speed toggles
   ========================================================================== */

.app-timeline-footer {
  position: relative;
  z-index: 1000;
  height: var(--footer-height);
  background: linear-gradient(180deg, #2A1F16 0%, #1D150E 100%);
  border-top: 2px solid var(--color-gold);
  color: #F8F5EE;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.65rem 1.25rem 0.5rem;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.4);
}

/* Control Top Bar */
.timeline-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Playback Controls */
.playback-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-ctrl {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(197, 160, 89, 0.4);
  color: #F8F5EE;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ctrl:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--color-gold-light);
  transform: translateY(-1px);
}

.btn-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%);
  border: 2px solid #FFF8EB;
  color: #FFF;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.6);
}

.btn-play:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.85);
}

/* Speed Selector */
.speed-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 6px;
  padding: 2px;
  margin-left: 0.25rem;
}

.speed-btn {
  background: none;
  border: none;
  color: #C8B79B;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.speed-btn:hover {
  color: #FFF;
}

.speed-btn.active {
  background: var(--color-gold);
  color: #241A13;
  font-weight: 700;
}

/* Current Date Badge */
.current-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 170px;
  text-align: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 8px;
  padding: 0.25rem 0.85rem;
}

.badge-year {
  font-family: var(--font-serif-title);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #FDE047;
  text-shadow: 0 0 10px rgba(253, 224, 71, 0.4);
  line-height: 1.1;
}

.badge-season {
  font-size: 0.72rem;
  color: #D1BE9C;
  white-space: nowrap;
  letter-spacing: 0.02em;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Era Selector Tabs */
.era-selector-tabs {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.era-selector-tabs::-webkit-scrollbar {
  display: none;
}

.era-tab {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(197, 160, 89, 0.25);
  color: #C8B79B;
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.era-tab:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFF;
}

.era-tab.active {
  background: #3D2B1B;
  border-color: var(--color-gold);
  color: #FDE047;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(197, 160, 89, 0.4);
}

/* Timeline Track Wrap */
.timeline-slider-track-wrap {
  position: relative;
  width: 100%;
  margin-top: 0.4rem;
}

/* Slider Track Ticks */
.slider-ticks {
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.tick-mark {
  width: 1px;
  height: 6px;
  background: rgba(197, 160, 89, 0.35);
}

.tick-mark.major {
  height: 10px;
  width: 2px;
  background: var(--color-gold);
}

/* Timeline Range Slider */
.timeline-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, 
    #78350F 0%, 
    #92400E 10%, 
    #D97706 32%, 
    #DC2626 35%, 
    #2563EB 55%, 
    #B45309 72%, 
    #7F1D1D 75%, 
    #854D0E 100%
  );
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Slider Thumb - WebKit */
.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFFDE8 20%, #F59E0B 70%, #92400E 100%);
  border: 2px solid #FFF8EB;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.85), 0 2px 6px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

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

/* Slider Thumb - Firefox */
.timeline-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFFDE8 20%, #F59E0B 70%, #92400E 100%);
  border: 2px solid #FFF8EB;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.85), 0 2px 6px rgba(0,0,0,0.5);
  cursor: pointer;
}

/* Timeline Labels */
.timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  color: #A3937C;
  font-weight: 500;
  user-select: none;
}

.t-label.highlight-gold {
  color: #FDE047;
  font-weight: 700;
}

.t-label.highlight-crimson {
  color: #EF4444;
  font-weight: 700;
}

@media (max-width: 900px) {
  :root {
    --footer-height: 135px;
  }
  
  .era-selector-tabs {
    display: none;
  }
  
  .timeline-control-bar {
    justify-content: space-between;
  }
}
