/* ============================================================================
 * timeline_controller.css — Temporal scrubbing bar (Epic H2, Phase 4 packet B)
 * Docked bottom scrubber over the map. Tokens with literal fallbacks.
 * Animations use transform/opacity only (GPU-friendly).
 * ==========================================================================*/

.rv-timeline-bar {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: var(--rv-z-float, 200);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  min-width: 540px;
  max-width: min(900px, 92vw);
  background: var(--rv-surface, rgba(13, 20, 33, 0.96));
  border: 1px solid var(--rv-border, rgba(0, 212, 255, 0.25));
  border-radius: var(--rv-radius-md, 8px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  /* Show/hide via opacity+transform (GPU) — the .hidden class still hard-hides. */
  opacity: 1;
  transition: opacity 160ms ease, transform 160ms ease;
}

.rv-timeline-bar.hidden {
  /* Project convention: .hidden = display:none !important (in style.css). This
   * rule documents the intended hidden state; the global .hidden wins. */
  opacity: 0;
}

.rv-tl-ranges {
  display: flex;
  gap: 4px;
}

.rv-tl-range-btn,
.rv-tl-play,
.rv-tl-close {
  font-size: var(--rv-fs-xs, 0.78rem);
  background: var(--rv-surface-2, rgba(255, 255, 255, 0.06));
  color: var(--rv-text, #cfe3f2);
  border: 1px solid var(--rv-border, rgba(255, 255, 255, 0.14));
  border-radius: var(--rv-radius-sm, 5px);
  padding: 4px 8px;
  cursor: pointer;
  transition: opacity 120ms ease, transform 120ms ease;
}

.rv-tl-range-btn:hover,
.rv-tl-play:hover,
.rv-tl-close:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.rv-tl-range-btn.active {
  border-color: var(--rv-accent, #00d4ff);
  color: var(--rv-accent, #00d4ff);
}

.rv-tl-play {
  min-width: 34px;
  font-size: 0.85rem;
}

.rv-tl-slider {
  flex: 1 1 auto;
  min-width: 160px;
  accent-color: var(--rv-accent, #00d4ff);
  cursor: pointer;
}

.rv-tl-readout {
  font-size: var(--rv-fs-xs, 0.78rem);
  color: var(--rv-text-muted, #8aa0b4);
  min-width: 150px;
  text-align: right;
  white-space: nowrap;
}

.rv-tl-close {
  font-weight: 700;
  line-height: 1;
}

/* Map trail/cursor styling — drop-shadow only, no animated layout props. */
.rv-timeline-trail {
  filter: drop-shadow(0 0 2px rgba(0, 212, 255, 0.6));
}
.rv-timeline-cursor-dot {
  filter: drop-shadow(0 0 3px rgba(0, 212, 255, 0.8));
}

/* Responsive: narrow tablets — shrink min-width, wrap the ranges. */
@media (max-width: 820px) {
  .rv-timeline-bar {
    min-width: 0;
    width: 92vw;
    flex-wrap: wrap;
    gap: 6px;
  }
  .rv-tl-readout {
    min-width: 0;
    flex: 1 0 100%;
    text-align: left;
  }
}
