/**
 * Astral Archive — Time machine styles
 * ---------------------------------------------------------------------------
 * Loaded by the pages that carry the shared instant: constellations.html and
 * tracker.html. Holds the timeline, the step controls and the jump chips. The
 * ordinary panel furniture around it comes from the compiled utility classes
 * and from planner.css.
 */

/* -------------------------------------------------------------------------- */
/* Timeline                                                                   */
/* -------------------------------------------------------------------------- */
.tm-head {
  margin-top: 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tm-badge {
  flex: none;
  height: 22px;
  padding: 0 0.6rem;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.tm-badge[data-mode='pinned'] {
  color: #C3B4F7;
  border-color: rgba(166, 146, 240, 0.36);
  background: rgba(166, 146, 240, 0.1);
}

.tm-readout {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

/* The track is drawn here rather than left to the browser default so the
   timeline reads as part of the panel on every platform. */
.tm-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  margin-top: 0.7rem;
  background: transparent;
  cursor: pointer;
}

.tm-slider:focus-visible {
  outline: 2px solid rgba(124, 134, 232, 0.8);
  outline-offset: 4px;
  border-radius: 4px;
}

.tm-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, rgba(124, 134, 232, 0.45) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(166, 146, 240, 0.45) 100%);
}

.tm-slider::-moz-range-track {
  height: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, rgba(124, 134, 232, 0.45) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(166, 146, 240, 0.45) 100%);
}

.tm-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: #E6E8F0;
  border: 2px solid #7C86E8;
  box-shadow: 0 0 12px rgba(124, 134, 232, 0.55);
}

.tm-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #E6E8F0;
  border: 2px solid #7C86E8;
  box-shadow: 0 0 12px rgba(124, 134, 232, 0.55);
}

.tm-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

/* -------------------------------------------------------------------------- */
/* Controls                                                                   */
/* -------------------------------------------------------------------------- */
.tm-actions {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.tm-step,
.tm-live {
  height: 30px;
  padding: 0 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), opacity var(--transition-fast);
}

.tm-step:hover,
.tm-live:hover:not(:disabled) {
  color: var(--text-primary);
  background: rgba(124, 134, 232, 0.12);
  border-color: rgba(124, 134, 232, 0.35);
}

.tm-live {
  margin-left: auto;
  color: #C3B4F7;
  border-color: rgba(166, 146, 240, 0.32);
}

.tm-live:disabled {
  opacity: 0.42;
  cursor: default;
}

.tm-step:focus-visible,
.tm-live:focus-visible,
.tm-jump:focus-visible {
  outline: 2px solid rgba(124, 134, 232, 0.8);
  outline-offset: 2px;
}

.tm-exact {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tm-exact > span {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.tm-exact > span em {
  font-style: normal;
  color: var(--text-muted);
}

.tm-exact .field-input {
  width: 100%;
}

.tm-jumps {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tm-jump {
  height: 28px;
  padding: 0 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.tm-jump:hover {
  color: var(--text-primary);
  background: rgba(124, 134, 232, 0.12);
  border-color: rgba(124, 134, 232, 0.35);
}

/* A locked chip stays clickable: pressing it is how the tier gets explained. */
.tm-jump[data-locked] {
  color: var(--text-muted);
  border-style: dashed;
  border-color: rgba(166, 146, 240, 0.32);
}

.tm-jump[data-locked]:hover {
  color: #C3B4F7;
  border-color: rgba(166, 146, 240, 0.5);
  background: rgba(166, 146, 240, 0.1);
}

.tm-jump[data-locked]::after {
  content: ' ·';
  color: rgba(166, 146, 240, 0.7);
}

.tm-hint {
  margin-top: 0.75rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-muted);
}