/* Time Travel slider (followup 4/6).
   Lives just below the api-status-badge, above the main nav. Hidden until
   app/time_travel.js renders it (after data-coverage returns). Past-date
   mode tints the chrome via body.tt-past so users don't mistake a
   historical view for the current state. */

.tt-bar {
  position: relative;
  z-index: 90;
  width: 100%;
  background: #f4f7fb;
  border-bottom: 1px solid #d8dde6;
  padding: 6px 16px;
  box-sizing: border-box;
}

.tt-bar[hidden] { display: none; }

.tt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
  font: 13px / 1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #2b3a4e;
}

.tt-label {
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 11px;
  color: #5b6b80;
  flex: 0 0 auto;
}

#tt-slider {
  flex: 1 1 auto;
  min-width: 200px;
  accent-color: #062b49;   /* matches the brand theme color */
}

.tt-badge {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e8eef5;
  color: #2b3a4e;
}

.tt-badge-today {
  background: #d9edd9;
  color: #1e5128;
}

.tt-badge-past {
  background: #fff3cd;
  color: #856404;
}

.tt-reset {
  flex: 0 0 auto;
  padding: 4px 12px;
  border: 1px solid #c2cad7;
  background: white;
  color: #2b3a4e;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.tt-reset:hover {
  background: #f0f4f9;
  border-color: #93a3b8;
}

.tt-reset[hidden] { display: none; }

/* Past-date tint on the main content. Subtle on purpose -- a clear cue
   without obscuring the data. Matches what ChartHop does in their
   Time Travel mode. */
body.tt-past::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: rgba(255, 248, 220, 0.06); /* very light amber tint */
  z-index: 80;
}

/* Hide the bar entirely on small screens for now -- the slider needs more
   horizontal room than mobile portrait provides. Can revisit with a
   collapsed "Time Travel" button -> modal pattern later. */
@media (max-width: 600px) {
  .tt-bar { display: none; }
}
