:root {
  color-scheme: light;
  --bg: #f2f5f4;
  --surface: #fff;
  --surface-soft: #f6f8f7;
  --line: #e1e8e4;
  --line-strong: #7a8a83;
  --ink: #172924;
  --muted: #5f726c;
  --accent: #176b58;
  --accent-soft: #e3f2ed;
  --danger: #a33a42;
  --danger-soft: #fbebeb;
  --warn: #8a5a12;
  --warn-soft: #fdf0dd;
  --live: #1d4e89;
  --live-soft: #e2edfb;
  --label: #3a5149;
  --muted-soft: #eef1ef;
  --star: #b9c3bf;
  --danger-solid: #b23c3c;
  --danger-solid-hover: #9c3232;
  --ok-line: #9ec9b4;
  --ok-tint: #eef7f1;
  --ok-ink: #14563c;
  --on-accent: #fff;
  --on-ink: #fff;
  --logo-bg: #fff;
  --radius: 18px;
  --shadow: 0 24px 60px -40px rgba(30, 58, 48, .45);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  margin: 0;
  padding: 0 0 40px;
  background: radial-gradient(circle at 88% 0%, var(--accent-soft), transparent 26rem), var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

button, input, select { font: inherit; }

.screen {
  display: grid;
  gap: 18px;
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 16px 0;
}

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 19px;
}
.brand b { display: block; font-size: 16px; }
.brand small { display: block; color: var(--muted); font-size: 12.5px; }

.brand__mark--logo { position: relative; overflow: hidden; }
.brand__mark--logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--logo-bg); }
.brand__initial { position: relative; }

.locale-switch { display: flex; gap: 6px; }
.locale-switch button {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 750;
  cursor: pointer;
}
.locale-switch button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card--center { display: grid; place-items: center; gap: 12px; min-height: 200px; color: var(--muted); }
.card h1 { margin: 0 0 6px; font-size: 23px; letter-spacing: -.02em; }
.card h2 { margin: 18px 0 10px; font-size: 15px; }
.card p { margin: 6px 0 0; color: var(--ink); }
.card--price .price-row { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 10px; }

