/* ============================================================
   live.css — karta uživo, stanice, stanica, u blizini
   Vlasnik: live-tools. Koristi tokene iz main.css uz lokalne
   fallback vrijednosti (radi i prije učitavanja glavne teme).
   ============================================================ */

:root {
  --lv-accent: var(--at-orange-600, #f2571e);
  --lv-accent-strong: #d64a12;          /* naglasak countdowna, AA na svijetloj */
  --lv-navy: var(--at-navy-700, #003c66);
  --lv-ink: var(--at-navy-900, #001e33);
  --lv-sky: var(--at-sky-400, #33ccff);
  --lv-surface: rgba(255, 255, 255, 0.86);
  --lv-surface-solid: #ffffff;
  --lv-border: rgba(0, 45, 77, 0.14);
  --lv-muted: #48627a;
  --lv-map-bg: #dbe4ec;
  --lv-mark: rgba(242, 87, 30, 0.18);
  --lv-shadow: 0 10px 30px rgba(0, 15, 26, 0.16);
}

[data-theme="dark"] {
  --lv-accent: var(--at-orange-500, #ff6d33);
  --lv-accent-strong: #ff8a5c;
  --lv-navy: var(--at-sky-400, #33ccff);
  --lv-ink: #e8f0f7;
  --lv-surface: rgba(0, 30, 51, 0.82);
  --lv-surface-solid: var(--at-navy-900, #001e33);
  --lv-border: rgba(51, 204, 255, 0.16);
  --lv-muted: #9fb3c8;
  --lv-map-bg: #00121f;
  --lv-mark: rgba(255, 109, 51, 0.32);
  --lv-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* ============================================================
   1. KARTA UŽIVO (/karta)
   ============================================================ */

.page-karta {
  padding: 0;
  margin: 0;
}

.page-karta #map-wrap {
  position: relative;
  /* JS precizno postavlja visinu; ovo je razuman fallback */
  height: calc(100dvh - 64px);
  min-height: 380px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .page-karta #map-wrap {
    height: calc(100dvh - 120px);
  }
}

.page-karta #map {
  position: absolute;
  inset: 0;
  background: var(--lv-map-bg);
  z-index: 0;
}

/* Plutajuća upravljačka kartica (staklo) */
.map-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1001;
  width: min(340px, calc(100% - 24px));
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--lv-surface);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--lv-border);
  box-shadow: var(--lv-shadow);
  color: var(--lv-ink);
}

.map-controls-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.map-status {
  margin: 0;
  font-size: 0.86rem;
  color: var(--lv-muted);
  min-height: 1.3em;
}

.map-status strong {
  color: var(--lv-ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.map-status.is-offline {
  color: var(--lv-accent-strong);
  font-weight: 700;
}

.map-status.is-offline::before {
  content: "⚠ ";
}

.btn-locate {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--lv-border);
  background: var(--lv-surface-solid);
  color: var(--lv-navy);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.btn-locate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 15, 26, 0.18);
  color: var(--lv-accent);
}

.btn-locate:focus-visible {
  outline: 2px solid var(--lv-accent);
  outline-offset: 2px;
}

.btn-locate.is-busy svg {
  animation: lv-spin 1s linear infinite;
}

@keyframes lv-spin {
  to { transform: rotate(360deg); }
}

/* Filtar linija — čipovi */
.line-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  max-height: 132px;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.line-chips:empty {
  display: none;
}

.line-chips .chip {
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--lv-border);
  background: var(--lv-surface-solid);
  color: var(--lv-ink);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.line-chips .chip:hover {
  border-color: var(--lv-accent);
  color: var(--lv-accent);
}

.line-chips .chip[aria-pressed="true"] {
  background: var(--lv-accent);
  border-color: var(--lv-accent);
  color: #fff;
}

.line-chips .chip[aria-pressed="true"]:hover {
  color: #fff;
}

.line-chips .chip:focus-visible {
  outline: 2px solid var(--lv-accent);
  outline-offset: 2px;
}


/* Nenametljivi toast (npr. "Nema veze") */
.map-toast {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 8px);
  z-index: 1002;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--lv-ink);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--lv-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

[data-theme="dark"] .map-toast {
  background: #e8f0f7;
  color: var(--at-navy-900, #001e33);
}

.map-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   2. LEAFLET — markeri, teme, popup (sve karte)
   ============================================================ */

/* Tamna karta koristi izvorne tamne CARTO pločice (bez CSS filtra). */

/* Pil autobusa (divIcon) */
.bus-marker {
  background: none;
  border: none;
}

/* Omotač pila + strelica smjera koja kruži oko pila (kut u --h) */
.bus-wrap {
  position: absolute;
  left: 0;
  top: 0;
}

.bus-arrow {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform: rotate(var(--h, 0deg));
  transition: transform 200ms linear;
  color: var(--lv-accent, #f2571e);
  pointer-events: none;
  z-index: 0; /* ispod pila — baza klina se skriva pod njim (stopljeni oblik) */
}

/* Klin uvučen pod rub pila — čita se kao šiljak istog oblika, ne kao
   zaseban element. max-width: none je nužan: globalno svg { max-width:100% }
   bi se računalo prema roditelju širine 0 i saželo klin na 0 px. */
.bus-arrow svg {
  position: absolute;
  left: -10px;
  top: -25px;
  max-width: none;
  --at-arrow-stroke: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 15, 26, 0.45));
}

[data-theme="dark"] .bus-arrow svg {
  --at-arrow-stroke: #04121f;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

@media (prefers-reduced-motion: reduce) {
  .bus-arrow { transition: none; }
}

.bus-pill {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1; /* preko baze klina smjera */
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--lv-accent, #f2571e);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 3px 8px rgba(0, 15, 26, 0.4);
}

/* mala usmjerna točkica ispod pila (sidrište) */
.bus-pill::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: inherit;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  transform: translateX(-50%);
}


[data-theme="dark"] .bus-pill {
  box-shadow: 0 0 0 2px rgba(0, 18, 31, 0.85), 0 3px 8px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .bus-pill::after {
  border-color: rgba(0, 18, 31, 0.85);
}

/* mali pil u popupu / na mini karti */
.bus-pill--inline {
  position: static;
  transform: none;
  vertical-align: middle;
}

.bus-pill--inline::after {
  display: none;
}

/* Moja lokacija */
.user-marker {
  background: none;
  border: none;
}

.user-dot {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--lv-sky, #33ccff);
  border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(0, 15, 26, 0.45);
}

[data-theme="dark"] .user-dot {
  border-color: var(--at-navy-900, #001e33);
}

.user-dot::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 2px solid var(--lv-sky, #33ccff);
  opacity: 0.7;
  animation: lv-pulse 2s ease-out infinite;
}

@keyframes lv-pulse {
  0% { transform: scale(0.5); opacity: 0.7; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* Marker stanice na mini karti */
.stop-marker {
  background: none;
  border: none;
}

.stop-pin {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--lv-navy, #003c66);
  border: 3.5px solid #fff;
  box-shadow: 0 0 0 2px var(--lv-navy, #003c66), 0 2px 8px rgba(0, 15, 26, 0.4);
}

[data-theme="dark"] .stop-pin {
  background: var(--lv-sky, #33ccff);
  border-color: var(--at-navy-900, #001e33);
  box-shadow: 0 0 0 2px var(--lv-sky, #33ccff), 0 2px 8px rgba(0, 0, 0, 0.55);
}

/* Ciljna točka s /blizu (hash na karti) */
.target-marker {
  background: none;
  border: none;
}

.target-dot {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lv-accent, #f2571e);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(242, 87, 30, 0.35);
}

/* Brandirani popup */
.at-popup .leaflet-popup-content-wrapper {
  background: var(--lv-surface-solid);
  color: var(--lv-ink);
  border-radius: 14px;
  border: 1px solid var(--lv-border);
  box-shadow: var(--lv-shadow);
}

.at-popup .leaflet-popup-tip {
  background: var(--lv-surface-solid);
  border: 1px solid var(--lv-border);
}

.at-popup .leaflet-popup-content {
  margin: 12px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.45;
}

.at-popup a.leaflet-popup-close-button {
  color: var(--lv-muted);
}

.at-popup-body .popup-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-weight: 700;
}

.at-popup-body .popup-title strong {
  font-weight: 700;
}

.at-popup-body .popup-meta {
  margin: 0 0 8px;
  color: var(--lv-muted);
  font-size: 0.82rem;
}

.at-popup-body .popup-link {
  display: inline-block;
  color: var(--lv-accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.at-popup-body .popup-link:hover {
  text-decoration: underline;
}

/* Leaflet kontrole u tamnoj temi */
[data-theme="dark"] .leaflet-bar a {
  background: var(--at-navy-800, #002d4d);
  color: #e8f0f7;
  border-color: rgba(51, 204, 255, 0.2);
}

[data-theme="dark"] .leaflet-bar a:hover,
[data-theme="dark"] .leaflet-bar a:focus {
  background: var(--at-navy-700, #003c66);
}

[data-theme="dark"] .leaflet-bar a.leaflet-disabled {
  background: var(--at-navy-900, #001e33);
  color: #5a7186;
}

.leaflet-control-attribution {
  font-size: 10px;
}

[data-theme="dark"] .leaflet-control-attribution {
  background: rgba(0, 30, 51, 0.75);
  color: #9fb3c8;
}

[data-theme="dark"] .leaflet-control-attribution a {
  color: var(--lv-sky, #33ccff);
}

.leaflet-container {
  font-family: inherit;
}

.leaflet-container :focus-visible {
  outline: 2px solid var(--lv-accent);
  outline-offset: 2px;
}

/* ============================================================
   3. RED POLAZAKA (dijele: stanica, blizu)
   ============================================================ */

.dep-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.dep-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--lv-border);
}

.dep-row:last-child {
  border-bottom: none;
}

.dep-row .line-badge {
  flex: none;
  text-decoration: none;
}

.dep-dest {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.92rem;
}

.dep-right {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dep-clock {
  font-variant-numeric: tabular-nums;
  color: var(--lv-muted);
  font-size: 0.88rem;
}

.dep-row .countdown {
  min-width: 68px;
  text-align: right;
  font-weight: 700;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

/* polasci idućeg dana (danas ih više nema) — prigušeni, s oznakom „sutra” */
.dep-nextday {
  min-width: 68px;
  text-align: right;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--lv-muted);
}

.dep-row--next .dep-dest,
.dep-row--next .dep-clock { opacity: 0.85; }

/* narančasti naglasak < 3 min */
.dep-row .countdown.is-soon {
  color: var(--lv-accent-strong);
}

.dep-row .countdown.is-now {
  color: var(--lv-accent-strong);
  animation: lv-blink 1.2s ease-in-out infinite;
}

@keyframes lv-blink {
  50% { opacity: 0.45; }
}

/* skeleton redci prije prvog učitavanja */
.dep-row.is-skeleton {
  gap: 12px;
}

.sk-badge { width: 42px; height: 24px; border-radius: 999px; }
.sk-dest  { flex: 1; height: 14px; border-radius: 6px; }
.sk-time  { width: 88px; height: 14px; border-radius: 6px; }

/* ============================================================
   4. STANICA (/stanice/:id)
   ============================================================ */

.page-stanica .station-head {
  padding-bottom: 0;
}

.station-crumb {
  margin: 0 0 4px;
  font-size: 0.85rem;
}

.station-crumb a {
  color: var(--lv-muted);
  text-decoration: none;
}

.station-crumb a:hover {
  color: var(--lv-accent-strong);
  text-decoration: underline;
}

.page-stanica h1 {
  margin: 0 0 10px;
}

.station-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.station-meta .line-badge {
  text-decoration: none;
  transition: transform 0.15s ease;
}

.station-meta .line-badge:hover {
  transform: translateY(-2px);
}

.station-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.station-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 900px) {
  .station-grid {
    grid-template-columns: 1fr;
  }
}

.station-livenote {
  margin: 2px 0 12px;
  font-size: 0.85rem;
  color: var(--lv-muted);
}

.station-livenote.is-offline {
  color: var(--lv-accent-strong);
  font-weight: 700;
}

.station-map {
  height: 300px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--lv-border);
  background: var(--lv-map-bg);
  z-index: 0;
}

.station-map-note {
  margin: 8px 2px 0;
  font-size: 0.82rem;
  color: var(--lv-muted);
}

.page-stanica .empty-state,
.page-blizu .near-empty {
  color: var(--lv-muted);
}

/* ============================================================
   5. STANICE (/stanice) — abecedni popis + filtar
   ============================================================ */

.stations-sub {
  color: var(--lv-muted);
  margin: 4px 0 18px;
  max-width: 60ch;
}

.stations-filter {
  position: sticky;
  top: var(--lv-header-h, 64px);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 0;
  background: var(--lv-surface);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--lv-border);
}

.stations-filter .input {
  flex: 1;
  min-width: 220px;
  max-width: 440px;
}

.stations-count {
  margin: 0;
  font-size: 0.85rem;
  color: var(--lv-muted);
  font-variant-numeric: tabular-nums;
}

.letter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 14px 0 4px;
}

.letter-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--lv-navy);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.letter-nav a:hover {
  border-color: var(--lv-accent);
  color: var(--lv-accent-strong);
}

.letter-nav a:focus-visible {
  outline: 2px solid var(--lv-accent);
  outline-offset: 2px;
}

.letter-group {
  scroll-margin-top: calc(var(--lv-header-h, 64px) + var(--lv-filter-h, 58px) + 16px);
  margin-bottom: 6px;
}

.letter-head {
  position: sticky;
  top: calc(var(--lv-header-h, 64px) + var(--lv-filter-h, 58px));
  z-index: 10;
  margin: 0 0 4px;
  padding: 6px 8px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--lv-accent-strong);
  background: var(--lv-surface);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 8px;
}

.letter-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2px 20px;
}

@media (max-width: 480px) {
  .letter-rows {
    grid-template-columns: 1fr;
  }
}

.station-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.station-row:hover .station-name {
  color: var(--lv-accent-strong);
}

.station-row:focus-visible {
  outline: 2px solid var(--lv-accent);
  outline-offset: 1px;
}

.station-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.93rem;
  font-weight: 600;
  transition: color 0.12s ease;
}

.station-name mark {
  background: var(--lv-mark);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

.dir-badge {
  flex: none;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--lv-navy);
  border: 1px solid var(--lv-border);
  border-radius: 999px;
  padding: 1px 8px;
}

/* ============================================================
   6. U BLIZINI (/blizu)
   ============================================================ */

.near-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 28px;
  border-radius: 20px;
  background:
    radial-gradient(1200px 400px at 110% -20%, rgba(242, 87, 30, 0.10), transparent 60%),
    var(--lv-surface-solid);
  border: 1px solid var(--lv-border);
}

[data-theme="dark"] .near-intro {
  background:
    radial-gradient(1200px 400px at 110% -20%, rgba(255, 109, 51, 0.12), transparent 60%),
    var(--lv-surface-solid);
}

.near-intro-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--lv-accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(242, 87, 30, 0.35);
}

.near-intro h1 {
  margin: 0;
}

.near-intro p {
  margin: 0;
  max-width: 56ch;
  color: var(--lv-muted);
}

.near-cta {
  font-size: 1.02rem;
  padding: 14px 26px;
}

.near-intro .near-privacy {
  font-size: 0.8rem;
}

.near-status {
  min-height: 1.4em;
  margin: 12px 2px;
  font-size: 0.9rem;
  color: var(--lv-muted);
}

.near-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.near-meta .section-title {
  margin: 0;
}

.near-updated {
  margin: 0;
  font-size: 0.82rem;
  color: var(--lv-muted);
  font-variant-numeric: tabular-nums;
}

.near-updated.is-offline {
  color: var(--lv-accent-strong);
  font-weight: 700;
}

.near-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

@media (max-width: 420px) {
  .near-cards {
    grid-template-columns: 1fr;
  }
}

.near-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  background: var(--lv-surface-solid);
  border: 1px solid var(--lv-border);
}

.near-cards.is-anim .near-card {
  animation: lv-card-in 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes lv-card-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
}

.near-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.near-name {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.3;
  min-width: 0;
}

.near-name a {
  color: inherit;
  text-decoration: none;
}

.near-name a:hover {
  color: var(--lv-accent-strong);
}

.near-name a:focus-visible {
  outline: 2px solid var(--lv-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.near-dist {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--lv-accent-strong);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.near-deps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.near-deps .dep-row {
  padding-inline: 0;
}

.near-empty {
  padding: 12px 0;
  font-size: 0.9rem;
}

.near-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.near-error {
  margin-top: 16px;
}

.near-error h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.near-error p {
  margin: 0 0 12px;
  max-width: 62ch;
}

/* ============================================================
   7. Pristupačnost i pokret
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .user-dot::before,
  .dep-row .countdown.is-now,
  .btn-locate.is-busy svg,
  .near-cards.is-anim .near-card {
    animation: none !important;
  }

  .map-toast,
  .btn-locate,
  .station-meta .line-badge,
  .line-chips .chip {
    transition: none !important;
  }
}

/* Isprekidana linija autobus → sljedeća stanica (animirano "tečenje") */
.next-line {
  animation: next-dash 1.1s linear infinite;
}

@keyframes next-dash {
  to { stroke-dashoffset: -16; }
}

@media (prefers-reduced-motion: reduce) {
  .next-line { animation: none; }
}

/* Spojena stranica /stanice: naslov → "u blizini" → svi popisi stoje jedan
   ispod drugoga, pa bi zbrojeni razmaci .section bili predebeli. */
.page-stanice .stations-head { padding-bottom: 0; }
.page-stanice #blizu { padding-block: 1.5rem; }
.page-stanice .stations-all-head { padding-bottom: 0.25rem; }
