﻿/*
 * Booking portal styles. The two brand colors come from the layout (:root --brand-primary / --brand-accent);
 * every other color is derived from them or is brand-neutral, so a new brand needs no CSS.
 * A brand may also set --brand-font (the layout does it from Brand.FontFamily) and load its own stylesheet after this
 * one (Brand.CssUrl) to redefine any variable below (--page, --surface, --radius, ...) or any rule.
 */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --brand-primary: #000040;
    --brand-accent: #f28c28;
    --brand-tint: color-mix(in srgb, var(--brand-primary) 6%, #fff);
    --brand-soft: color-mix(in srgb, var(--brand-primary) 14%, #fff);
    --font: var(--brand-font, "Inter"), system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #fff;
    --page: #f5f7fb;

    --ok: #15803d;
    --ok-bg: #dcfce7;
    --warn: #b45309;
    --warn-bg: #fef3c7;
    --bad: #b91c1c;
    --bad-bg: #fee2e2;
    --info: #1d4ed8;
    --info-bg: #dbeafe;

    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
    --shadow: 0 6px 20px rgba(15, 23, 42, .08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, .18);
    --topbar-height: 68px;
    --tabbar-height: 62px;
}

* { box-sizing: border-box; }

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
    min-height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
}

h1 { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
h2 { margin: 0 0 16px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 12px; }
a { color: var(--brand-primary); text-underline-offset: 3px; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 820px; }
.container--form { max-width: 480px; }
.muted { color: var(--muted); font-size: 14px; }
.eyebrow { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- header, navigation, footer ---------- */
.topbar { position: sticky; top: 0; z-index: 1100; height: var(--topbar-height); background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; gap: 24px; height: 100%; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--brand-primary); font-size: 20px; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.logo img { height: 40px; width: auto; }
.mainnav { display: flex; gap: 4px; margin-left: auto; }
.mainnav a { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; color: var(--ink-2); font-size: 15px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s; }
.mainnav a:hover { background: var(--brand-tint); color: var(--brand-primary); }
.mainnav a.active { background: var(--brand-soft); color: var(--brand-primary); }
.mainnav__account { display: none !important; }
.userchip { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; background: var(--surface); }
.userchip:hover { border-color: var(--brand-primary); }
.userchip__name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-primary); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.avatar--lg { width: 64px; height: 64px; font-size: 22px; }

/* thin bar at the very top while the next page is being fetched */
.nav-progress { position: fixed; z-index: 2000; top: 0; left: 0; height: 3px; width: 0; background: var(--brand-accent); opacity: 0; pointer-events: none; }
.is-leaving .nav-progress { opacity: 1; width: 90%; transition: width 8s cubic-bezier(.1, .7, .2, 1); }
.is-leaving body { cursor: progress; }

.site-main { flex: 1; padding: 0 0 56px; }
.site-main > .container:first-child { padding-top: 28px; }
.site-main > .container + .container { padding-top: 0; }

.site-footer { padding: 24px 0; border-top: 1px solid var(--line); background: var(--surface); font-size: 14px; color: var(--muted); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.site-footer__brand { display: flex; flex-direction: column; }
.site-footer__brand strong { color: var(--ink); }
.site-footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.site-footer__links a, .site-footer__secure { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; }
.site-footer__links a:hover { color: var(--brand-primary); }

/* ---------- building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.card > h1 { margin-bottom: 8px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head p { margin: 6px 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 1px solid transparent; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .1s, box-shadow .15s, background .15s, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand-accent); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand-accent) 35%, transparent); }
.btn--primary:hover { background: color-mix(in srgb, var(--brand-accent) 90%, #000); }
.btn--outline { background: var(--surface); border-color: var(--line); color: var(--brand-primary); }
.btn--outline:hover { border-color: var(--brand-primary); background: var(--brand-tint); }
.btn--danger { background: var(--surface); border-color: color-mix(in srgb, var(--bad) 35%, #fff); color: var(--bad); }
.btn--danger:hover { background: var(--bad-bg); }
.btn--sm { min-height: 38px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn--lg { min-height: 52px; font-size: 16px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn:focus-visible, a:focus-visible, input:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-primary) 35%, transparent); outline-offset: 2px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-primary); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip--ok { background: var(--ok-bg); color: var(--ok); }
.chip--warn { background: var(--warn-bg); color: var(--warn); }
.chip--bad { background: var(--bad-bg); color: var(--bad); }
.chip--info { background: var(--info-bg); color: var(--info); }
.chip--muted { background: #eef2f7; color: var(--muted); white-space: normal; text-align: center; }

.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 15px; font-weight: 600; }
.alert .icon { margin-top: 2px; }
.alert--success { background: var(--ok-bg); color: var(--ok); }
.alert--error { background: var(--bad-bg); color: var(--bad); }
.alert ul { margin: 0; padding: 0; list-style: none; }
.validation-summary-valid { display: none; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: var(--radius-sm); font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 12%, transparent); }
.field input[type=range] { min-height: 32px; padding: 0; border: 0; box-shadow: none; accent-color: var(--brand-primary); }
/* red border once the traveller left a field with a wrong value (browser validation: required, pattern, type=email) */
.field input:user-invalid { border-color: var(--bad); }
.field__hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.field__password { position: relative; display: block; }
.field__password input { padding-right: 48px; }
.field__toggle { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 48px; height: 100%; border: 0; background: none; color: var(--muted); cursor: pointer; }
.field__toggle:hover, .field__toggle[aria-pressed=true] { color: var(--brand-primary); }
.choice { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; font-size: 14px; cursor: pointer; }
.choice input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--brand-primary); }
.form-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin: 20px 0 0; font-size: 14px; font-weight: 600; }
.hint { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.hint--error { color: var(--bad); font-weight: 600; }
.rating__labels { display: flex; justify-content: space-between; font-weight: 400; color: var(--muted); }
.rating__value { font-size: 20px; font-weight: 800; color: var(--brand-primary); }

.price { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.price small { font-size: 14px; font-weight: 700; }
.price--old { font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: line-through; }
.code { display: inline-block; padding: 4px 12px; border-radius: 8px; border: 1px dashed color-mix(in srgb, var(--brand-primary) 40%, #fff); background: var(--brand-tint); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 16px; font-weight: 700; letter-spacing: .08em; color: var(--brand-primary); }
.codes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.codes .code { font-size: 22px; }

.empty-state { text-align: center; padding: 48px 24px; }
.empty-state img { height: 110px; margin-bottom: 12px; }
.empty-state h1, .empty-state h2 { margin-bottom: 8px; font-size: 22px; }
.empty-state p { color: var(--muted); }
.empty-state .btn { margin-top: 12px; }
.empty-note { text-align: center; padding: 24px 0; }
.statusicon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 16px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-primary); font-size: 28px; }
.statusicon--ok { background: var(--ok-bg); color: var(--ok); }
.statusicon--bad { background: var(--bad-bg); color: var(--bad); }

.spinner { width: 44px; height: 44px; margin: 0 auto 16px; border: 4px solid var(--line); border-top-color: var(--brand-primary); border-radius: 50%; animation: spin .8s linear infinite; }
.spinner--sm { display: inline-block; width: 18px; height: 18px; margin: 0; border-width: 3px; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-note { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0; font-size: 14px; font-weight: 600; color: var(--muted); }

/* placeholders shown while a list is being loaded */
.skeleton { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; min-height: 108px; border-color: transparent; background: #e9edf3; box-shadow: none; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: shimmer 1.4s infinite; }
.skeleton__line { display: block; width: 40%; height: 14px; border-radius: 7px; background: #d8dee8; }
.skeleton__line--wide { width: 70%; height: 20px; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* confirmation dialog (replaces window.confirm) */
.dialog { width: min(420px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow-lg); color: var(--ink); }
.dialog::backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }
.dialog p { margin: 0 0 20px; font-size: 17px; font-weight: 600; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- search page ---------- */
.hero { padding: 56px 0 96px; color: #fff; background:
    radial-gradient(700px 320px at 92% -20%, color-mix(in srgb, var(--brand-accent) 40%, transparent), transparent 70%),
    linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 62%, #4f7cff)); }
.hero h1 { font-size: 44px; color: #fff; }
.hero__lead { margin: 12px 0 0; max-width: 640px; font-size: 18px; color: rgba(255, 255, 255, .82); }
.searchcard { margin-top: 32px; padding: 20px; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.searchcard__widget { min-height: 112px; }
.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: -40px; }
.perk { display: flex; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.perk:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.perk strong { display: block; margin-bottom: 2px; }
.perk span span { font-size: 14px; color: var(--muted); }
.perk__icon { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-primary); font-size: 20px; }

/* ---------- trip header (results, booking) ---------- */
.triphead { padding: 28px 0 20px; margin-bottom: 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.triphead__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.triphead h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.triphead h1 .icon { color: var(--brand-accent); }
/* departure / arrival cities with the same A and B pins as the map */
.tripend { display: inline-flex; flex-direction: column; }
.tripend .eyebrow { margin-bottom: 2px; }
.tripend__city { display: inline-flex; align-items: center; gap: 10px; }
.tripends > .icon { align-self: flex-end; margin-bottom: 6px; }
/* favourite routes: the toggle in the results header, the list on the account page, the chips on the search page */
.favtoggle { display: inline-flex; align-items: center; gap: 6px; align-self: flex-end; margin: 0 0 4px 12px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: 600 13px var(--font); color: var(--muted); text-decoration: none; cursor: pointer; }
.favtoggle:hover { color: var(--bad); border-color: var(--bad); }
.favtoggle .icon { font-size: 16px; }
.favtoggle--on { color: var(--bad); border-color: var(--bad); background: var(--bad-bg); }
.favtoggle--on .icon { fill: currentColor; }
.favlist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.favlist__item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.favlist__route { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; flex: 1; }
.favlist__route:hover { border-color: var(--brand-primary); background: var(--brand-tint); }
.favlist__route .icon--heart { color: var(--bad); fill: currentColor; }
.favlist__route .icon--arrow { color: var(--brand-accent); vertical-align: middle; }
.favlist__remove { margin: 0; }
.favlist--compact { flex-direction: row; flex-wrap: wrap; }
.favlist--compact .favlist__route { padding: 8px 12px; font-size: 14px; }
.hero__favorites { margin-top: 18px; }
.hero__favorites .eyebrow { color: rgba(255, 255, 255, .75); margin-bottom: 8px; }
.triphead__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.daynav { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); overflow: hidden; }
.daynav__day { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 14px; font-weight: 700; }
.daynav__arrow { display: flex; align-items: center; justify-content: center; width: 38px; height: 36px; color: var(--brand-primary); }
a.daynav__arrow:hover { background: var(--brand-tint); }
.daynav__arrow--off { color: #cbd5e1; }
.steps { display: flex; gap: 6px; margin: 0 0 0 auto; padding: 0; list-style: none; counter-reset: step; font-size: 13px; font-weight: 700; color: var(--muted); }
.steps li { counter-increment: step; display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: #eef2f7; }
.steps li::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; font-size: 12px; }
.steps li.current { background: var(--brand-primary); color: #fff; }
.steps li.current::before { color: var(--brand-primary); }
.steps li.done { background: var(--ok-bg); color: var(--ok); }
.steps li.done::before { content: "\2713"; }

/* ---------- results: list next to a map ---------- */
.results { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.results__count { margin: 0 0 12px; font-weight: 700; }
.results__count .muted { font-weight: 400; }
.results__map { position: sticky; top: calc(var(--topbar-height) + 16px); }
.results__list { margin: 0; padding: 0; list-style: none; }
.map { height: 480px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; z-index: 0; box-shadow: var(--shadow-sm); }
.picked { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--ok-bg); color: #14532d; font-size: 14px; }
.picked .icon { margin-top: 2px; color: var(--ok); }

.trip { display: flex; align-items: stretch; gap: 20px; margin-bottom: 12px; padding: 20px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.trip:hover { box-shadow: var(--shadow); }
.trip.selected { border-color: var(--brand-primary); box-shadow: 0 0 0 1px var(--brand-primary), var(--shadow); }
.trip__main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.trip__line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, .8fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.trip__point { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trip__point strong { font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.trip__point span { font-size: 14px; color: var(--ink-2); }
.trip__point--end { text-align: right; }
.trip__duration { position: relative; display: flex; justify-content: center; margin-top: 12px; border-top: 2px dotted #cbd5e1; }
.trip__duration::before, .trip__duration::after { content: ""; position: absolute; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand-primary); }
.trip__duration::before { left: -2px; }
.trip__duration::after { right: -2px; background: var(--brand-primary); }
.trip__duration span { margin-top: -11px; padding: 0 8px; background: var(--surface); font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.trip__duration span:empty { display: none; }
.trip__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.trip__meta span { display: inline-flex; align-items: center; gap: 6px; }
.trip__meta span:first-child { font-weight: 700; color: var(--ink-2); }
/* operator: logo file from wwwroot/images/operators when there is one, otherwise icon + name (Views/Shared/_Operator.cshtml) */
.operator { display: inline-flex; align-items: center; gap: 6px; }
.operator__logo { display: block; height: 22px; width: auto; max-width: 120px; object-fit: contain; }
.trip__buy { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; min-width: 150px; max-width: 190px; padding-left: 20px; border-left: 1px dashed var(--line); text-align: right; }
.trip__buy .btn { margin-top: 10px; }
.trip.skeleton { cursor: default; }

/* ---------- booking ---------- */
.booking { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.booking__summary { position: sticky; top: calc(var(--topbar-height) + 16px); }
.stepnum { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-right: 10px; border-radius: 50%; background: var(--brand-primary); color: #fff; font-size: 13px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.option { position: relative; cursor: pointer; }
.option input { position: absolute; opacity: 0; }
.option__body { display: flex; align-items: center; gap: 12px; height: 100%; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; transition: border-color .15s, background .15s; }
.option__body > .icon { font-size: 22px; color: var(--brand-primary); }
.option__body strong { display: block; font-size: 15px; }
.option__body small { font-size: 13px; color: var(--muted); }
.option input:checked + .option__body { border-color: var(--brand-primary); background: var(--brand-tint); }
.option input:focus-visible + .option__body { outline: 3px solid color-mix(in srgb, var(--brand-primary) 35%, transparent); outline-offset: 2px; }
.option input:disabled + .option__body { opacity: .45; cursor: not-allowed; }
.leg { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px dashed var(--line); }
.leg__label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.leg__stops { margin: 0 0 10px; padding: 0; list-style: none; }
.leg__stops li { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 0 26px; padding-bottom: 14px; }
.leg__stops li:last-child { padding-bottom: 0; }
.leg__stops li::before { content: ""; position: absolute; left: 60px; top: 6px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--brand-primary); background: var(--surface); z-index: 1; }
.leg__stops li:last-child::before { background: var(--brand-primary); }
.leg__stops li:not(:last-child)::after { content: ""; position: absolute; left: 64px; top: 14px; bottom: -8px; width: 2px; background: var(--brand-soft); }
.leg__stops time { font-weight: 800; }
.leg__stops span { display: flex; flex-direction: column; font-size: 14px; color: var(--ink-2); }
.leg__stops strong { font-size: 15px; color: var(--ink); }
.leg__operator { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.totals { display: grid; grid-template-columns: 1fr auto; row-gap: 8px; margin: 0 0 20px; font-size: 15px; }
.totals dt { color: var(--ink-2); }
.totals dd { margin: 0; padding-left: 16px; font-weight: 600; text-align: right; }
.totals__total { padding-top: 12px; border-top: 1px solid var(--line); font-size: 20px !important; font-weight: 800 !important; color: var(--ink) !important; }
.booking__secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- sign in / account ---------- */
.auth { margin-top: 12px; padding: 32px; box-shadow: var(--shadow); }
.auth__logo { display: block; height: 64px; margin-bottom: 12px; }
.auth .muted { margin-bottom: 20px; }
.profile { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.profile__info { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--ink-2); }
.profile__info strong { font-size: 18px; color: var(--ink); }
.profile__info span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- reservations ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow-x: auto; }
.tabs__tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tabs__tab:hover { background: var(--brand-tint); }
.tabs__tab.active { background: var(--brand-primary); color: #fff; }
.tabs__count { padding: 1px 8px; border-radius: 999px; background: #eef2f7; font-size: 12px; color: var(--ink-2); }
.tabs__tab.active .tabs__count { background: rgba(255, 255, 255, .22); color: #fff; }

.ticket { display: flex; align-items: stretch; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.ticket.skeleton { padding: 24px; }
.ticket__date { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; width: 92px; padding: 16px 8px; background: var(--brand-tint); color: var(--brand-primary); text-align: center; }
.ticket__date strong { font-size: 30px; font-weight: 800; line-height: 1; }
.ticket__date span { margin-top: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ticket__body { flex: 1; min-width: 0; padding: 16px 20px; }
.ticket__stops { margin: 0 0 10px; padding: 0; list-style: none; }
.ticket__stops li { position: relative; padding: 0 0 8px 22px; font-weight: 600; }
.ticket__stops li:last-child { padding-bottom: 0; }
.ticket__stops li::before { content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--brand-primary); background: var(--surface); z-index: 1; }
.ticket__stops li:last-child::before { background: var(--brand-primary); }
.ticket__stops li:first-child::after { content: ""; position: absolute; left: 4px; top: 15px; bottom: -7px; width: 2px; background: var(--brand-soft); }
.ticket__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.ticket__meta span { display: inline-flex; align-items: center; gap: 6px; }
.ticket__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ticket__side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; flex: none; width: 190px; padding: 16px; border-left: 2px dashed var(--line); text-align: center; }
.ticket__codelabel { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ticket[data-status="1"] .ticket__date, .ticket[data-status="3"] .ticket__date { background: #eef2f7; color: var(--muted); }
.ticket[data-status="1"] .ticket__stops, .ticket[data-status="3"] .ticket__stops { color: var(--ink-2); }

/* ---------- routes, courses, stops ---------- */
.searchbox { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 0 16px; border: 1px solid #cbd5e1; border-radius: 12px; background: var(--surface); color: var(--muted); }
.searchbox:focus-within { border-color: var(--brand-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 12%, transparent); }
.searchbox input { flex: 1; min-width: 0; height: 48px; border: 0; outline: none; background: none; font: inherit; color: var(--ink); }
.list-title { margin: 24px 0 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.link-list { margin: 0; padding: 0; list-style: none; }
.rowlink { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; padding: 16px 18px; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.rowlink:hover { border-color: var(--brand-primary); box-shadow: var(--shadow); transform: translateY(-1px); }
.rowlink__icon { display: flex; align-items: center; justify-content: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-primary); font-size: 19px; }
.rowlink__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rowlink__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.rowlink__meta span { display: inline-flex; align-items: center; gap: 6px; }
.rowlink__chevron { color: #94a3b8; font-size: 18px; }
.course__line { display: flex; align-items: center; gap: 16px; }
.course__line > .icon { color: #94a3b8; }
.course__point { display: flex; flex-direction: column; min-width: 0; }
.course__point strong { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.course__point span { font-size: 14px; color: var(--ink-2); }
.course__days { display: flex; flex-wrap: wrap; gap: 4px; }
.day { min-width: 30px; padding: 2px 6px; border-radius: 6px; background: #eef2f7; font-size: 12px; font-weight: 700; text-align: center; color: #aab4c3; }
.day--on { background: var(--brand-soft); color: var(--brand-primary); }

.stops { margin: 0; padding: 12px; list-style: none; }
.stops__item { position: relative; display: grid; grid-template-columns: 52px 28px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.stops__item:hover, .stops__item.selected { background: var(--brand-tint); }
.stops__item time { font-weight: 800; }
.stops__item .map-pin { position: relative; z-index: 1; margin: 0 auto; }
.stops__item:not(:last-child)::after { content: ""; position: absolute; left: 89px; top: 50%; height: 100%; width: 2px; background: var(--brand-soft); }

.bus { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.bus .map { flex: 1 1 100%; margin-bottom: 0; }
.bus__status { flex: 1; display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; font-weight: 600; }
.bus__status .icon { color: var(--brand-primary); font-size: 20px; }

.map-pin { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 2px solid #fff; border-radius: 50%; font: 700 12px "Inter", system-ui, sans-serif; color: #fff; background: #475569; box-shadow: 0 2px 6px rgba(15, 23, 42, .4); }
.map-pin--dot { width: 16px; height: 16px; margin: 6px; }
.map-pin--a, .map-pin--start { background: #16a34a; }
.map-pin--b { background: #dc2626; }
/* course page, once the bus is located: stops already passed and the next stop */
.map-pin--passed { background: #dc2626; }
.map-pin--next { background: #f59e0b; }
.map-pin--bus { width: 44px; border-radius: 14px; margin-left: -8px; background: #facc15; color: #1c1917; }
/* permanent "Plecare" / "Sosire" labels of the highlighted stations on the search results map */
.leaflet-tooltip.map-label { padding: 4px 10px; border: 0; border-radius: 999px; font: 500 12px "Inter", system-ui, sans-serif; color: #fff; box-shadow: 0 2px 8px rgba(15, 23, 42, .3); }
.leaflet-tooltip.map-label strong { font-weight: 700; }
.leaflet-tooltip.map-label--a { background: #16a34a; }
.leaflet-tooltip.map-label--b { background: #dc2626; }
.leaflet-tooltip.map-label--a.leaflet-tooltip-top::before { border-top-color: #16a34a; }
.leaflet-tooltip.map-label--b.leaflet-tooltip-bottom::before { border-bottom-color: #dc2626; }

.terms { overflow-wrap: anywhere; }

/* ---------- tablets ---------- */
@media (max-width: 980px) {
    .results, .booking { grid-template-columns: minmax(0, 1fr); }
    .results__map { position: static; order: -1; }
    .map { height: 260px; }
    .booking__summary { position: static; }
}

/* ---------- phones: the navigation becomes a bottom tab bar ---------- */
@media (max-width: 760px) {
    :root { --topbar-height: 58px; }
    body { padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom)); }
    h1 { font-size: 23px; }
    .container { padding: 0 16px; }
    .card { padding: 18px; }
    /* no backdrop-filter here: it would make the header the containing block of the fixed tab bar below */
    .topbar { backdrop-filter: none; background: var(--surface); }
    .topbar__inner { justify-content: space-between; }
    .logo img { height: 34px; }
    .userchip { padding: 3px; border: 0; }
    .userchip__name { display: none; }
    .topbar__user .btn { display: none; }
    .mainnav { position: fixed; z-index: 1100; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-height) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); gap: 0; margin: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
    .mainnav a { flex: 1; flex-direction: column; justify-content: center; gap: 3px; padding: 4px; border-radius: 0; font-size: 11px; color: var(--muted); }
    .mainnav a .icon { font-size: 20px; }
    .mainnav a:hover, .mainnav a.active { background: none; color: var(--brand-primary); }
    .mainnav__account { display: flex !important; }
    .site-footer__inner { flex-direction: column; align-items: flex-start; }

    .hero { padding: 32px 0 72px; }
    .hero h1 { font-size: 30px; }
    .hero__lead { font-size: 16px; }
    .searchcard { margin-top: 24px; padding: 14px; border-radius: 16px; }

    .steps { margin-left: 0; }
    .trip { flex-direction: column; gap: 14px; padding: 16px; }
    .trip__point strong { font-size: 21px; }
    .trip__buy { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 10px; max-width: none; padding: 14px 0 0; border-left: 0; border-top: 1px dashed var(--line); }
    .trip__buy .btn { margin: 0 0 0 auto; }
    .trip__buy .chip { margin-left: auto; }

    .ticket { flex-wrap: wrap; }
    .ticket__date { width: 76px; }
    .ticket__body { flex: 1 1 0; padding: 14px 16px; }
    .ticket__side { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; justify-content: space-between; width: auto; padding: 12px 16px; border-left: 0; border-top: 2px dashed var(--line); }
    .ticket__codelabel { display: none; }
    .auth { padding: 24px 20px; }
    .course__line { gap: 10px; }
}