.eyebrow { display: block; color: var(--muted); font-size: 12.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.price-label { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.price { font-size: 30px; letter-spacing: -.03em; }
.price--muted { color: var(--muted); font-size: 22px; }

.estimate { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.estimate b { color: var(--ink); }
.plan-map { margin: 14px 0 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); }
.plan-map svg { display: block; width: 100%; height: auto; }
.plan-map[hidden] { display: none; }
.pick-map { margin: 12px 0 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; height: 320px; background: var(--bg); }
.pick-map[hidden] { display: none; }
.note { color: var(--muted) !important; font-size: 13px; margin-top: 10px !important; }
.foot { color: var(--muted); font-size: 13px; text-align: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; font-size: 13px; }
.foot-links a { color: var(--accent); text-decoration: underline; }
.foot-links a:hover { text-decoration: none; }

.form { display: grid; gap: 14px; margin-top: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { color: var(--label); font-size: 13.5px; font-weight: 700; }
.field small { color: var(--muted); font-size: 12.5px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field-row { display: flex; align-items: end; gap: 10px; }
.field--grow { flex: 1 1 auto; }

.place-results { display: grid; gap: 2px; margin: -2px 0 2px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.place-results[hidden] { display: none; }
.place-option { display: grid; gap: 2px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; }
.place-option:hover, .place-option:focus-visible { background: var(--surface-soft); outline: none; }
.place-option b { color: var(--ink); font-size: 13.5px; font-weight: 700; }
.place-option small { color: var(--muted); font-size: 12px; }

.button {
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 750;
  cursor: pointer;
}
.button--primary { background: var(--accent); color: var(--on-accent); }
.button--primary:disabled { opacity: .55; cursor: not-allowed; }
.button--quiet { border-color: var(--line); background: var(--surface); color: var(--ink); white-space: nowrap; }
.button--danger { border-color: var(--danger); background: var(--danger); color: var(--on-accent); }
.button--danger:disabled { opacity: .55; cursor: not-allowed; }

.actions { display: grid; gap: 10px; }
.actions .button { width: 100%; }
.actions--row { grid-template-columns: 1fr; }

.notice { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-soft); color: var(--ink); font-size: 14px; font-weight: 600; }
.notice--error { background: var(--danger-soft); color: var(--danger); }
.notice--warn { background: var(--warn-soft); color: var(--warn); }
.notice--ok { background: var(--accent-soft); color: var(--accent); }
.notice .actions { margin-top: 10px; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.rating-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.rating-form h2 { margin: 0 0 6px; font-size: 17px; }
.rating-fields { display: grid; gap: 16px; margin-top: 12px; }
.rating-stars { display: flex; flex-wrap: wrap; gap: 6px; color: var(--warn); letter-spacing: .1em; font-size: 18px; }
.rating-stars-input, .rating-tags-input { border: 0; margin: 0; padding: 0; }
.rating-stars-input legend, .rating-tags-input legend { padding: 0 0 8px; font-size: 13px; color: var(--muted); }
.rating-stars-input { display: flex; flex-wrap: wrap; gap: 6px; }
.rating-stars-input label { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.rating-stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-stars-input span { font-size: 22px; color: var(--star); }
.rating-stars-input input:checked + span { color: var(--warn); }
.rating-stars-input input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.rating-tags-input { display: flex; flex-wrap: wrap; gap: 8px; }
.rating-tags-input label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; }
.rating-tags-input label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.rating-saved { display: flex; align-items: center; gap: 8px; }

.pill { display: inline-block; padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 750; }
.pill--ok { background: var(--accent-soft); color: var(--accent); }
.pill--muted { background: var(--muted-soft); color: var(--muted); }
.pill--warn { background: var(--warn-soft); color: var(--warn); }
.pill--live { background: var(--live-soft); color: var(--live); }
.pill--danger { background: var(--danger-soft); color: var(--danger); }

.track-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.track-head h1 { margin: 2px 0 0; font-size: 21px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.grid p { margin: 3px 0 0; font-weight: 650; }
.driver { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--surface-soft); }
.driver b { display: block; margin-top: 3px; }
.position { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--surface-soft); }
.position b { display: block; margin-top: 3px; font-variant-numeric: tabular-nums; }
.position small { color: var(--muted); font-size: 12.5px; }

.steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.steps__item { display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
.steps__dot { width: 9px; height: 9px; border-radius: 99px; background: var(--line); }
.steps__item--done { color: var(--ink); font-weight: 700; }
.steps__item--done .steps__dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.history { display: grid; gap: 10px; margin: 10px 0 0; padding: 0; list-style: none; }
.history li { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.history b { display: block; font-size: 15px; }
.history small { display: block; color: var(--muted); font-size: 12.5px; }

.loader {
  width: 26px;
  height: 26px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 99px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.noscript { max-width: 560px; margin: 20px auto; padding: 0 16px; }

@media (min-width: 520px) {
  .actions--row { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  /* Manje animacije: kraće i bez ponavljanja; loader ostaje spor da se vidi da se nešto događa. */
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }

  .loader {
    animation: spin 2s linear infinite !important;
  }
}

.chat__list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; max-height: 320px; overflow-y: auto; }
.chat__item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.chat__item small { color: var(--muted); font-size: 12px; }
.chat__item p { margin: 4px 0 0; overflow-wrap: anywhere; }
.chat__item[data-author="PASSENGER"] { border-color: var(--line-strong); }
.chat__form { margin-top: 12px; display: grid; gap: 10px; }
.button--danger { border: 1px solid var(--danger-solid); background: var(--danger-solid); color: var(--on-accent); }
.button--danger:hover { background: var(--danger-solid-hover); }
.notice--success { border-color: var(--ok-line); background: var(--ok-tint); color: var(--ok-ink); }
.stops { margin-top: 14px; }
.stops__list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b1220;
    --surface: #121a29;
    --surface-soft: #182231;
    --line: #263349;
    --line-strong: #6b7d95;
    --ink: #e8eef7;
    --muted: #9dafc4;
    --accent: #4fd6ab;
    --accent-soft: #1b2b45;
    --danger: #f0908a;
    --danger-soft: #3a1d1f;
    --warn: #f3c07a;
    --warn-soft: #3a2c15;
    --live: #8fb9ee;
    --live-soft: #1b2b45;
    --shadow: 0 24px 60px -34px rgba(0, 0, 0, .72);
    --label: #c8d4e3;
    --muted-soft: #1e2a3a;
    --star: #4a5a6c;
    --danger-solid: #b23c3c;
    --danger-solid-hover: #9c3232;
    --ok-line: #2f6b57;
    --ok-tint: #14322b;
    --ok-ink: #a9e8d0;
    --on-accent: #fff;
    --on-ink: #061018;
    --logo-bg: #fff;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}