/* ── Shared year/time slider ─────────────────────────────────────────────────── */
.hejmap-timeslider {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(460px, calc(100% - 40px));
  padding: 11px 20px 11px 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: 0 6px 22px rgba(26, 58, 92, 0.14);
}

.hejmap-ts-year {
  flex-shrink: 0;
  min-width: 48px;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hejmap-ts-play {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: transform 0.12s, filter 0.12s;
}
.hejmap-ts-play svg { width: 18px; height: 18px; }
.hejmap-ts-play:hover { filter: brightness(1.06); }
.hejmap-ts-play:active { transform: scale(0.94); }

.hejmap-ts-loop {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  transition: transform 0.12s, background 0.12s, color 0.12s, border-color 0.12s;
}
.hejmap-ts-loop svg { width: 15px; height: 15px; }
.hejmap-ts-loop:hover { color: var(--ink-soft); background: var(--bg-warm); }
.hejmap-ts-loop:active { transform: scale(0.94); }
.hejmap-ts-loop.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.hejmap-ts-track {
  flex: 1;
  min-width: 0;
}

/* Scoped with an ancestor selector so these win over the global
   input[type="range"] rule in styles.css (which sets width:90px). */
.hejmap-timeslider .hejmap-ts-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background:
    linear-gradient(var(--accent), var(--accent)) left / var(--ts-fill, 0%) 100% no-repeat,
    color-mix(in srgb, var(--accent) 18%, var(--rule));
  outline: none;
  cursor: pointer;
  margin: 4px 0 7px;
}
.hejmap-timeslider .hejmap-ts-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--paper);
  box-shadow: 0 1px 4px rgba(26, 58, 92, 0.28);
  cursor: pointer;
  transition: none;
}
.hejmap-timeslider .hejmap-ts-range::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--paper);
  box-shadow: 0 1px 4px rgba(26, 58, 92, 0.28);
  cursor: pointer;
}

.hejmap-ts-ends {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

@media (max-width: 640px) {
  .hejmap-timeslider { bottom: 76px; padding: 8px 14px 8px 10px; }
  .hejmap-ts-play { width: 34px; height: 34px; }

  body.has-bottom-nav .hejmap-timeslider {
    position: fixed;
    bottom: 72px;
    z-index: 140;
  }
  body.has-bottom-nav.mobile-panel-open .hejmap-timeslider {
    bottom: calc(48vh + 72px);
  }
}
