/**
 * Base layer and shared components.
 *
 * Everything visual in web2 lives in a stylesheet, never in a <style> block in
 * a page. That is not tidiness for its own sake: it is what makes
 * `style-src 'self'` possible, and the old web cannot have a strict CSP while
 * 7,365 lines of CSS sit inside its PHP files.
 *
 * Mobile-first: base rules target the phone, media queries add the desktop.
 * The old web is the other way round, which is why its mobile rules are a pile
 * of overrides.
 */

/* ── Reset ──────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;

    /*
     * No double-tap zoom.
     *
     * On a phone every tap waits to see whether a second one follows, and a
     * second tap anywhere zooms the page. On a form of chips, counters and
     * address rows that is a steady source of accidents: tapping - or +
     * twice in a row is the normal way to use a counter, and the old page
     * answers it by jumping to 2x.
     *
     * It used to sit on `html` alone. That is enough on Chrome; on iOS Safari
     * the property does not reach the thing that was tapped, so a second tap
     * on a chip still zoomed. The hotel panel already puts it on every
     * element for that reason (hotel/new-order.php:149, kk/assets/css/admin.css:51).
     *
     * `manipulation` turns off exactly that gesture and nothing else. Panning
     * and, importantly, pinch-zoom both stay: the page must still be
     * magnifiable, which is why the viewport meta is left alone - no
     * `user-scalable=no`, no `maximum-scale`.
     *
     * The map sets a more specific value (leaflet.css), so this does not
     * reach it: `*` loses to `.leaflet-container`.
     */
    touch-action: manipulation;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-background);
    color: var(--color-text-primary);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
}

img, svg {
    display: block;
    max-width: 100%;
}

/**
 * The hidden attribute has to win.
 *
 * Its browser default is display:none at specificity 0,1,0, so every single
 * `.something { display: flex }` below silently overrides it. The whole form
 * relies on `hidden` to stay collapsed, and without this rule the date fields,
 * the child seats and all four vehicle classes are on screen from the first
 * paint — and the offers page shows loading, waiting, the list and the closed
 * state stacked on top of each other.
 *
 * !important is right here rather than lazy: `hidden` is not styling, it is the
 * element saying it is not part of the page yet, and no layout rule may argue.
 */
[hidden] {
    display: none !important;
}

/**
 * Available to a screen reader, absent from the screen.
 *
 * Used for labels the visual design conveys another way — the route control
 * says "pickup" with a green dot, which a screen reader cannot see. Clipping
 * rather than `display: none`, because the latter removes it from the
 * accessibility tree too and the input ends up with no label at all.
 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* The icon sprite is a set of definitions, not content. */
.sprite {
    display: none;
}

/**
 * Icons are stroked outlines by default.
 *
 * `fill` has to be declared here rather than on the <symbol>, because a
 * presentation attribute on the symbol would beat this inherited value and
 * nothing could ever fill an icon — which the rating stars need to do.
 */
.icon,
.tile__icon,
.stars__icon {
    fill: none;
}

.icon {
    width: 20px;
    height: 20px;
}

/**
 * The Font Awesome glyphs, which are not square.
 *
 * They come on their own grids — 512 tall, 384 to 640 wide — so a box of
 * equal sides would fit the widest of them by its width and leave it a
 * quarter shorter than its neighbours. The old web's <i> takes its height
 * from the font size and lets the width follow; this does the same, so
 * every size set elsewhere is read as a height.
 *
 * Deliberately one element and two classes: that is a specificity above
 * every `.somewhere .icon` sizing rule below, which is what lets this hold
 * wherever one of these icons is used, whatever the order of the file.
 */
svg.icon.icon--solid {
    width: auto;
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* The booking page is the exception: its map column is sized to the viewport,
   so it takes <main> down to the pixel the header ends at. */
.main:not(.main--map):not(.main--flush) {
    padding: var(--spacing-lg) 0 var(--spacing-2xl);
}

/* Keyboard users get the link; everyone else never sees it. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-accent);
    color: var(--color-on-accent);
    border-radius: 0 0 var(--radius-md) 0;
}

.skip-link:focus {
    left: 0;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

/**
 * The bar every page behind sign-in carries, ported from style.css:433.
 *
 * Not a fixed height: 16px of padding around the 42px logo, which is where the
 * 75px in --header-height comes from. Translucent with a blur, so the content
 * scrolling under it stays faintly visible — the one thing here that cannot be
 * done with a solid background.
 */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-border);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .header {
        background: rgba(255, 255, 255, 0.95);
        border-bottom-color: transparent;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* The old web's logo, to the pixel: the same rule appears in style.css:661 for
   the pages behind sign-in and again in auth/login.php:424 for the landing. */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* The app icon, at the size and corner radius the old accent tile had
   (style.css:671). No background of its own: the image is the square. */
.logo__mark {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

/* ── Header: navigation ─────────────────────────────────────────────────── */

/* Four links on a desktop, gone below 768 where the burger takes over
   (style.css:683 and :1439). */
.nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-link {
    display: flex;
    align-items: center;
    /* Narrower than the usual 8px: over there the icon is a glyph followed by
       a space, which comes to about six pixels of air. */
    gap: 6px;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    background: var(--color-surface-variant);
    color: var(--color-text-primary);
}

.nav-link .icon {
    width: 16px;
    height: 16px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* The two store links read as navigation over there, not as buttons
   (header.php:343): same shape as a nav link, with the brand mark. The marks
   fill themselves — see private/icons.php. */

/**
 * The passenger's own corner: a 40px circle with the first letter of the name,
 * replaced by the photo once the user document has been read (header.php:352).
 */
.user-avatar {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    overflow: hidden;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: #ffffff;
    font-weight: 600;
    transition: transform var(--transition-fast);
}

.user-avatar:hover {
    transform: scale(1.05);
}

.user-avatar[aria-current="page"] {
    box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-accent);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar .icon {
    width: 20px;
    height: 20px;
}

/* ── Header: badges ─────────────────────────────────────────────────────── */

/**
 * Two counters, both ported from style.css:856.
 *
 * Red on the messages link for unread replies, amber on the rides link for
 * orders still collecting offers — the same two colours the old web uses, and
 * the amber one carries black text because amber on white is unreadable.
 */
.nav-badge,
.messages-badge,
.menu-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--color-error);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
}

.nav-badge {
    margin-left: 6px;
}

/* On an icon button the counter sits over the corner instead of beside the
   label, so it needs the button to be its containing block. */
.messages-badge,
.menu-badge {
    position: absolute;
    top: -4px;
    right: -4px;
}

.menu-badge {
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.65rem;
}

/* ── Header: the phone's three buttons and its menu ─────────────────────── */

.mobile-nav-btn,
.mobile-menu-btn {
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: var(--radius-full);
    background: var(--color-surface-variant);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.mobile-menu-btn {
    width: 44px;
    height: 44px;
    color: var(--color-text-primary);
}

.mobile-nav-btn:hover,
.mobile-menu-btn:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

.mobile-nav-btn[aria-current="page"],
.mobile-menu-btn[aria-expanded="true"] {
    background: var(--color-accent);
    color: var(--color-on-accent);
}

.mobile-nav-btn .icon,
.mobile-menu-btn .icon {
    width: 18px;
    height: 18px;
}

.mobile-menu {
    position: relative;
    display: none;
}

.mobile-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    overflow: auto;
    min-width: 220px;
    max-height: calc(100vh - var(--header-height) - 16px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    animation: menu-slide-down var(--transition-fast) ease;
}

@keyframes menu-slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--color-text-primary);
    transition: background var(--transition-fast);
}

.mobile-menu-item:hover {
    background: var(--color-surface-variant);
}

.mobile-menu-item[aria-current="page"] {
    background: var(--color-accent);
    color: var(--color-on-accent);
}

/**
 * A glyph column 20 pixels wide, so the labels line up under each other.
 *
 * The old menu does it with `width: 20px; text-align: center` on the <i>
 * (style.css:1091) — a box, not a size: the glyph keeps its own proportions
 * inside it and is centred. Here the box is 20 by 16 and every glyph fits
 * itself into it, which comes to the same thing, including for the wide ones.
 *
 * `svg.icon` rather than `.icon`: an auto width is what the Font Awesome
 * glyphs are given everywhere else, and a column is the exception.
 */
.mobile-menu-item svg.icon {
    width: 20px;
    height: 16px;
}

.mobile-menu-item .nav-badge {
    margin-left: auto;
}

.mobile-menu-divider {
    height: 1px;
    margin: 4px 0;
    background: var(--color-border);
}

.mobile-menu-lang {
    width: 100%;
    border: none;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mobile-menu-lang__now {
    margin-left: auto;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* A form, because signing out is a POST — see auth/logout.php. It has to look
   like the menu items it sits among. */
.mobile-menu-form {
    display: block;
}

.mobile-menu-form button {
    width: 100%;
    border: none;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

/* The old web's two helpers (style.css:1115), kept by name: the bar is the one
   place where the desktop and the phone show different controls rather than
   the same controls rearranged. */
.desktop-only {
    display: flex;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .nav {
        display: none;
    }

    .mobile-nav-btn,
    .mobile-menu-btn,
    .mobile-menu {
        display: flex;
    }

    .user-menu {
        gap: 10px;
    }
}

/* ── The two strips under the bar ───────────────────────────────────────── */

/**
 * An order collecting offers, and a trip already running.
 *
 * Ported from style.css:456 and :556, which are the same rule written twice in
 * two colours. Here it is one rule and a colour per kind.
 *
 * Measured on the old page: the strip is 79px tall on a desktop and 68px on a
 * phone, which is 14px (12 on a phone) of padding around two lines of text and
 * the 2px border. Those two numbers are what --banner-stack below hands to the
 * pages that fill the viewport, so they have to stay true — which is why both
 * lines are kept to one line each rather than being allowed to wrap.
 *
 * Not sticky, like the bar above it: the old strips scroll away with the page
 * (style.css:456 sets no position), and a passenger reading a long page does
 * not need to be told twice.
 */
.banner {
    padding: 14px 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.banner--offers {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.banner--trip {
    background: linear-gradient(135deg, var(--color-accent), #00a344);
    box-shadow: 0 4px 16px rgba(0, 200, 83, 0.4);
}

/* Black on both gradients, in both themes: the orange and the green are the
   same two colours whatever the page behind them is doing. */
.banner__link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 16px;
    color: #000000;
    text-decoration: none;
}

.banner__link:hover {
    opacity: 0.9;
}

.banner__dot {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    animation: banner-pulse 1.5s ease-in-out infinite;
}

@keyframes banner-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.3);
        box-shadow: 0 0 16px rgba(255, 255, 255, 0.8);
    }
}

@media (prefers-reduced-motion: reduce) {
    .banner__dot {
        animation: none;
    }
}

.banner__info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

/* One line each, both of them: a route long enough to wrap would make the
   strip taller than --banner-stack says it is, and the page below would then
   be the wrong height. The old page has that bug; it only hides it by being
   1200px wide. */
.banner__status,
.banner__route {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.banner__status {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.banner__route {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.75);
}

/* The old arrow is Font Awesome's chevron in a 16px line box. */
.banner__link .icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/**
 * How much room the strips are taking.
 *
 * Set here rather than from script, so nothing writes a style attribute: the
 * script only puts a class on <body>. Both numbers are the measured heights of
 * the strips above.
 */
body.has-banner-offers,
body.has-banner-trip {
    --banner-stack: 79px;
}

body.has-banner-offers.has-banner-trip {
    --banner-stack: 158px;
}

@media (max-width: 768px) {
    .banner {
        padding: 12px;
    }

    .banner__link {
        gap: 12px;
        padding: 0 8px;
    }

    /* Left-aligned under each other, because at this width the two lines are
       no longer the same length (style.css:536). */
    .banner__info {
        align-items: flex-start;
        gap: 2px;
    }

    .banner__status {
        font-size: 0.8rem;
    }

    .banner__route {
        max-width: 180px;
        font-size: 0.75rem;
    }

    body.has-banner-offers,
    body.has-banner-trip {
        --banner-stack: 68px;
    }

    body.has-banner-offers.has-banner-trip {
        --banner-stack: 136px;
    }
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    min-height: 44px; /* comfortable touch target */
    padding: 0 var(--spacing-lg);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    background: none;
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn--primary {
    background: var(--color-accent);
    color: var(--color-on-accent);
}

.btn--primary:hover:not(:disabled) {
    background: var(--color-accent-hover);
}

/**
 * A disabled primary button loses the fill entirely.
 *
 * Dimming green with opacity leaves a dark green button, which still looks
 * pressable and so reads as broken rather than as not-yet-ready. Dropping to a
 * flat surface says plainly that the action is waiting on something — which on
 * the booking form is true until both addresses are known.
 */
.btn--primary:disabled {
    background: var(--color-surface-variant);
    color: var(--color-text-muted);
    opacity: 1;
}

.btn--ghost {
    color: var(--color-text-secondary);
}

.btn--ghost:hover:not(:disabled) {
    background: var(--color-surface-hover);
    color: var(--color-text-primary);
}

.btn--outline {
    border-color: var(--color-border);
}

.btn--outline:hover:not(:disabled) {
    border-color: var(--color-accent);
}

/* Current page in the header. Driven by aria-current, so the state a screen
   reader announces and the state a sighted user sees cannot drift apart. */
.btn[aria-current="page"] {
    background: var(--color-surface-hover);
    color: var(--color-text-primary);
}

.btn--block {
    width: 100%;
}

.btn--lg {
    min-height: 52px;
    font-size: var(--font-size-base);
}

/* ── Card ───────────────────────────────────────────────────────────────── */

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
}

/* For a card whose contents supply their own frame — the route control already
   has a border, and nesting it inside a padded card draws two. */
.card--flush {
    padding: var(--spacing-md);
}

.card__title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.card__body {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

/* Metrics from the old page (auth/login.php:1705), including the full-bleed
   48px padding: this strip is not inside the content container there. */
.footer {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: 16px 48px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .footer {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
        text-align: center;
    }
}

.footer__links a {
    margin-left: 20px;
    color: var(--color-text-secondary);
    text-decoration: none;
}

.footer__links a:hover {
    color: var(--color-text-primary);
}

@media (max-width: 768px) {
    .footer__links a:first-child {
        margin-left: 0;
    }
}

/* ── Forms ──────────────────────────────────────────────────────────────── */

.field {
    margin-bottom: var(--spacing-lg);
}

.field__label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.field__error {
    margin-top: var(--spacing-xs);
    color: var(--color-error);
    font-size: var(--font-size-sm);
}

.input {
    width: 100%;
    /* 16px minimum: anything smaller makes iOS Safari zoom on focus, which
       looks like the page jumping away from the field being tapped. */
    min-height: 52px;
    padding: 0 var(--spacing-md);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-lg);
    background: var(--color-input-bg);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: var(--font-size-base);
    transition: border-color var(--transition-fast);
}

.input:focus {
    border-color: var(--color-accent);
}

.input::placeholder {
    color: var(--color-text-muted);
}

.input--cc {
    width: auto;
    flex-shrink: 0;
    padding-right: var(--spacing-sm);
}

/*
 * The country-code picker (private/countries.php): a button with the flag and
 * the code, opening a searchable list under it, as on the old card
 * (auth/login.php:1040).
 */
.cc-picker {
    position: relative;
    flex-shrink: 0;
}

.cc-picker__button {
    display: flex;
    height: 100%;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

/* The caret, drawn rather than taken from the sprite, which this card's pages
   assemble one by one. */
.cc-picker__button::after {
    content: '';
    width: 0;
    height: 0;
    margin-left: 2px;
    border-top: 5px solid var(--color-text-muted);
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.cc-picker__button[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.cc-picker__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 40;
    display: flex;
    width: min(300px, calc(100vw - 48px));
    max-height: 300px;
    flex-direction: column;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.cc-picker__panel[hidden] {
    display: none;
}

.cc-picker__search {
    flex: 0 0 auto;
    width: auto;
    min-height: 40px;
    margin: 8px;
    font-size: 0.9rem;
}

/* Both lists scroll as one, under a search box that stays put. */
.cc-picker__scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.cc-picker__list {
    margin: 0;
    padding: 0 4px 4px;
    list-style: none;
}

.cc-picker__list--all {
    padding-top: 4px;
    border-top: 1px solid var(--color-border);
}

.cc-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--color-text-primary);
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
}

.cc-item:hover,
.cc-item:focus-visible {
    background: var(--color-surface-variant);
    outline: none;
}

.cc-item[aria-selected="true"] {
    color: var(--color-accent);
    font-weight: 600;
}

.cc-item__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-item__dial {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.cc-item--custom .cc-item__name {
    color: var(--color-accent);
    font-weight: 600;
}

.cc-picker__empty {
    margin: 0;
    padding: 12px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-align: center;
}

/**
 * The code field.
 *
 * The old card draws six separate boxes (auth/login.php:1254), and this is one
 * field dressed to match them: the same 56px height, 1.5rem bold digits and
 * 2px border, with the digits spaced so they read as six slots. One field is
 * what makes autocomplete="one-time-code" work, and that autofill is worth
 * more on a phone than six real boxes.
 */
/* The QR card still asks for the code in one field. */
.input--code {
    min-height: 56px;
    border-width: 2px;
    background: var(--color-surface-variant);
    text-align: center;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    letter-spacing: 0.4em;
    text-indent: 0.4em;
}

/*
   Six boxes, the old card's own (auth/login.php:1247). A fieldset so the
   legend can name them without drawing a border.
*/
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 0 0 20px;
    padding: 0;
    border: none;
    min-width: 0;
    min-inline-size: 0;
}

.otp-input {
    box-sizing: border-box;
    width: 48px;
    height: 56px;
    padding: 0;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-variant);
    color: var(--color-text-primary);
    text-align: center;
    font-family: inherit;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    outline: none;
    transition: border-color var(--transition-fast);
}

.otp-input:focus {
    border-color: var(--color-accent);
}

.phone-row {
    display: flex;
    gap: 0.75rem; /* auth/login.php:1007 */
}

/* ── Auth steps ─────────────────────────────────────────────────────────── */

.container--narrow {
    max-width: 420px;
}

/**
 * A step is a card, the same card the old web shows as a modal.
 *
 * Values from auth/login.php:942 — surface, 20px corners, 32px of padding,
 * dropping to 24px/20px on a narrow phone (:955). The old page dims the screen
 * behind it because it is a dialog over a landing page; here the step *is* the
 * page, so there is nothing to dim, and the card is centred instead.
 */
.auth-step {
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-xl);
    border-radius: 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

@media (max-width: 480px) {
    .auth-step {
        margin: var(--spacing-md) 0;
        padding: var(--spacing-lg) var(--spacing-md);
    }
}

/* Centred, and 700 rather than 800: auth/login.php:993. */
.auth-title {
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
}

.auth-hint {
    margin-bottom: 28px; /* auth/login.php:990 */
    color: var(--color-text-secondary);
    font-size: 0.95rem; /* auth/login.php:1001 */
    text-align: center;
}

/* The 20px above is the old gap between the verify button and the
   alternative route (auth/login.php:3024). */
.auth-actions {
    margin: 20px 0 0;
}

/*
   The second route to the same sign-in, as the old card draws it
   (auth/login.php:1300): accent-outlined rather than filled, because it is an
   alternative and not the thing to do. 2px of border and 0.95rem, and the
   height comes from the padding exactly as it does there.

   Disabled it goes grey rather than translucent, which is also the old
   behaviour (:1322) and the right one here: it spends its first twenty seconds
   disabled, and a half-faded button reads as a glitch.
*/
.btn--alt {
    min-height: 0;
    padding: 12px 20px;
    /* The old button has no line-height of its own, so its height is the
       browser's own line box: 47px, which is what this restores. web2's
       buttons normally take the page's 1.5 and are held to a min-height
       instead, and this is the one place where the height is the padding. */
    line-height: normal;
    border-width: 2px;
    border-color: var(--color-accent);
    color: var(--color-accent);
    font-size: 0.95rem;
}

/* The old glyph here is a font icon, so it is exactly as tall as the words
   beside it. web2's 20px box would make this one button 4px taller than the
   old, which is the whole difference between the two. */
.btn--alt .icon {
    width: 1em;
    height: 1em;
}

/* The old rgba(34, 197, 94, 0.1) under another name (:1318). */
.btn--alt:hover:not(:disabled) {
    background: var(--color-accent-light);
}

.btn--alt:disabled {
    border-color: var(--color-border);
    color: var(--color-text-muted);
    opacity: 1;
}

/* The way out of a step, above its title. auth/login.php:1274. */
.btn-back {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: 20px; /* auth/login.php:1283 */
    padding: 0;
    border: none;
    background: none;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.btn-back:hover {
    color: var(--color-text-primary);
}

/* A checkbox and its label on one line. auth/login.php:1163. */
.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
}

.check-row input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--color-accent);
}

/* The SMS consent: a paragraph, not a label, so the box sits on its first
   line. auth/setup.php:140. */
.check-row--consent {
    align-items: flex-start;
    font-size: 0.8rem;
    line-height: 1.5;
}

.check-row--consent input {
    flex: 0 0 auto;
    margin-top: 2px;
}

.check-row--consent a {
    color: var(--color-text-primary);
    text-decoration: underline;
}

/* Secure / Verified / No card, under a rule. auth/login.php:1329. */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0 0;
    padding: var(--spacing-lg) 0 0;
    border-top: 1px solid var(--color-border);
    list-style: none;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* The badge icons are the one place green carries the meaning. */
.trust-badge .icon {
    width: 16px;
    height: 16px;
    color: var(--color-accent);
}

.legal-text {
    margin-top: var(--spacing-lg);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    text-align: center;
}

.legal-text a {
    color: var(--color-text-secondary);
    text-decoration: underline;
}

.logout-form {
    margin: 0;
}

/* Invisible reCAPTCHA. It anchors a badge here; the widget itself is an
   overlay, so this element only needs to exist, not to take up space. */
#recaptcha-container {
    display: flex;
    justify-content: center;
}

/* ── Booking form ───────────────────────────────────────────────────────── */

.container--form {
    max-width: 560px;
}

/* Wider than a form, narrower than the page: what the offers page is laid out
   in over there (bids.php:1286 — `container container-md`). */
.container--md {
    max-width: 800px;
}

.form-title {
    margin: var(--spacing-lg) 0;
    font-size: var(--font-size-2xl);
    font-weight: 800;
    letter-spacing: -0.02em;
}

/**
 * Form left, map right, one column on a tablet (index.php:1290).
 *
 * The floor is the viewport minus the header, because the map is the one
 * element on this site that has to be given a height rather than take one from
 * its contents. The old page hardcodes 70px; here the header's own token says
 * how tall it is, which is also 56px on a small screen.
 *
 * And minus whatever the strips under the bar are taking: this is the page a
 * passenger with an open order lands on, so the orange strip is at its most
 * likely right here.
 *
 * Not a locked height. A locked height with overflow hidden is what made the
 * left column scroll on its own while the map stayed put. If the form is
 * taller than the floor, the row grows and the page is what scrolls — both
 * columns move together.
 */
.flott-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - var(--header-height) - var(--banner-stack));
}

@media (max-width: 1024px) {
    .flott-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: calc(100vh - var(--header-height) - var(--banner-stack));
    }
}

/**
 * The booking page, on a desktop, fills the screen and then the page.
 *
 * The two columns used to measure themselves against the viewport, which
 * left the footer hanging 52px below it — a scrollbar on a page that had
 * nothing to scroll to — and, separately, gave the form its own scrollbar
 * the moment it was a few pixels too tall. The old page has the first of
 * those, and worse: its footer carries a logo, a tagline and two store
 * buttons (includes/footer.php), so it hangs by a couple of hundred pixels.
 *
 * The body still takes at least the viewport and the flow divides it: the
 * bar, the strips and the footer take what they take, main takes the rest,
 * the columns fill main. Deliberately not
 * `calc(100vh - header - banners - footer)` — the footer's height is not a
 * constant. It is one row of links that wraps to two in the wider languages.
 *
 * `min-height`, not `height`: when the form is taller than what is left, the
 * page grows and the window is the only thing that scrolls. `min-height: 0`
 * on main was what let a flex item shrink below its content and invent a
 * second scrollbar inside the column.
 *
 * Only from 1025px, which is where the layout is two columns: below that
 * the page is already a column that scrolls as one.
 */
@media (min-width: 1025px) {
    .page-onescreen {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .page-onescreen main {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .page-onescreen .flott-layout {
        flex: 1;
        min-height: 100%;
    }

    /*
     * The columns default to `100vh - bar`, which is the leftover on the
     * landing page (no footer in that fold). Here the footer is in the
     * flow, so that floor is 52px too tall and the page starts with a
     * scrollbar that has nothing to show but the footer.
     */
    .page-onescreen .booking-side,
    .page-onescreen .map-side {
        min-height: auto;
    }

    .page-onescreen .booking-side {
        padding: 8px 40px;
    }

    .page-onescreen .vehicle-section {
        margin-bottom: 8px;
    }

    .page-onescreen .comment-field textarea {
        min-height: 0;
        height: 48px;
    }
}

/* With the header inside the left column instead of above both, the layout has
   the whole viewport to measure against (auth/login.php:272). */
.main--full .flott-layout,
.main--full .booking-side,
.main--full .map-side {
    min-height: 100vh;
}

@media (max-width: 1024px) {
    .main--full .flott-layout {
        height: auto;
        min-height: 100vh;
    }

    .main--full .booking-side {
        height: auto;
        min-height: 0;
    }
}

/**
 * `min-width: 0` is load-bearing, not tidying.
 *
 * A grid item sizes itself to its content unless told otherwise, and this
 * column contains a row of destination tags that scrolls sideways. Without
 * this the column grows to the full width of that row — 927px on a 390px
 * phone — and the whole page scrolls horizontally. The old page hides the
 * symptom with `overflow-x: hidden` on <body> (auth/login.php:1760); this
 * removes the cause.
 */
.booking-side {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: calc(100vh - var(--header-height) - var(--banner-stack));
    padding: 24px 48px;
    background: var(--color-background);
}

@media (max-width: 1024px) {
    .booking-side {
        min-height: 0;
        height: auto;
    }
}

@media (max-width: 768px) {
    .booking-side {
        padding: 20px 16px;
    }
}

/* A column, not a block: it is what lets the features grid at the bottom use
   `margin-top: auto` and sit at the foot of the fold. */
.booking-card {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.booking-header {
    margin-bottom: 20px;
}

.booking-header h1 {
    margin-bottom: 8px;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.1;
}

.booking-header h1 .highlight {
    color: var(--color-accent);
}

.booking-header p {
    max-width: 500px;
    color: var(--color-text-secondary);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .booking-header {
        margin-bottom: 16px;
    }

    .booking-header h1 {
        font-size: 1.4rem;
    }

    /**
     * The landing page keeps its heading at full size on a phone.
     *
     * It is the first thing a visitor reads, and only the page for someone
     * already signed in shrinks it (auth/login.php:452 against index.php:63),
     * where the map matters more than the words above it.
     */
    .page-landing .booking-header {
        margin-bottom: 20px;
    }

    .page-landing .booking-header h1 {
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }
}

.order-form {
    width: 100%;
    max-width: 100%;
}

/* ── The map ────────────────────────────────────────────────────────────── */

.map-side {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height) - var(--banner-stack));
    overflow: hidden;
    background: var(--color-surface);
    z-index: 0;
}

/* Below 1024px the map moves into the form column, and the one that is not in
   the layout is not in the document's way either — map.js never initialises a
   container it finds hidden. */
@media (max-width: 1024px) {
    .map-side {
        display: none;
    }
}

.map-side .map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.map-side .map[hidden] {
    display: none;
}

/* Back to the app promo (auth/login.php:2747). Over the map rather than beside
   it, because the map fills the column. */
.map-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.15s ease;
}

.map-close-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}

.map-close-btn[hidden] {
    display: none;
}

.map-close-btn .icon {
    width: 16px;
    height: 16px;
}

/* Below 1024px the promo column is gone, so this is where the route appears —
   and like that column, it stays empty-handed until there is one. An empty map
   of Reykjavík under the form answers no question anyone asked. */
.mobile-map-section {
    display: none;
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-surface);
}

@media (max-width: 1024px) {
    .mobile-map-section:not([hidden]) {
        display: block;
    }
}

.mobile-map-section .map {
    width: 100%;
    height: 250px;
}

/* Leaflet draws its own attribution, and it has to stay legible on both
   themes without being the brightest thing in the corner. */
.leaflet-control-attribution {
    background: rgba(0, 0, 0, 0.7) !important;
    color: #888 !important;
    font-size: 10px !important;
}

.leaflet-control-attribution a {
    color: #aaa !important;
}

[data-theme="light"] .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #666 !important;
}

[data-theme="light"] .leaflet-control-attribution a {
    color: #333 !important;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .leaflet-control-attribution {
        background: rgba(255, 255, 255, 0.9) !important;
        color: #666 !important;
    }

    :root:not([data-theme]) .leaflet-control-attribution a {
        color: #333 !important;
    }
}

/* The route markers. The old page writes these metrics into a style attribute
   (index.php:2043); here they are a class, so the policy needs no exception
   for inline styles to draw a map. */
.map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 3px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.map-marker--from {
    background: var(--color-accent);
}

.map-marker--to {
    background: #ff4444;
}

/* The car, as the old trip page draws it: an orange disc, white ring, dark
   glyph (trip.php:1526). Bigger than the route markers because it is the one
   thing on this map that moves. */
.map-marker--driver {
    width: 40px;
    height: 40px;
    background: #ff6b00;
    color: #1a1a1a;
}

.map-marker--driver .icon {
    width: 22px;
    height: 22px;
}

/* The passenger, as a dot rather than a pin: it is where they already are, so
   it needs no label (trip.php:1044). */
.map-marker--user {
    width: 18px;
    height: 18px;
    background: #4285f4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* ── The route panel ───────────────────────────────────────────────────── */

/**
 * Distance, duration and price, over the map (index.php:1409).
 *
 * The price here is the selected class's, which is why the vehicle pills carry
 * none: one number on the page, and it changes when the choice does.
 */
.route-info {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    padding: 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

[data-theme="light"] .route-info {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .route-info {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
}

/**
 * The same three numbers over the desktop map (auth/login.php:2750).
 *
 * The landing page's panel, not the booking page's: wider padding, the value in
 * the accent colour and a hairline between the three, because here it sits in
 * the middle of a half-screen column rather than on a phone.
 */
.map-overlay {
    position: absolute;
    top: 40px;
    left: 40px;
    right: 40px;
    z-index: 1000;
    padding: 24px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
}

[data-theme="light"] .map-overlay {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .map-overlay {
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
}

.map-overlay[hidden] {
    display: none;
}

.route-info-bar {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.route-info-bar .route-stat {
    padding: 0 20px;
}

.route-info-bar .route-stat:not(:last-child) {
    border-right: 1px solid var(--color-border);
}

.route-info-bar .value {
    margin-bottom: 4px;
    color: var(--color-accent);
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.route-info-bar .label {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* In the mobile section the panel is a strip above the map rather than a card
   floating on it — there is no map behind it to float over yet. */
.mobile-map-section .route-info {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    border-radius: 0;
}

.route-stat {
    text-align: center;
}

.route-stat .value {
    display: block;
    color: var(--color-text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.route-stat .label {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* A card whose children stack with even spacing, so no child needs its own
   margin and the last one never leaves a gap at the bottom. */
.card--stack {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.card--stack .field {
    margin-bottom: 0;
}

.field__hint {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}

.form-note {
    margin-top: var(--spacing-sm);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    text-align: center;
}

.input--area {
    min-height: 0;
    padding: var(--spacing-sm) var(--spacing-md);
    line-height: 1.5;
    resize: vertical;
}

/* ── Address suggestions ────────────────────────────────────────────────── */

.field--suggest {
    position: relative;
}

/**
 * The panel, in the old page's own numbers.
 *
 * Two files describe it over there and both are copied here: the widget
 * defines itself in `assets/js/places-autocomplete.js:217`, and the landing
 * page then overrides the row with `!important` (auth/login.php:1783) — rules
 * written for Google's own `.pac-item`, which happen to land on the custom
 * widget's rows because the class name is the same. The result is what a
 * visitor actually sees: 12px/16px rows with a line between them, not the
 * widget's own 14px/18px and no lines. The page wins, so the page is copied.
 *
 * Anchored to the field rather than positioned in script against the viewport
 * (places-autocomplete.js:1078): the list is next to the input it belongs to,
 * so it follows the column when the page scrolls, and no inline style is
 * written to place it.
 */
.suggest {
    position: absolute;
    /* Two pixels under the field, as the old panel opens (:1079). */
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    z-index: 20;
    /* 250px of rows plus the two borders: over there the limit is on the
       scrolling box inside the panel, and the border sits outside it. */
    max-height: 252px;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    scrollbar-width: thin;
}

[data-theme="light"] .suggest {
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.08),
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 20px 25px -5px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .suggest {
        box-shadow:
            0 4px 6px -1px rgba(0, 0, 0, 0.08),
            0 10px 15px -3px rgba(0, 0, 0, 0.1),
            0 20px 25px -5px rgba(0, 0, 0, 0.08);
    }
}

.suggest::-webkit-scrollbar {
    width: 6px;
}

.suggest::-webkit-scrollbar-track {
    background: transparent;
}

.suggest::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.suggest__item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.15s ease;
}

.suggest__item:hover {
    background: var(--color-surface-variant);
}

/* The keyboard's own selection is tinted, so it reads as a choice. */
.suggest__item.is-active {
    background: var(--color-accent-light);
}

.suggest__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--color-surface-variant);
    transition: background 0.2s ease;
}

.suggest__icon .icon {
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

.suggest__item:hover .suggest__icon,
.suggest__item.is-active .suggest__icon {
    background: var(--color-accent-light);
}

.suggest__item:hover .suggest__icon .icon,
.suggest__item.is-active .suggest__icon .icon {
    color: var(--color-accent);
}

.suggest__text {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.suggest__name,
.suggest__address {
    display: block;
    overflow: hidden;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.suggest__name {
    font-size: 15px;
    font-weight: 500;
}

.suggest__address {
    margin-top: 3px;
    color: var(--color-text-secondary);
    font-size: 13px;
}

/* An answer that needed no call to Google, and arrived in a few milliseconds. */
.suggest__badge {
    position: absolute;
    top: 14px;
    right: 16px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Searching, or nothing found. */
.suggest__state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 18px;
    text-align: center;
}

.suggest__state--loading {
    flex-direction: row;
    gap: 12px;
    padding: 24px 18px;
}

.suggest__state-text {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.suggest__state-hint {
    color: var(--color-text-muted);
    font-size: 12px;
}

.suggest__state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: var(--color-surface-variant);
}

.suggest__state-icon .icon {
    width: 24px;
    height: 24px;
    color: var(--color-text-muted);
}

.suggest__spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: suggest-spin 0.8s linear infinite;
}

@keyframes suggest-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .suggest__spinner {
        animation: none;
    }
}

/**
 * The same list, in a sheet, for a screen a keyboard would cover.
 *
 * The old web switches to this under 768px and so does web2: the field moves
 * to the top with a way back beside it, and the results get the rest of the
 * screen (places-autocomplete.js:94).
 */
.pac-sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background: var(--color-background);
}

.pac-sheet[hidden] {
    display: none;
}

.pac-sheet__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.pac-sheet__back {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-primary);
    cursor: pointer;
}

.pac-sheet__back .icon {
    width: 24px;
    height: 24px;
}

.pac-sheet__field {
    position: relative;
    display: flex;
    flex: 1;
    min-width: 0;
}

.pac-sheet__input {
    flex: 1;
    min-width: 0;
    /* Room on the right for the × over it. */
    padding: 14px 44px 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-variant);
    color: var(--color-text-primary);
    font-family: inherit;
    /* 16px: anything smaller and iOS zooms the page in on focus. */
    font-size: 16px;
}

.pac-sheet__input:focus {
    border-color: var(--color-accent);
    outline: none;
}

.pac-sheet__input::placeholder {
    color: var(--color-text-muted);
}

.pac-sheet__clear {
    position: absolute;
    top: 50%;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.pac-sheet__clear:active {
    background: var(--color-border);
    color: var(--color-text-primary);
}

.pac-sheet__results {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pac-sheet__section {
    display: block;
    padding: 8px 16px 4px;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

/* In the sheet the list is the page, so it drops the panel's dressing. */
.pac-sheet__results .suggest {
    position: static;
    max-height: none;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

/**
 * In daylight the sheet and its header trade places: the list sits on white
 * and the header is the grey one (places-autocomplete.js:170).
 */
[data-theme="light"] .pac-sheet {
    background: var(--color-surface);
}

[data-theme="light"] .pac-sheet__header {
    background: var(--color-background);
}

[data-theme="light"] .pac-sheet__input {
    background: var(--color-surface);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .pac-sheet {
        background: var(--color-surface);
    }

    :root:not([data-theme]) .pac-sheet__header {
        background: var(--color-background);
    }

    :root:not([data-theme]) .pac-sheet__input {
        background: var(--color-surface);
    }
}

/* Nothing behind the sheet — or behind a modal — scrolls while it is open. */
.is-sheet-open,
.is-sheet-open body,
.is-modal-open,
.is-modal-open body {
    overflow: hidden;
}

/**
 * Smaller type and a smaller tile on a narrow screen, as over there
 * (places-autocomplete.js:636). The row keeps its 12px/16px padding, because
 * the landing page's !important sets that at every width.
 */
@media (max-width: 768px) {
    .suggest__icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .suggest__icon .icon {
        width: 16px;
        height: 16px;
    }

    .suggest__name {
        font-size: 14px;
    }

    .suggest__address {
        margin-top: 2px;
        font-size: 11px;
    }

    .suggest__badge {
        padding: 2px 6px;
        font-size: 9px;
    }
}

/* While a place id is being resolved into coordinates. */
.input.is-resolving {
    opacity: 0.6;
}

/* ── The route control ──────────────────────────────────────────────────── */

/**
 * Two addresses drawn as one route (index.php:1300).
 *
 * The dots carry the meaning the "Pickup" and "Destination" labels used to
 * carry, in a fraction of the space — the fields themselves are frameless rows
 * separated by a hairline, so the pair reads as one control.
 */
.location-inputs {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    /* Room for the glow around the pickup dot (index.php:382). */
    padding-left: 4px;
}

/* The landing page does without that inset and gives the rows more air below
   (auth/login.php:477), so the dot lines up under the heading. */
.page-landing .location-inputs {
    margin-bottom: 20px;
    padding-left: 0;
}

.location-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.location-input-row:last-child {
    border-bottom: none;
}

.location-dot {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    border-radius: 50%;
}

.location-dot--pickup {
    background: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(0, 200, 83, 0.2);
}

.location-dot--dropoff {
    background: #ff4444;
    box-shadow: 0 0 0 4px rgba(255, 68, 68, 0.2);
}

/* Holds the field and the panel under it, and nothing else. */
.location-input-wrap {
    display: flex;
    flex: 1;
    min-width: 0;
    position: relative;
}

.location-input {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.location-input::placeholder {
    color: var(--color-text-muted);
}

.btn-gps {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: none;
    border-radius: 12px;
    background: var(--color-surface-variant);
    color: var(--color-accent);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-gps .icon {
    width: 20px;
    height: 20px;
}

.btn-gps:hover {
    background: var(--color-accent);
    color: #000;
}

.btn-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Out of sight but still occupying its place: a row that loses 32px of width
   the moment an address is cleared makes the text jump under the cursor
   (auth/login.php:571). `hidden` cannot do this — it means "not part of the
   page" and is enforced with !important above. */
.btn-clear.is-idle {
    visibility: hidden;
    opacity: 0;
}

.btn-clear:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

@media (max-width: 768px) {
    .location-input-row {
        padding: 10px 0 10px 4px;
    }

    .location-input {
        font-size: 0.9rem;
    }

    /* Again only the signed-in page tightens these rows and shrinks their
       text (index.php:67); the landing page does not (auth/login.php:485). */
    .page-landing .location-input-row {
        padding: 12px 0;
    }

    .page-landing .location-input {
        font-size: 1rem;
    }
}

/* ── Chips and pills ───────────────────────────────────────────────────── */

/**
 * One row of chips, each stating its own current answer (index.php:1328).
 *
 * The controls behind them live in a sheet, so the form stays one screen tall
 * for the passenger who wants a ride now and changes nothing.
 */
.options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 100px;
    background: var(--color-surface-variant);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: normal;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-btn:hover {
    border-color: var(--color-text-muted);
    background: var(--color-border);
}

.option-btn .icon {
    width: 16px;
    height: 16px;
    color: var(--color-accent);
}

/* The "Now" shortcut at the top of the when sheet (index.php:1452). */
.option-btn--wide {
    width: 100%;
    justify-content: center;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .options-row {
        gap: 6px;
    }

    .option-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .option-btn .icon {
        width: 14px;
        height: 14px;
    }

    /* The landing page carries its chips at full size on a phone too
       (auth/login.php:298 against index.php:82). */
    .page-landing .options-row {
        gap: 8px;
    }

    .page-landing .option-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

.vehicle-section {
    margin-bottom: 16px;
}

.vehicle-section-label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

/*
   The vehicle, as the passenger app draws it (vehicle_class_sheet.dart:336):
   a photo on the left, the name on the right, seats and bags under the
   name. One compact row that scrolls sideways — four stretched cards were
   a grid, and a stack would be the height the fold just gave up.

   Selected is a ring and a tint, not a fill: the photos are themselves
   green, and a solid accent card would swallow them
   (vehicle_class_sheet.dart:309).
*/
.vehicle-classes {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.vehicle-classes::-webkit-scrollbar {
    display: none;
}

.vehicle-class {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface-variant);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.vehicle-class:hover {
    border-color: var(--color-text-muted);
}

.vehicle-class.selected {
    border-width: 2px;
    border-color: var(--color-accent);
    background: var(--color-accent-light);
    padding: 5px 7px;
}

/* The radio inside is hidden but focusable, so the group still answers to the
   arrow keys and announces itself. The ring is drawn on the card. */
.vehicle-class:has(input:focus-visible) {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.vehicle-class__img {
    width: 48px;
    height: 32px;
    flex-shrink: 0;
    object-fit: contain;
}

.vehicle-class__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vehicle-class__name {
    color: var(--color-text-primary);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.vehicle-class__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 0.7rem;
}

.vehicle-class__stat {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.vehicle-class__stat .icon {
    width: 12px;
    height: 12px;
}

/* ── Comment, and the button that ends the form ────────────────────────── */

.comment-field {
    margin-top: 0;
}

.comment-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.comment-field textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 56px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.comment-field textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.btn-find-drivers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: var(--color-accent);
    color: #000;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    /* The old button takes the browser's line box, not the page's 1.5
       (auth/login.php:624), which is 3px of height. */
    line-height: normal;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-find-drivers:hover:not(:disabled) {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 200, 83, 0.4);
}

.btn-find-drivers:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-find-drivers .icon {
    width: 18px;
    height: 18px;
}

/* ── Quick picks ────────────────────────────────────────────────────────── */

/* ── The landing page ──────────────────────────────────────────────────── */

/**
 * The header inside the left column (auth/login.php:309).
 *
 * `flex-shrink: 0` matters: the column is a flex container with a scrolling
 * body, and without it the header is the first thing squeezed when the form
 * grows.
 */
.top-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .top-header {
        margin-bottom: 20px;
    }
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .header-controls {
        gap: 8px;
    }
}

/**
 * The two pills, as <details> rather than the old click handler on a <div>
 * (auth/login.php:342). Opening works with no script of ours, and the arrow
 * still turns over when it is open.
 */
.header-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface-variant);
    color: var(--color-text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    /* A summary, not a button, so it would otherwise inherit the page's 1.5
       and stand 3px taller than the control it copies (auth/login.php:346). */
    line-height: normal;
    cursor: pointer;
    transition: all var(--transition-fast);
}

/* Smaller on a phone, where the header shares the row with the logo
   (auth/login.php:429). */
@media (max-width: 768px) {
    .page-landing .dropdown-toggle {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

.dropdown-toggle::-webkit-details-marker,
.dropdown-toggle::marker {
    content: '';
    display: none;
}

.dropdown-toggle:hover {
    border-color: var(--color-accent);
}

.dropdown-toggle .icon {
    width: 11px;
    height: 11px;
    color: var(--color-text-muted);
    stroke-width: 2.4;
    transition: transform var(--transition-fast);
}

.header-dropdown[open] .dropdown-toggle .icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 100;
    min-width: 120px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.dropdown-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 0;
    background: none;
    color: var(--color-text-primary);
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.dropdown-item:first-child {
    border-radius: 10px 10px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 10px 10px;
}

.dropdown-item:hover {
    background: var(--color-surface-variant);
}

.dropdown-item.active {
    color: var(--color-accent);
}

/**
 * The currency notice (auth/login.php:676).
 *
 * Centred rather than slid up from the bottom edge like the booking sheets:
 * it is not a step in the booking, it is a thing worth reading before going
 * on.
 */
.sheet--center .currency-notice {
    width: 100%;
    max-width: 400px;
    margin: auto;
    padding: 32px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
    text-align: center;
}

.currency-notice__icon {
    display: flex;
    width: 60px;
    height: 60px;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.currency-notice__icon .icon {
    width: 28px;
    height: 28px;
}

.currency-notice h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.currency-notice p {
    margin-bottom: 24px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.currency-notice__ack {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    cursor: pointer;
}

.currency-notice__ack input {
    position: absolute;
    opacity: 0;
}

.currency-notice__box {
    display: flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.currency-notice__ack input:checked + .currency-notice__box {
    border-color: var(--color-accent);
    background: var(--color-accent);
}

.currency-notice__ack input:checked + .currency-notice__box::after {
    content: '✓';
    color: #000000;
    font-size: 0.85rem;
    font-weight: 700;
}

/* The checkbox is invisible, so the ring has to be somewhere: on the box. */
.currency-notice__ack input:focus-visible + .currency-notice__box {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/**
 * Sign in, under the form (auth/login.php:1253).
 *
 * Quieter than the find-drivers button on purpose: booking is what the page is
 * for, and signing in is what a returning passenger does on the way to it.
 */
.btn-login-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    /* 20px below: over there the form sits in a card that ends here
       (auth/login.php:470), and the destinations keep their own 16px. */
    margin-top: 8px;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: transparent;
    color: var(--color-text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: normal;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* The card this follows is 24px clear of the destinations on a phone, not 20
   (auth/login.php:286). */
@media (max-width: 768px) {
    .btn-login-link {
        margin-bottom: 24px;
    }
}

.btn-login-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-login-link .icon {
    width: 14px;
    height: 14px;
}

.popular-destinations {
    margin-top: 16px;
}

.popular-destinations h3 {
    margin-bottom: 10px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.destination-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* One scrolling row below 1024px rather than four wrapped lines, which is
   half the column on a phone (auth/login.php:2452). */
@media (max-width: 1024px) {
    .destination-tags {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .destination-tags::-webkit-scrollbar {
        display: none;
    }

    .destination-tag {
        flex-shrink: 0;
    }
}

.destination-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 100px;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.destination-tag:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.destination-tag .icon {
    width: 14px;
    height: 14px;
}

.destination-tag .price-hint {
    margin-left: 4px;
    color: var(--color-accent);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Pinned to the foot of the column: on a tall screen these sit at the bottom
   of the fold rather than floating under the form (auth/login.php:2674). */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: auto;
    padding-top: 16px;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/*
   A laptop viewport is often 720 or 768 tall. At 24px of padding the form
   plus the destinations and the three feature lines ran 70px past 720 and
   6px past 768, so the two columns — which now scroll with the page —
   started with a sliver of scrollbar before the fold. These numbers are
   the 70px, taken off the gaps rather than off the type.

   After the base rules, not before: the heading, the address rows and the
   sign-in link all set their own gaps later in the file.
*/
@media (min-width: 1025px) {
    .booking-side {
        padding: 16px 40px;
    }

    .booking-header {
        margin-bottom: 12px;
    }

    .page-landing .location-inputs {
        margin-bottom: 12px;
    }

    .location-input-row {
        padding: 8px 0;
    }

    .btn-login-link {
        margin-bottom: 12px;
    }

    .popular-destinations {
        margin-top: 8px;
    }

    .features-grid {
        gap: 12px;
        padding-top: 8px;
    }
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--color-surface-variant);
    color: var(--color-accent);
}

.feature-icon .icon {
    width: 16px;
    height: 16px;
}

.feature-text h3 {
    margin-bottom: 2px;
    font-size: 0.85rem;
    font-weight: 600;
}

.feature-text p {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    line-height: 1.3;
}

/* ── The app promo (the right column before a route) ───────────────────── */

.app-promo {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: var(--color-surface);
    text-align: center;
}

.app-promo[hidden] {
    display: none;
}

.app-promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    font-size: 0.8rem;
    font-weight: 600;
}

.app-promo-badge .icon {
    width: 14px;
    height: 14px;
}

.app-promo h2 {
    margin: 0 0 8px;
    font-size: 1.6rem;
    font-weight: 800;
}

.app-promo p {
    max-width: 340px;
    margin: 0 0 28px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* The phone. A frame drawn in CSS around a screenshot, so the only image on
   the page is the screen itself. */
.app-promo-phone {
    position: relative;
    width: 200px;
    aspect-ratio: 9 / 19.5;
    margin-bottom: 32px;
    overflow: hidden;
    border: 4px solid #3a3a3a;
    border-radius: 20px;
    background: #000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .app-promo-phone {
    border-color: #c0c0c0;
    background: #e8e8e8;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .app-promo-phone {
        border-color: #c0c0c0;
        background: #e8e8e8;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    }
}

.app-promo-phone img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.app-promo-phone img.active {
    opacity: 1;
}

.app-promo-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
}

.app-promo-dots .dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--color-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.app-promo-dots .dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--color-accent);
}

.app-promo-buttons {
    display: flex;
    gap: 12px;
}

/* In place of the booking form while maintenance mode is on — the old
   landing page's .upgrade-card (auth/login.php:2591): no frame of its own,
   centred, the store buttons under a small caps label. */
.app-cta {
    margin-bottom: 20px;
    text-align: center;
}

.app-cta__title {
    margin: 0 0 12px;
    color: var(--color-text-primary);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
}

.app-cta__message {
    margin: 0 0 24px;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.app-cta__label {
    margin-bottom: 12px;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-cta__stores {
    flex-wrap: wrap;
    justify-content: center;
}

.app-promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-variant);
    color: var(--color-text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.app-promo-btn:hover {
    border-color: var(--color-accent);
    background: var(--color-accent-light);
}

.app-promo-btn .icon {
    width: 20px;
    height: 20px;
}

/* The two store marks are silhouettes, so they are filled where every other
   icon in the set is stroked. */
.icon--brand {
    fill: currentColor;
    stroke: none;
}

.app-promo-btn .btn-label-sm {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.65rem;
    font-weight: 400;
    line-height: 1;
    text-align: left;
}

.app-promo-btn .btn-label-lg {
    display: block;
    line-height: 1.1;
    text-align: left;
}

/* The same offer in the left column, for the layout where the promo column is
   not rendered (auth/login.php:2658). */
.mobile-app-inline {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 14px;
    text-align: center;
}

@media (max-width: 1024px) {
    .mobile-app-inline {
        display: flex;
    }
}

.mobile-app-title {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
}

.mobile-app-subtitle {
    margin: 0 0 14px;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.mobile-app-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* On a phone these are the page's call to action, not a footnote, so they
   invert against the page instead of blending into it (login.php:2366). */
.mobile-app-btns .app-promo-btn {
    padding: 14px 24px;
    border: 1.5px solid #333333;
    border-radius: 14px;
    background: #ffffff;
    color: #000000;
}

.mobile-app-btns .app-promo-btn .btn-label-sm {
    color: #555555;
}

.mobile-app-btns .app-promo-btn:hover {
    border-color: #333333;
    background: #f0f0f0;
}

[data-theme="light"] .mobile-app-btns .app-promo-btn {
    border-color: #000000;
    background: #000000;
    color: #ffffff;
}

[data-theme="light"] .mobile-app-btns .app-promo-btn .btn-label-sm {
    color: #aaaaaa;
}

[data-theme="light"] .mobile-app-btns .app-promo-btn:hover {
    border-color: #222222;
    background: #222222;
}

/* ── Why choose us ─────────────────────────────────────────────────────── */

.benefits-section {
    padding: 80px 60px;
    background: var(--color-surface);
}

@media (max-width: 768px) {
    .benefits-section {
        padding: 48px 20px;
    }
}

.benefits-section h2 {
    margin-bottom: 48px;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    text-align: center;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

.benefit-card {
    padding: 32px 24px;
    border-radius: 16px;
    background: var(--color-surface-variant);
    text-align: center;
    transition: transform 0.2s ease;
}

.benefit-card:hover {
    transform: translateY(-4px);
}

.benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 16px;
    background: var(--color-accent-light);
    color: var(--color-accent);
}

.benefit-icon .icon {
    width: 28px;
    height: 28px;
}

.benefit-card h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.benefit-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Sheets (the two pickers) ──────────────────────────────────────────── */

/**
 * A sheet from the bottom on a phone, a dialog in the middle on a desktop —
 * the old datetime-modal and passengers-modal, which are the same thing twice
 * (index.php:1125 and :1142).
 *
 * `hidden` rather than a visibility transition: a dialog that is only
 * transparent is still in the tab order, and a passenger tabbing out of the
 * form would land inside a picker they cannot see.
 */
.sheet {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.sheet[hidden] {
    display: none;
}

.sheet--center {
    align-items: center;
    padding: 20px;
}

.sheet__panel {
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    border-radius: 20px 20px 0 0;
    background: var(--color-surface);
}

@media (min-width: 768px) {
    .sheet {
        align-items: center;
    }

    .sheet__panel {
        border-radius: 20px;
    }
}

/*
   The sign-in card as a dialog.

   Nothing to draw: the whole of the old modal is already here. .sheet is its
   overlay to the pixel - rgba(0, 0, 0, 0.8) under a blur(8px) - .sheet--center
   is its alignment, and .auth-step above is its card, 420px wide with 32px of
   padding, because the login page took those numbers from this very modal
   (auth/login.php:942).

   So the panel steps out of the way and lets the card be the card. A panel of
   its own would put a second surface around the first, which the old modal
   plainly does not have.
*/
.sheet__panel--auth {
    position: relative;
    max-width: 420px;
    padding: 0;
    border-radius: 0;
    background: none;
    /* The country list opens past the card's bottom edge, so the card does
       not clip; on a screen too short for it, the overlay scrolls instead,
       and auto margins keep it centred whenever it does fit. */
    max-height: none;
    margin: auto 0;
    overflow: visible;
}

#auth-modal {
    align-items: flex-start;
    overflow-y: auto;
}

/* The card brings its own spacing on the page; in a dialog the overlay does. */
.sheet__panel--auth .auth-step {
    margin: 0;
}

/* Clear of the close button: the name step's title runs nearly edge to edge. */
.sheet__panel--auth .auth-title {
    padding: 0 32px;
}

/*
 * The first steps, shown once after registration over the booking form.
 * The old site's /how-to-use?welcome=1 (how-to-use.php:142): the green
 * banner, four numbered steps with a coloured round icon each, and the call
 * to book. A dialog here rather than a page, so the form the new passenger
 * was filling in is right under it.
 */
.welcome {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    margin: auto;
    overflow-y: auto;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
}

.welcome .sheet__close {
    position: absolute;
    top: 12px;
    right: 12px;
}

.welcome__banner {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-accent), #16a34a);
    color: #000;
    text-align: center;
}

.welcome__banner h2 {
    margin: 0 0 6px;
    font-size: 1.4rem;
}

.welcome__banner p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.welcome__steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.welcome-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.welcome-step__icon {
    display: flex;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #000;
}

.welcome-step__icon .icon {
    width: 20px;
    height: 20px;
}

.welcome-step__icon--1 { background: linear-gradient(135deg, #22c55e, #16a34a); }
.welcome-step__icon--2 { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.welcome-step__icon--3 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.welcome-step__icon--4 { background: linear-gradient(135deg, #10b981, #059669); }

.welcome-step__number {
    margin: 0 0 2px;
    color: var(--color-accent);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.welcome-step h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.welcome-step p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Over the card's own content, where the old close button sits. */
.sheet__panel--auth .sheet__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1;
}

.sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.sheet__header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.sheet__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--color-surface-variant);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sheet__close:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

.sheet__close .icon {
    width: 18px;
    height: 18px;
}

.sheet__hint {
    margin-bottom: 24px;
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}

.datetime-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.datetime-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.datetime-label {
    padding-left: 4px;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.datetime-input {
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: none;
    background: var(--color-surface-variant);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.datetime-input:focus {
    border-color: var(--color-accent);
}

.btn-confirm {
    width: 100%;
    margin-top: 24px;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: var(--color-accent);
    color: #000;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-confirm:hover {
    background: var(--color-accent-hover);
}

/* ── Counters ──────────────────────────────────────────────────────────── */

.counter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.counter-row:last-of-type {
    border-bottom: none;
}

.counter-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.counter-label .icon {
    width: 24px;
    height: 24px;
    color: var(--color-accent);
}

.counter-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.counter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface-variant);
    color: var(--color-text-primary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.counter-btn:hover:not(:disabled) {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #000;
}

.counter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.counter-value {
    min-width: 24px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.child-seat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 12px 36px;
}

.child-seat-item .seat-label {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/**
 * The child-seat switch (index.php:1512).
 *
 * A real checkbox, moved off the visible layer rather than replaced: the label
 * still toggles it, the keyboard still reaches it and a screen reader still
 * calls it a checkbox. The slider is the span beside it.
 */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

.switch input {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.switch__slider {
    position: absolute;
    inset: 0;
    border-radius: 26px;
    background: var(--color-border);
    transition: background 0.3s ease;
}

.switch__slider::before {
    content: '';
    position: absolute;
    left: 3px;
    bottom: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.3s ease;
}

.switch input:checked + .switch__slider {
    background: var(--color-accent);
}

.switch input:checked + .switch__slider::before {
    transform: translateX(22px);
}

.switch input:focus-visible + .switch__slider {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.child-seats {
    padding: 8px 0;
}

.child-seats[hidden] {
    display: none;
}

#counts-error {
    margin: 4px 0 0;
}

/* ── States (waiting, closed, loading) ──────────────────────────────────── */

.state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-2xl) var(--spacing-md);
    text-align: center;
}

.state__title {
    font-size: var(--font-size-xl);
    font-weight: 800;
}

.state__text {
    max-width: 36ch;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.state__meta {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    font-variant-numeric: tabular-nums;
}

/* A slow, quiet pulse. It says "something is happening" without pretending to
   measure progress we cannot measure. */
.pulse {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--color-accent-light);
    box-shadow: 0 0 0 0 var(--color-accent-light);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    70% { box-shadow: 0 0 0 18px rgba(0, 200, 83, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 200, 83, 0); }
}

/* ── Payment method ─────────────────────────────────────────────────────── */

/**
 * The choice between cash and an online provider, above the offers.
 *
 * Built out of real radio inputs rather than styled buttons, so one press
 * selects one method, arrow keys move between them and a screen reader
 * announces the group — none of which a row of div's would do. The fieldset
 * keeps its own border off: the cards below already draw the page's rhythm.
 */
.pay-methods {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin: 0 0 var(--spacing-lg);
    padding: 0;
    border: 0;
}

.pay-methods__legend {
    padding: 0 0 var(--spacing-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}

.pay-method {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
}

/* The whole row is the target, so the border has to say which one is chosen:
   the dot alone is too small to read at a glance while holding a phone. */
.pay-method:has(input:checked) {
    border-color: var(--color-accent);
    background: var(--color-surface-variant);
}

.pay-method:has(input:focus-visible) {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/**
 * The radio, drawn rather than inherited.
 *
 * The browser's own radio is a solid filled disc, and three of them in a
 * column read as three selected options — the chosen one has to be obviously
 * different, not merely a slightly different shade of filled. So: an empty
 * ring when it is not chosen, and a ring with a dot in it when it is.
 */
.pay-method input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
}

.pay-method input:checked {
    border-color: var(--color-accent);
    /* The dot is the border growing inwards, so there is no pseudo-element to
       position and nothing to misalign when the font size changes. */
    border-width: 6px;
}

.pay-method__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pay-method__label {
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
}

.pay-method__note {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* ── Payment page ───────────────────────────────────────────────────────── */

/**
 * The frame the gateway's checkout loads into.
 *
 * A fixed height, not a growing one: the frame is cross-origin, so its content
 * height is unknowable from here and there is nothing to grow to. The number is
 * chosen to fit a card form with a 3-D Secure challenge under it without the
 * frame scrolling inside the page's own scroll, which is the thing that makes
 * an embedded checkout feel broken.
 */
/* No height of its own: while the checkout is being fetched the box is as tall
   as the short loader, and once the frame appears the frame's height sets it.
   Reserving the full height up front would mean a half-empty panel on a phone
   for as long as the request takes, which reads as a page that failed. */
.pay-frame-wrap {
    position: relative;
    overflow: hidden;
}

.pay-frame {
    display: block;
    width: 100%;
    height: 580px;
    border: 0;
    /* The gateway draws its own white page; matching it avoids a dark flash
       in the moment between the frame appearing and its document painting. */
    background: #ffffff;
}

.pay-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    min-height: 240px;
    padding: var(--spacing-lg);
    text-align: center;
}

#pay-countdown {
    margin-bottom: var(--spacing-md);
}

#pay-cancel {
    margin-top: var(--spacing-md);
}

/* ── Offers: the page ───────────────────────────────────────────────────── */

/**
 * Picking a driver, as the old web draws it (bids.php:467).
 *
 * Three things in a column, in this order: what was ordered, whether anyone has
 * answered, and the answers. Everything below is a port of that page's own
 * rules — the numbers are its numbers, and the class names are its names, so
 * the two can be read side by side.
 */
.bids-container {
    padding: var(--spacing-2xl) 0;
    min-height: calc(100vh - 200px);
}

.bids-header {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.bids-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

/* The order number, in the one place a passenger can read it out from. */
.order-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 20px;
    background: var(--color-accent);
    color: #000;
    font-weight: 700;
}

.order-badge .icon {
    width: 16px;
    height: 16px;
}

.bids-subtitle {
    color: var(--color-text-secondary);
}

/* ── Offers: what was ordered ───────────────────────────────────────────── */

.route-summary {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-surface);
}

/**
 * The route as two dots joined by a line (assets/css/style.css:1265).
 *
 * Shared with the trip page, which draws the same two dots under its status
 * header (trip.php:770).
 */
.trip-route {
    display: flex;
    align-items: stretch;
    gap: var(--spacing-md);
}

.trip-route .route-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) 0;
    font-size: inherit;
}

.route-dot {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    border-radius: 50%;
}

.route-dot--pickup {
    background: var(--color-accent);
}

/* Square-ish, not round: the end of a journey is not the start of one. */
.route-dot--dropoff {
    border-radius: 2px;
    background: var(--color-error);
}

.route-connector {
    width: 2px;
    flex: 1;
    min-height: 30px;
    background: linear-gradient(to bottom, var(--color-accent), var(--color-error));
}

.route-addresses {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--spacing-md);
    min-width: 0;
}

.route-address {
    font-size: var(--font-size-sm);
}

.route-address strong {
    display: block;
    margin-bottom: 2px;
}

/* A place has a name and an address, and both matter: the name is what the
   passenger recognises, the street is what the driver is sent to.

   They share a line, with the name in bold and the street behind it, which is
   what the old page ends up with (bids.php:1534 clears the inline display, so
   the span falls back to inline). Two lines each would also push the second
   route dot away from the word it belongs to, because the dots column divides
   its own height in two. */
.route-address__sub {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.route-address__name {
    font-weight: 600;
}

.order-details-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.order-detail {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-text-secondary);
}

.order-detail .icon {
    width: 16px;
    height: 16px;
}

/* Child seats, a scheduled time, the estimate, a promo code, a note — each on
   its own line under the facts, and each absent unless it was asked for. */
.order-extra {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.order-extra--note {
    align-items: flex-start;
}

.order-extra .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-accent);
}

.order-extra--muted .icon {
    color: var(--color-text-muted);
}

.order-extra--accent {
    color: var(--color-accent);
}

.order-extra__value {
    font-weight: 700;
    color: var(--color-accent);
}

.order-extra__promo {
    font-weight: 600;
    color: #22c55e;
}

/* The passenger's own words, set apart from ours. */
.order-extra__note {
    margin: 4px 0 0;
    color: var(--color-text-primary);
    font-style: italic;
}

/* ── Offers: waiting for one ────────────────────────────────────────────── */

.waiting-animation {
    padding: var(--spacing-2xl);
    text-align: center;
}

.waiting-animation h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
}

.waiting-animation p {
    color: var(--color-text-muted);
}

.waiting-animation .spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-lg);
    border-width: 4px;
}

/* The one moving thing on the page, and the only honest way to say that
   drivers are being asked (assets/css/style.css:1170). */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation: none;
    }
}

/* ── Offers: one card ───────────────────────────────────────────────────── */

.bids-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

@media (min-width: 900px) {
    .bids-grid {
        max-width: 800px;
        margin: 0 auto;
    }
}

/**
 * One offer: the car on the left, the driver and the price on the right.
 *
 * A row on a desktop and a column on a phone, which is the same card either
 * way — the photo is the first thing a passenger judges, and it has to be
 * large enough to be judged.
 */
.bid-card {
    display: flex;
    flex-direction: row;
    /* The photo is inset and the two halves are 24px apart, which is what the
       old card ends up being: its own rule means it to be flush, and the shared
       stylesheet's .bid-card gives it the padding and the gap (style.css:1316).
       Centred for the same reason: the photo is 160 tall and the body is taller
       than that whenever the driver has a message. */
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    overflow: hidden;
    border: 2px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
    transition: all 0.2s ease;
}

.bid-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 8px 24px rgba(0, 200, 83, 0.15);
}

.bid-card.flott-card {
    border-color: rgba(34, 197, 94, 0.4);
}

.bid-card.flott-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 8px 24px rgba(0, 200, 83, 0.2);
}

.vehicle-photo-section {
    position: relative;
    width: 200px;
    height: 160px;
    flex-shrink: 0;
    background: var(--color-surface-variant);
    cursor: pointer;
}

.vehicle-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: 0;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
}

.vehicle-photo-placeholder .icon {
    width: 40px;
    height: 40px;
}

.vehicle-class-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Hidden until the pointer is over the photo, because on a desktop the arrows
   are clutter on a card that is mostly not being looked at. */
.photo-nav-btn {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    transform: translateY(-50%);
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.vehicle-photo-section:hover .photo-nav-btn,
.vehicle-gallery:hover .photo-nav-btn,
.photo-nav-btn:focus-visible {
    opacity: 1;
}

.photo-nav-btn .icon {
    width: 14px;
    height: 14px;
}

.photo-nav-btn--prev { left: 6px; }
.photo-nav-btn--next { right: 6px; }

.photo-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.photo-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    z-index: 5;
    display: flex;
    gap: 5px;
    transform: translateX(-50%);
}

.photo-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.photo-dot.active {
    background: #ffffff;
    transform: scale(1.2);
}

/* A Flott driver is one of ours: said on the photo, and again by the name. */
.flott-photo-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    background: var(--color-accent);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
}

.flott-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    background: var(--color-accent);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}

.flott-badge .icon,
.flott-photo-badge .icon {
    width: 11px;
    height: 11px;
}

.bid-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

/* The whole middle of the card opens the driver's details — the same target
   the old card gives it (bids.php:1866). */
.bid-card-content {
    flex: 1;
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.driver-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.driver-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    background: var(--color-accent);
    color: #000;
    font-size: 1.1rem;
    font-weight: 700;
}

.driver-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.driver-info {
    flex: 1;
    min-width: 0;
}

/* The Flott pill makes this row taller than its text, so the rating row
   below needs real room or the two pills touch. */
.driver-name {
    display: block;
    margin-bottom: 6px;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.driver-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px var(--spacing-sm);
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

.driver-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--color-warning);
}

.driver-rating .icon {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

/* Flags, not names: a passenger scanning four cards reads them faster, and
   they need no translating. */
.driver-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 4px;
    font-size: 1rem;
}

/* Next to the rating: how many passengers wrote something about the driver.
   Opens what they wrote. Outlined and neutral with a trailing chevron, so it
   reads as something to open rather than as another badge like Flott. */
.driver-comments-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 1px 4px 1px 8px;
    border: 1px solid var(--color-input-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text-primary);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.driver-comments-btn:hover {
    border-color: var(--color-text-muted);
    background: var(--color-surface-hover);
}

.driver-comments-btn .icon {
    flex-shrink: 0;
}

.driver-comments-btn .icon--solid {
    width: auto;
    height: 12px;
    color: var(--color-text-secondary);
}

.driver-comments-btn .comments-chevron {
    width: 12px;
    height: 12px;
    color: var(--color-text-muted);
}

.vehicle-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border);
}

.vehicle-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--color-accent);
}

.vehicle-name {
    flex: 1;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.vehicle-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.vehicle-tag {
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--color-surface-variant);
    color: var(--color-text-secondary);
    font-size: 0.7rem;
    white-space: nowrap;
}

/* Wraps rather than overflows. The price is the one thing on this card that
   must not break across two lines — it is what is being compared — so on a
   narrow phone the buttons move under it instead. */
.bid-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-variant);
}

.bid-price-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bid-price {
    color: var(--color-accent);
    font-size: 1.4rem;
    font-weight: 700;
    white-space: nowrap;
}

.bid-eta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    font-size: 0.75rem;
    opacity: 0.7;
}

.bid-eta .icon {
    width: 11px;
    height: 11px;
}

.bid-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.btn-info {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-info:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-info .icon {
    width: 18px;
    height: 18px;
}

/* The old pill is 36px tall; this one is 44, because .btn carries a minimum
   touch target and that is worth more than the eight pixels. */
.btn-accept {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.cancel-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

/* A phone turns the card upright: the photo across the top, then the driver,
   then the price (bids.php:1142). */
@media (max-width: 600px) {
    .bid-card {
        flex-direction: column;
    }

    .vehicle-photo-section {
        width: 100%;
        height: 180px;
        min-height: 180px;
    }

    .bid-card-content {
        padding: var(--spacing-lg);
    }

    .driver-row {
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }

    .driver-avatar {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
    }

    .driver-name {
        font-size: 1.15rem;
    }

    .driver-meta {
        font-size: 0.95rem;
    }

    .driver-languages {
        font-size: 1.15rem;
    }

    .vehicle-info {
        gap: var(--spacing-md);
        padding-top: var(--spacing-md);
    }

    .vehicle-name {
        font-size: 1.05rem;
    }

    .vehicle-icon {
        width: 16px;
        height: 16px;
    }

    .vehicle-tag {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .bid-card-footer {
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .bid-price {
        font-size: 1.6rem;
    }

    .bid-eta {
        font-size: 0.9rem;
    }

    .btn-accept {
        padding: 12px 24px;
        font-size: 1rem;
    }

    .btn-info {
        width: 44px;
        height: 44px;
    }

    .btn-info .icon {
        width: 20px;
        height: 20px;
    }

    /* Touch has no hover, so the arrows are simply there. */
    .photo-nav-btn {
        width: 32px;
        height: 32px;
        opacity: 0.9;
    }

    .photo-nav-btn--prev { left: 8px; }
    .photo-nav-btn--next { right: 8px; }

    .photo-nav-btn .icon {
        width: 16px;
        height: 16px;
    }

    .photo-dots {
        bottom: 10px;
    }

    .photo-dot {
        width: 8px;
        height: 8px;
    }

    .modal-gallery {
        height: 200px;
    }
}

/* ── Offers: one driver, in full ────────────────────────────────────────── */

/**
 * The card a passenger opens before choosing (bids.php:857).
 *
 * A <dialog> would come with its own backdrop and Escape handling, but it also
 * comes with a top layer that the page's own stacking cannot reach, and this
 * one has to sit under the payment step that follows it. So: the old page's
 * overlay, with the keyboard behaviour added in script.
 */
.driver-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    background: rgba(0, 0, 0, 0.8);
}

.driver-modal.active {
    display: flex;
}

.driver-modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    background: var(--color-surface);
}

.driver-modal-content--narrow {
    max-width: 400px;
}

/* The trip's two modals are their own width over there, between the driver
   card's 500 and the payment sheet's 400 (trip.php:563). */
.driver-modal-content--trip {
    max-width: 480px;
}

.modal-gallery {
    position: relative;
    height: 250px;
    background: var(--color-surface-variant);
}

.modal-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    transform: translateY(-50%);
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    cursor: pointer;
}

.gallery-nav--prev { left: 10px; }
.gallery-nav--next { right: 10px; }

.gallery-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    padding: 6px 12px;
    transform: translateX(-50%);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 0.8rem;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    cursor: pointer;
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-driver-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.modal-driver-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    background: var(--color-accent);
    color: #000;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-driver-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.modal-driver-info h3 {
    margin-bottom: 8px;
    font-size: var(--font-size-lg);
}

.modal-driver-languages {
    font-size: 1.2rem;
}

.modal-vehicle-section {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    border-radius: 12px;
    background: var(--color-surface-variant);
}

.modal-vehicle-title {
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.modal-vehicle-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.spec-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.spec-item .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-accent);
}

.modal-message {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: 8px;
    background: var(--color-surface-variant);
    color: var(--color-text-muted);
    font-style: italic;
}

.modal-message .icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 4px;
}

.modal-eta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

.modal-eta .icon {
    width: 13px;
    height: 13px;
}

.modal-footer {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

.modal-footer .btn {
    flex: 1;
}

/* ── Offers: how the ride will be paid for ──────────────────────────────── */

/**
 * Asked after an offer is chosen, not before it (bids.php:2170).
 *
 * The passenger is comparing drivers; a payment choice on every card would
 * make them decide two things in one press. So the price they just agreed to
 * is repeated here, and the choice is made once, against that number.
 */
.payment-sheet {
    position: relative;
    padding: 28px 24px 24px;
    text-align: center;
}

.comments-sheet {
    position: relative;
    padding: 22px 20px 20px;
}

.comments-sheet h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 44px 2px 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.comments-sheet h3 .icon {
    width: 18px;
    height: 18px;
    fill: var(--color-accent);
}

.comments-sheet__driver {
    margin: 0 0 16px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.comments-sheet__state {
    margin: 0;
    padding: 24px 0;
    color: var(--color-text-muted);
    text-align: center;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.comments-list li {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--color-surface-variant);
}

.comments-list__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.comments-list__stars {
    color: var(--color-warning);
    letter-spacing: 1px;
}

.comments-list__text {
    margin: 0;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Flex, not text-align: the icons in this project are display: block, so the
   line box the sheet centres has nothing in it to centre. */
.payment-sheet__mark {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--color-accent);
}

.payment-sheet__mark .icon {
    width: 32px;
    height: 32px;
}

.payment-sheet h3 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    font-weight: 700;
}

.payment-sheet__price-block {
    margin-bottom: 16px;
}

.payment-sheet__price {
    color: var(--color-accent);
    font-size: 1.8rem;
    font-weight: 700;
}

.payment-sheet__fine {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.payment-sheet__fine .icon {
    width: 11px;
    height: 11px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.payment-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option:hover:not(.disabled) {
    border-color: var(--color-accent);
}

.payment-option.selected {
    border-color: var(--color-accent);
    background: rgba(0, 210, 106, 0.08);
}

.payment-option.selected .payment-option__icon,
.payment-option.selected .payment-option__label {
    color: var(--color-accent);
}

.payment-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.payment-option__body {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.payment-option__icon {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.payment-option__label {
    font-weight: 600;
}

.payment-option__hint {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.payment-option__check {
    display: none;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--color-accent);
}

.payment-option.selected .payment-option__check {
    display: block;
}

.payment-option__lock {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.payment-option:not(.disabled) .payment-option__lock {
    display: none;
}

.payment-confirm {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
}

.payment-notice {
    margin: 12px 4px 0;
    color: var(--color-text-muted);
    font-size: 0.7rem;
    line-height: 1.5;
    text-align: center;
}

.payment-dismiss {
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    border: 0;
    background: transparent;
    color: var(--color-text-secondary);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

/* ── Trip ───────────────────────────────────────────────────────────────── */

/* The line under the status, and the amount on the payment page. */
.trip-lede {
    margin: calc(var(--spacing-lg) * -1) 0 var(--spacing-lg);
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
    font-weight: 600;
}

/**
 * The map on the left, everything about the trip in a column on the right
 * (trip.php:29).
 *
 * The map is the larger half because the question this page answers most often
 * is "where is the car", and the column is a fixed 420px because its contents
 * — a plate, a price, three buttons — do not get better with more width.
 */
.trip-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    min-height: calc(100vh - var(--header-height) - var(--banner-stack));
}

/* Sticky, so scrolling the long column on a laptop does not scroll the map
   out of sight. The orange strip can be above it here — the green one cannot,
   because this is the page it would be pointing at (chrome.js:214). */
.trip-map {
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height) - var(--banner-stack));
    background: var(--color-surface-variant);
}

.trip-map .map {
    width: 100%;
    height: 100%;
}

.trip-info {
    position: relative;
    padding: var(--spacing-md);
    background: var(--color-surface);
    border-left: 1px solid var(--color-border);
}

/* A narrow screen stacks them, map first and 300px tall: enough to see which
   street the car is in, and not so much that the price is below the fold
   (trip.php:53). */
@media (max-width: 992px) {
    .trip-layout {
        display: flex;
        flex-direction: column;
    }

    .trip-map {
        position: relative;
        top: auto;
        order: -1;
        width: 100%;
        height: 300px;
        min-height: 300px;
        flex-shrink: 0;
    }

    .trip-info {
        border-top: 1px solid var(--color-border);
        border-left: none;
    }
}

/* ── Trip: what is happening ────────────────────────────────────────────── */

.status-header {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}

/* The one moving thing on the page while a car is on its way. */
.status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto var(--spacing-xs);
    border-radius: 50%;
    animation: status-pulse 2s infinite;
}

.status-icon .icon {
    width: 24px;
    height: 24px;
}

@keyframes status-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
    .status-icon {
        animation: none;
    }
}

/* A colour per state, as over there (trip.php:105): blue while the car is
   coming, green when it is here or the trip is done, amber while driving,
   grey for a booking that is still in the future, red for a cancellation. */
.status-icon--en-route {
    background: rgba(88, 166, 255, 0.2);
    color: var(--color-info);
}

.status-icon--arrived,
.status-icon--completed {
    background: rgba(0, 200, 83, 0.2);
    color: var(--color-accent);
}

.status-icon--in-progress {
    background: rgba(210, 153, 34, 0.2);
    color: var(--color-warning);
}

.status-icon--scheduled {
    background: rgba(139, 148, 158, 0.2);
    color: var(--color-text-secondary);
}

.status-icon--cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-error);
}

.status-text {
    margin-bottom: 2px;
    font-size: 1.1rem;
    font-weight: 700;
}

.eta-text {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ── Trip: who is coming, and in what ───────────────────────────────────── */

.driver-section {
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-variant);
}

/* Shorter than the offer card's photo: by this point the car has been chosen,
   so the photo is for recognising it at the kerb rather than for judging it. */
.vehicle-gallery {
    position: relative;
    height: 100px;
    overflow: hidden;
    background: var(--color-surface);
}

.vehicle-gallery-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-gallery-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--color-surface);
    color: var(--color-text-muted);
}

.vehicle-gallery-placeholder .icon {
    width: 40px;
    height: 40px;
}

.vehicle-gallery .photo-nav-btn {
    width: 32px;
    height: 32px;
}

.vehicle-photo-counter {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 4px 8px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 0.7rem;
}

.driver-vehicle-content {
    padding: var(--spacing-sm);
}

.driver-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

/* A button, not a div: it opens the photo full size, and that is a control.
   44px, which is both the old size and a touch target (trip.php:219). */
.driver-avatar-lg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    flex-shrink: 0;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: var(--color-accent);
    color: #000;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.driver-avatar-lg:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.driver-avatar-lg img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Smaller than the offer card's name: there is only one driver now, so the
   name no longer has to be scanned (trip.php:301). */
.driver-title {
    margin-bottom: 1px;
    font-size: 0.95rem;
}

.driver-meta-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 0.85rem;
}

.vehicle-details-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

/* The tile, not the glyph: .vehicle-icon is the offer card's 15px icon and
   this is the 32px square it sits in over here (trip.php:335). */
.vehicle-icon-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: var(--color-accent-light);
    color: var(--color-accent);
}

.vehicle-icon-tile .icon {
    width: 18px;
    height: 18px;
}

.vehicle-details {
    flex: 1;
    min-width: 0;
}

.vehicle-model {
    font-size: 0.95rem;
    font-weight: 600;
}

.vehicle-specs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.vehicle-specs span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vehicle-specs .icon {
    width: 12px;
    height: 12px;
}

/* The one string a passenger reads off a kerb in the dark. */
.vehicle-plate-badge {
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-variant);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.contact-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.contact-buttons .btn {
    flex: 1;
    /* Narrow enough for three of them in a 420px column, which is what the old
       row's own padding comes to once the flex basis has been shared out
       (trip.php:388). */
    padding: 8px 12px;
}

/* ── Trip: the route, and what was asked for ────────────────────────────── */

.route-section {
    margin-bottom: var(--spacing-sm);
}

.route-section h2 {
    margin-bottom: var(--spacing-xs);
    color: var(--color-text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* The facts of the order, each in its own pill. Borrowed wholesale from the
   old page (trip.php:413) — the offers screen states the same things as a row
   of plain icons, because there they sit inside a bordered summary card. */
.trip-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.order-detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--color-surface-variant);
    color: var(--color-text-secondary);
    font-size: 0.8rem;
}

/* Wider than it is tall, which is what the chip is 48px wide for over there:
   a Font Awesome glyph at 0.75rem occupies 1.28em of line, not 0.75. */
.order-detail-chip .icon {
    width: 15px;
    height: 12px;
}

/* Amber, because a child seat is the one thing in this row that has to be
   right before the car arrives. */
.order-detail-chip--child {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.comment-section {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    background: var(--color-surface-variant);
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

.comment-section .icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Trip: the money ────────────────────────────────────────────────────── */

.price-section {
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    background: var(--color-accent-light);
    text-align: center;
}

.price-amount {
    color: var(--color-accent);
    font-size: 1.5rem;
    font-weight: 700;
}

.price-label {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* How it will be paid, in the same box as what it costs: a passenger who
   thinks the card was charged already will have no cash ready, and it is the
   driver who then has the problem. */
.payment-method-text {
    font-size: 1rem;
    font-weight: 600;
}

.payment-method-text--online {
    color: var(--color-info);
}

.payment-method-text--cash {
    color: var(--color-accent);
}

/* Left-aligned inside the centred box, as over there (trip.php:829): it is a
   sentence with a tick in front of it, not a heading. */
.paid-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.1);
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 600;
}

.paid-badge .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* ── Trip: the map's own controls ───────────────────────────────────────── */

/* Bottom left, clear of Leaflet's zoom buttons at the top left and its
   attribution at the bottom right (trip.php:489). */
.map-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 500;
    display: flex;
    gap: 8px;
}

.map-ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

.map-ctrl-btn .icon {
    width: 20px;
    height: 20px;
}

.map-ctrl-btn:hover,
.map-ctrl-btn.is-busy {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #000;
}

/* Nothing to show all of until the passenger has moved the map themselves, so
   it is invisible rather than absent: appearing in place reads as a response
   to the pan, and a button that is added to the DOM reads as a new control. */
.map-ctrl-btn--reset {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.map-ctrl-btn--reset.is-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* ── Trip: while it is still loading ───────────────────────────────────── */

/**
 * Over the column, not over the whole page.
 *
 * The map draws itself immediately and has nothing to wait for, so covering it
 * would hide the one thing that is already true. Everything in the column, by
 * contrast, arrives in a single snapshot and would otherwise flash as a page
 * of dashes first (trip.php:606).
 */
.trip-loading-overlay {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    min-height: calc(100vh - var(--header-height) - var(--banner-stack));
    background: var(--color-surface);
    transition: opacity 0.3s ease;
}

.trip-loading-overlay.is-done {
    opacity: 0;
    pointer-events: none;
}

.loading-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), #00a86b);
    color: #000;
    animation: pulse-glow 2s ease-in-out infinite;
}

.loading-icon .icon {
    width: 24px;
    height: 24px;
    animation: icon-bounce 1s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(34, 197, 94, 0); }
}

@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
    .loading-icon,
    .loading-icon .icon {
        animation: none;
    }
}

.loading-caption {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* ── Trip: the modals it ends in ───────────────────────────────────────── */

/* Both of these are the offers page's overlay with different contents, so the
   overlay and the card come from .driver-modal and only the blocks inside are
   new (trip.php:1645, :1700). */

.trip-modal__title {
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
    text-align: center;
}

/* Which way the ride is being paid for, said once more at the end: cash in
   the car is the case where saying it late still changes something. */
.trip-modal__banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.trip-modal__banner--online {
    border: 1px solid rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.trip-modal__banner--cash {
    border: 1px solid rgba(0, 200, 83, 0.3);
    background: rgba(0, 200, 83, 0.1);
    color: #00c853;
}

.trip-modal__banner .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* The agreed price, repeated with a warning: this is the moment a passenger
   who was asked for more than the fare still has the number in front of them
   and somewhere to report it. */
.trip-modal__warn {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
}

.trip-modal__warn .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #ef4444;
}

.trip-modal__warn-price {
    margin-bottom: 8px;
    font-weight: 600;
}

.trip-modal__warn-price span {
    color: var(--color-accent);
    font-size: 1.1rem;
}

.trip-modal__warn-text {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

.trip-modal__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: var(--color-accent);
    font-size: 0.85rem;
    text-decoration: none;
}

.trip-modal__link .icon {
    width: 14px;
    height: 14px;
    color: inherit;
}

/* A no-show is an accusation, so it is given its own page rather than a line
   in the status: what it means, what it cost, and how to disagree. */
.trip-modal__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-lg);
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
}

.trip-modal__mark .icon {
    width: 36px;
    height: 36px;
}

.trip-modal__head {
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.trip-modal__head h2 {
    margin-bottom: 8px;
    color: var(--color-error);
    font-size: 1.5rem;
}

.trip-modal__head p {
    margin: 0;
    color: var(--color-text-secondary);
}

.trip-modal__box {
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 12px;
    background: var(--color-surface-variant);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.trip-modal__box p {
    margin: 0;
}

.trip-modal__info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.trip-modal__info .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #3b82f6;
}

.trip-modal__info p {
    margin: 0;
}

.trip-modal__info .trip-modal__link {
    color: #3b82f6;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ── Trip: a photo, full size ──────────────────────────────────────────── */

/**
 * The driver's face, enlarged (trip.php:247).
 *
 * Above the modals rather than beside them: it is opened from the card that is
 * already a modal on the offers page, and a passenger checking a face against
 * the person at the kerb should not have the check appear behind the thing
 * they opened it from.
 */
.photo-lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.95);
    cursor: zoom-out;
}

.photo-lightbox.active {
    display: flex;
}

.photo-lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    object-fit: contain;
    cursor: default;
}

.photo-lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s;
}

.photo-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.photo-lightbox__close .icon {
    width: 20px;
    height: 20px;
}

/* ── Rides list ─────────────────────────────────────────────────────────── */

/* The old page's own padding is 48px top (rides.php:12). <main> already brings
   24 of it, so this adds the other 24 and the title lands where it does over
   there. */
.rides-container {
    padding: var(--spacing-lg) 0 var(--spacing-xl);
    /* So one card, or none, does not leave the footer halfway up the screen
       (rides.php:13). */
    min-height: calc(100vh - 200px);
}

.rides-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.rides-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    /* The body's 1.5 on a 32px heading is 6px taller than the old page's bar,
       which puts the whole list down the page. */
    line-height: 1.3;
}

.rides-tools {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Book another one. A 40px accent circle, which is why the icon inside it is a
   bare cross and not plus-circle. */
.rides-new {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: var(--color-on-accent);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.rides-new:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3);
}

/* Two states of one list, as a segmented control (rides.php:55). */
.rides-tabs {
    display: flex;
    gap: var(--spacing-sm);
    padding: 4px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
}

.rides-tab {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--color-text-secondary);
    font-family: inherit;
    font-size: var(--font-size-sm);
    font-weight: 600;
    /* The old control declares no size at all and gets the browser's 13.33px
       button default, which makes it 41px tall. 14px is the nearest size on
       our scale; the tighter leading is what keeps the height the same. */
    line-height: 1.1;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.rides-tab:hover:not(.is-on) {
    background: var(--color-surface-variant);
    color: var(--color-text-primary);
}

.rides-tab.is-on {
    background: var(--color-accent);
    color: var(--color-on-accent);
}

/* The glyph over an empty tab: a car when nothing is booked, a clock turned
   back when nothing has finished. Decoration, so it stays quiet. */
.state__glyph {
    width: 64px;
    height: 64px;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-muted);
    opacity: 0.5;
}

.ride-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/**
 * Waiting, in the shape of the answer (rides.php:241).
 *
 * The pulse is handled by the global reduced-motion block at the top of this
 * file, which stops every animation here at once.
 */
.ride-skeleton {
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
}

.ride-skeleton__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.ride-skeleton__line {
    display: block;
    height: 14px;
    border-radius: 6px;
    background: var(--color-surface-variant);
    animation: ride-skeleton 1.4s ease-in-out infinite;
}

.ride-skeleton__line--date {
    width: 38%;
}

.ride-skeleton__line--price {
    width: 20%;
    height: 18px;
}

.ride-skeleton__line--route {
    width: 72%;
    margin-bottom: 10px;
}

.ride-skeleton__line--route-alt {
    width: 54%;
}

@keyframes ride-skeleton {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* The whole card is the link: on a list of rides the only useful action is
   "open it", and a card with a small link inside it is a smaller target for no
   reason. */
.ride-card {
    display: block;
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
    color: var(--color-text-primary);
    text-decoration: none;
    transition: border-color var(--transition-fast), transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.ride-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 200, 83, 0.15);
}

.ride-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.ride-card__meta {
    min-width: 0;
}

.ride-card__flags {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/**
 * What is happening to this ride, in its own colour.
 *
 * Eight tints rather than three tones: this is the one line of the card that
 * answers the question the page was opened with, and the old page has taught
 * these colours to every passenger who has used the service — blue for a time
 * in the future, green for a driver who is here or a ride that is done, amber
 * for one under way, red for one that did not happen.
 */
.ride-card__state {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    /* The old badge is an inline span, so its box is the text and the padding
       and the page's leading never reaches it. Here it is a flex item, and
       this is the number that keeps the pill 23px tall. */
    line-height: 1.25;
    white-space: nowrap;
}

.ride-card__state[data-status="pending"] {
    background: rgba(107, 114, 128, 0.15);
    color: var(--color-text-secondary);
}

.ride-card__state[data-status="scheduled"],
.ride-card__state[data-status="driverEnRoute"] {
    background: rgba(88, 166, 255, 0.15);
    color: var(--color-info);
}

.ride-card__state[data-status="driverArrived"],
.ride-card__state[data-status="completed"] {
    background: rgba(34, 197, 94, 0.15);
    color: var(--color-accent);
}

.ride-card__state[data-status="inProgress"] {
    background: rgba(210, 153, 34, 0.15);
    color: var(--color-warning);
}

/* noShow has no colour of its own over there, because the old page never shows
   it. It belongs with the ride that did not happen. */
.ride-card__state[data-status="cancelled"],
.ride-card__state[data-status="noShow"] {
    background: rgba(248, 81, 73, 0.15);
    color: var(--color-error);
}

/* Offers waiting is not a status among others: it is the only one that needs
   the passenger to do something. */
.ride-card__state[data-status="bidding"] {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-weight: 700;
    animation: ride-badge 2s ease-in-out infinite;
}

@keyframes ride-badge {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { transform: scale(1.03); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

/**
 * Unread messages, as a count.
 *
 * Solid accent rather than the tinted pill the status uses: this is the one
 * thing in the card that asks to be acted on, and it has to win against a
 * status badge sitting right beside it. The old list has no such badge — a
 * passenger over there finds out a driver wrote only by opening the trip.
 */
.ride-card__unread,
.btn__badge {
    flex-shrink: 0;
    min-width: 1.25rem;
    padding: 1px var(--spacing-xs);
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: var(--color-on-accent);
    font-size: var(--font-size-xs);
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.ride-card__date {
    display: block;
    margin-top: var(--spacing-sm);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* The order number, which is what support asks for. The separator is drawn
   here so it keeps the muted colour of the date rather than the accent of the
   number, and so a ride with no number has no stray bullet. */
.ride-card__ref {
    color: var(--color-accent);
    font-weight: 600;
}

.ride-card__ref:not(:empty)::before {
    content: ' • ';
    color: var(--color-text-muted);
    font-weight: 400;
}

.ride-card__price {
    flex-shrink: 0;
    color: var(--color-accent);
    font-size: var(--font-size-lg);
    font-weight: 700;
}

/**
 * The street under the name, rather than behind it.
 *
 * Everywhere else in web2 a place is one line — name in bold, street trailing
 * it — because two lines each would push the second route dot away from the
 * word it belongs to. On a card the dots have the height to spare, and the old
 * list puts the street on its own line at 0.8rem (rides.php:703).
 */
.ride-card .route-address__sub {
    display: block;
    margin-top: 2px;
    font-size: 0.8rem;
}

/**
 * Drivers have answered (rides.php:294).
 *
 * The card changes colour, grows a shimmer along its top edge and carries a
 * block saying what to do about it. It is the loudest thing in web2, and
 * deliberately so: every hour an order sits on offers it has not accepted is an
 * hour a driver is holding a price open.
 */
.ride-card--offers {
    position: relative;
    overflow: hidden;
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(251, 191, 36, 0.05) 100%);
}

.ride-card--offers::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
    background-size: 200% 100%;
    animation: ride-shimmer 2s ease-in-out infinite;
}

@keyframes ride-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.ride-card--offers:hover {
    border-color: #fbbf24;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
    transform: translateY(-3px);
}

.ride-offers {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: var(--spacing-md);
    padding: 14px 18px;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.12));
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
    animation: ride-offers-glow 2s ease-in-out infinite;
}

@keyframes ride-offers-glow {
    0%, 100% { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2); }
    50% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4); }
}

.ride-offers__glyph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    animation: ride-offers-glyph 2s ease-in-out infinite;
}

@keyframes ride-offers-glyph {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.ride-offers__glyph .icon {
    width: 16px;
    height: 16px;
}

.ride-offers__text {
    flex: 1;
    min-width: 0;
}

.ride-offers__title {
    display: block;
    color: #d97706;
    font-size: var(--font-size-base);
    font-weight: 700;
}

.ride-offers__body {
    display: block;
    margin-top: 3px;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.ride-offers__arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #f59e0b;
    animation: ride-offers-arrow 1s ease-in-out infinite;
}

@keyframes ride-offers-arrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

/* Booked for a time in the future, which the date in the header does not say:
   that one is when the ride was ordered. */
.ride-booked {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: var(--spacing-sm);
    padding: 8px 12px;
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 8px;
    background: rgba(88, 166, 255, 0.1);
    color: var(--color-info);
    font-size: var(--font-size-sm);
}

.ride-booked .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* How many are travelling, with what, how far and for how long. */
.ride-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border);
}

.ride-fact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.ride-fact .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-text-muted);
}

/* What the passenger wrote for the driver, quoted and clipped in the JS. */
.ride-note {
    display: block;
    margin-top: var(--spacing-sm);
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--color-surface-variant);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-style: italic;
}

.ride-pay {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--color-accent);
    font-size: 0.85rem;
}

/* Already paid for reads differently from still to pay. */
.ride-pay[data-method="online"] {
    color: var(--color-info);
}

.ride-pay__glyph--online,
.ride-pay__glyph--cash {
    display: flex;
    flex-shrink: 0;
}

.ride-pay .icon {
    width: 16px;
    height: 16px;
}

.ride-driver {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-variant);
}

/* The first letter of the driver's name. There is a photo on the trip page;
   here it would be a read per card. */
.ride-driver__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--color-accent);
    color: #ffffff;
    font-weight: 600;
}

.ride-driver__info {
    flex: 1;
    min-width: 0;
}

.ride-driver__name {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.ride-driver__car {
    display: block;
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}

/* ── Notices ────────────────────────────────────────────────────────────── */

.notice {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
}

/* There is no warning-tint token, and inventing one for a single notice would
   mean keeping it correct in three palettes. The surface plus a warning-
   coloured border reads the same and uses what already exists. */
.notice--warn {
    background: var(--color-surface-variant);
    border: 1px solid var(--color-warning);
    color: var(--color-text-primary);
}

.notice--ok {
    background: var(--color-accent-light);
    border: 1px solid var(--color-accent);
    color: var(--color-text-primary);
}

/* ── Stars ──────────────────────────────────────────────────────────────── */

.stars {
    /* The colour a chosen star takes. Amber in the trip's rating modal, where
       it becomes the star shown beside the driver's rating (trip.php:1677). */
    --star-fill: var(--color-accent);
    display: flex;
    gap: var(--spacing-xs);
    margin: 0;
    padding: 0;
    border: 0;
}

/* Centred and a little smaller, because here the five of them are the middle
   of a modal rather than a row in a card. The spacing is the old modal's: a
   2rem glyph in a button with 8px of padding (trip.php:596). */
.stars--modal {
    justify-content: center;
    gap: var(--spacing-sm);
    --star-fill: var(--color-warning);
}

.stars--modal .stars__item {
    padding: 8px;
}

.stars--modal .stars__icon {
    width: 32px;
    height: 32px;
}

.stars__item {
    cursor: pointer;
}

/* The radio stays a radio — hidden from view, still focusable and announced. */
.stars__item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.stars__icon {
    width: 36px;
    height: 36px;
    color: var(--color-border);
    transition: color var(--transition-fast), fill var(--transition-fast);
}

/**
 * Fill every star up to the one chosen.
 *
 * Driven by data-rating on the fieldset rather than by :checked, because a
 * radio can only style itself and its later siblings — and the stars that need
 * filling are the earlier ones.
 *
 * nth-of-type, not nth-child: the fieldset's first child is its <legend>, so
 * by position the first star is the second child and every count would be off
 * by one. Counted among labels, the stars are 1 to 5.
 */
.stars[data-rating="1"] .stars__item:nth-of-type(-n+1) .stars__icon,
.stars[data-rating="2"] .stars__item:nth-of-type(-n+2) .stars__icon,
.stars[data-rating="3"] .stars__item:nth-of-type(-n+3) .stars__icon,
.stars[data-rating="4"] .stars__item:nth-of-type(-n+4) .stars__icon,
.stars[data-rating="5"] .stars__item:nth-of-type(-n+5) .stars__icon {
    color: var(--star-fill);
    fill: var(--star-fill);
}

.stars__item:hover .stars__icon {
    color: var(--star-fill);
}

.stars__item:has(input:focus-visible) .stars__icon {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ── Hero (scaffold landing) ────────────────────────────────────────────── */

.hero {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-xl) 0;
}

.hero__title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero__text {
    color: var(--color-text-secondary);
    max-width: 52ch;
}

/* ── Account ────────────────────────────────────────────────────────────── */

/**
 * The page, and who it belongs to.
 *
 * Ported from the old account page (profile.php:12, :20), which keeps its
 * styles in the page: 12px of air above the header, the avatar at 56px with
 * the name, the number and two or three figures beside it. One difference,
 * and it is the old page's bug: it sets `height: calc(100vh - 70px)` and
 * `overflow: hidden` on the container, which cuts the sign-out row off on a
 * short window. web2 lets the page scroll.
 */
.profile-container {
    padding: 12px 0;
}

/* 600px, as the old page's .container-sm is (style.css:196). */
.container--account {
    max-width: 600px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: var(--spacing-sm);
    padding: 12px var(--spacing-md);
}

.profile-avatar {
    position: relative;
    display: flex;
    overflow: hidden;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    border-radius: 50%;
    color: #000;
    font-size: 1.5rem;
    font-weight: 700;
}

/* The photo covers the letter rather than replacing it: if it fails to load,
   the initial is still there underneath. */
.profile-avatar img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info {
    min-width: 0;
    flex: 1;
}

.profile-name {
    margin-bottom: 1px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.profile-phone {
    color: var(--color-text-secondary);
    font-size: 0.8rem;
}

.stats-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.stat-inline {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.stat-inline .value {
    color: var(--color-accent);
    font-weight: 700;
}

.stat-inline .icon {
    width: 11px;
    height: 11px;
}

/* The version line, which is where the old page ends (profile.php:336). */
.app-version {
    padding: 8px 0;
    color: var(--color-text-muted);
    font-size: 0.7rem;
    line-height: 1.6;
    text-align: center;
}

/* A phone gets a smaller avatar and a tighter header, as it does over there
   (profile.php:345). */
@media (max-width: 768px) {
    .profile-container {
        padding: 8px 0;
    }

    .profile-header {
        padding: 10px 12px;
    }

    .profile-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .profile-name {
        font-size: 1rem;
    }
}

/**
 * Deleting the account.
 *
 * A link, in the error colour, last on the page and with room around it — the
 * one thing here that cannot be undone should not sit where a thumb lands
 * after signing out.
 */
.profile-danger {
    margin-top: var(--spacing-xl);
    text-align: center;
    font-size: var(--font-size-sm);
}

.profile-danger a {
    color: var(--color-error);
}

/* ── Account: preferences ──────────────────────────────────────────────── */

/**
 * The rows the page is made of.
 *
 * Ported from the old account page (profile.php:88-161), which keeps its
 * styles in the page: a card with an uppercase caption, then rows of a
 * coloured icon tile, a title over a subtitle, and a chevron. A row is a
 * button, a link or a form's submit depending on what it does, and all three
 * are styled as the same row.
 */
.settings-section {
    margin-bottom: 8px;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    /* 10px, 8px and 12px below are the old page's own radii, which do not sit
       on web2's scale — copied rather than rounded to the nearest token, so a
       row here and a row there are the same shape. */
    border-radius: 10px;
}

.settings-header {
    padding: 6px 12px;
    background: var(--color-surface-variant);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.6;
    text-transform: uppercase;
}

.settings-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: var(--color-surface-variant);
}

.settings-icon {
    display: flex;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.settings-icon .icon {
    width: 15px;
    height: 15px;
}

/* The tints are the old page's own (profile.php:137). */
.settings-icon--orange {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.settings-icon--blue {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
}

.settings-icon--green {
    background: rgba(34, 197, 94, 0.15);
    color: #22C55E;
}

.settings-icon--red {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.settings-content {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

/* 1.6 is the old page's body line-height, which these rows inherit over
   there; web2's is tighter, so the two lines are named here. */
.settings-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.6;
}

.settings-subtitle {
    color: var(--color-text-muted);
    font-size: 0.7rem;
    line-height: 1.6;
}

.settings-title--danger {
    color: var(--color-error);
}

/* 7px wide, because that is what the old page's chevron takes: a Font Awesome
   glyph at 0.7rem, whose advance is 0.625em. A wider icon here would steal
   room from the title beside it and the two rows would wrap differently. */
.settings-arrow {
    width: 7px;
    height: 11px;
    flex-shrink: 0;
    color: var(--color-text-muted);
}

/* The list is narrower than the other modals, as the old one is, and sits in
   16px of padding rather than the 24 the driver card needs
   (profile.php:179). */
.driver-modal-content--settings {
    max-width: 320px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.driver-modal-content--settings .modal-body {
    /* 16px at both widths: the old modal does not narrow its padding on a
       phone, and --spacing-md does. */
    padding: 16px;
}

.settings-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.settings-modal-head h2 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.settings-modal-close {
    padding: 2px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
}

.settings-modal-close:hover {
    color: var(--color-text-primary);
}

.settings-modal-close .icon {
    width: 18px;
    height: 18px;
}

/**
 * The form inside a settings modal.
 *
 * The old page dresses its two fields down — 0.75rem label, 0.85rem input in
 * 8px of padding, 6px radius (profile.php:295) — against web2's own controls,
 * which are a page's worth of form and 52px tall. In a 320px modal the page's
 * controls are the wrong size, so these are the old page's. The button keeps
 * web2's 44px, because that is a thumb target rather than a decoration, and
 * the old page's 35px is one of the places that shows its age.
 */
.settings-modal-form .field {
    margin-bottom: 10px;
}

.settings-modal-form .field__label {
    margin-bottom: 4px;
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
}

.settings-modal-form .input {
    min-height: 0;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.settings-modal-form .btn {
    margin-top: 6px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.settings-modal-form .field__hint,
.settings-modal-form .field__error,
.settings-modal-form .notice {
    font-size: 0.7rem;
}

.theme-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--color-surface-variant);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--color-text-primary);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-option:hover {
    border-color: var(--color-border);
}

.theme-option.active {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
}

.theme-option-icon {
    display: flex;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.theme-option-icon .icon {
    width: 16px;
    height: 16px;
}

.theme-option.active .theme-option-icon {
    background: var(--color-accent);
    color: #000;
}

.theme-option-content {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.theme-option-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.6;
}

.theme-option-desc {
    color: var(--color-text-muted);
    font-size: 0.7rem;
    line-height: 1.6;
}

/* Only the chosen row shows a check, but every row keeps its place so the
   titles do not shift when the choice moves. */
.theme-option-check {
    display: flex;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    border-radius: 50%;
    color: #000;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.theme-option-check .icon {
    width: 11px;
    height: 11px;
}

.theme-option.active .theme-option-check,
.theme-option-check--on {
    opacity: 1;
}

/* A phone gets tighter rows and a smaller tile, as it does over there
   (profile.php:365). The lists are the same at both widths. */
@media (max-width: 768px) {
    .settings-item {
        padding: 6px 10px;
    }

    .settings-icon {
        width: 24px;
        height: 24px;
    }

    .settings-icon .icon {
        width: 13px;
        height: 13px;
    }
}

/* ── Messages: the list of conversations ────────────────────────────────── */

/**
 * Ported from the old messages.php, which keeps its styles in the page.
 *
 * The list is full width — the old one sits in a plain .container, so the
 * cards run to 1200px on a desktop — and each card is one row: a 50px circle,
 * the driver's name with the time of the last line, that line, the order
 * number, and then either a counter or a chevron.
 */
.messages-container {
    padding: var(--spacing-xl) 0;
    min-height: calc(100vh - 200px);
}

.messages-header {
    margin-bottom: var(--spacing-xl);
}

.messages-header h1 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.75rem;
    font-weight: 700;
    /* The heading's own, rather than the body's 1.5: with an icon beside it the
       extra leading shows as a taller bar above the list (messages.php:21). */
    line-height: 1.3;
}

.messages-header .icon {
    width: 26px;
    height: 26px;
}

.chats-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.chat-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    transition: border-color var(--transition-fast), transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.chat-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* An unread conversation is marked twice over there — a bar down the left and
   a tinted card — because it is the one row in the list that is worth
   finding at a glance. */
.chat-card.unread {
    border-left: 3px solid var(--color-accent);
    background: var(--color-accent-light);
}

.chat-avatar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Over the letter, not instead of it: a photo that fails to load leaves the
   initial rather than an empty green circle. */
.chat-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-info {
    display: block;
    flex: 1;
    min-width: 0;
}

.chat-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

/*
 * The three lines of a card carry the old body's leading, not this one's.
 *
 * 1.6 against 1.5 is 4px across the three of them, which is the difference
 * between a 113px card over there and a 109px card here.
 */
.chat-name {
    overflow: hidden;
    color: var(--color-text-primary);
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.chat-time {
    flex-shrink: 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    line-height: 1.6;
}

.chat-preview {
    display: block;
    overflow: hidden;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.chat-card.unread .chat-preview {
    color: var(--color-text-primary);
    font-weight: 500;
}

.chat-order-tag {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--color-surface-variant);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    line-height: 1.6;
}

/* Amber would read as a warning here; the old page uses the accent with black
   text, which is the same pair the rides list uses for a live ride. */
.chat-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: #000000;
    font-size: var(--font-size-xs);
    font-weight: 700;
}

.chat-chevron {
    display: flex;
    flex-shrink: 0;
    color: var(--color-text-muted);
}

/* The old chevron is a Font Awesome glyph at the body size, which draws 10px
   wide and 16px tall (messages.php:281). */
.chat-chevron .icon {
    width: 16px;
    height: 16px;
}

.empty-state {
    padding: var(--spacing-2xl);
    color: var(--color-text-secondary);
    text-align: center;
}

.empty-state .icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--spacing-lg);
    color: var(--color-border);
}

.empty-state h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
    font-size: 1.25rem;
}

/* The shape of the thing being loaded, which does not claim to report progress
   nobody can measure (messages.php:159). */
.chat-skeleton {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
}

.skel-avatar {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--color-surface-variant);
    animation: skel-fade 1.4s ease-in-out infinite;
}

.skel-body {
    flex: 1;
    min-width: 0;
}

.skel-line {
    height: 13px;
    border-radius: 6px;
    background: var(--color-surface-variant);
    animation: skel-fade 1.4s ease-in-out infinite;
}

.skel-name {
    width: 42%;
    margin-bottom: 10px;
}

.skel-preview {
    width: 76%;
}

@keyframes skel-fade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* ── Messages with the driver ───────────────────────────────────────────── */

/**
 * The two ways to reach the driver.
 *
 * Side by side where there is room and stacked where there is not, from the
 * buttons' own width rather than from a breakpoint — the Icelandic labels are
 * long enough that the same phone fits two on one line and the same desktop
 * sometimes does not.
 */
.trip-reach {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.trip-reach .btn {
    flex: 1 1 11rem;
}

/**
 * The shell.
 *
 * The one page here that is not a scrolling document: a column as tall as what
 * is left of the viewport, with the conversation scrolling inside it and the
 * composer under it where a thumb expects it (chat.php:20).
 *
 * The old page subtracts 90px on a desktop and 85px on a phone — its bar plus
 * the padding its <main> keeps. This one subtracts the bar, because <main> has
 * given up its padding for this page (render.php:578), which lands the
 * composer on the same line of the viewport.
 *
 * dvh after vh: the dynamic unit is what keeps the composer above a phone's
 * address bar as it hides, and the static one is the fallback.
 *
 * The strips under the bar are subtracted too. The old page does this by hand
 * and gets it wrong — it takes off 65px for a strip that measures 79
 * (chat.php:26), so the composer ends up 14px below the fold. Here the number
 * comes from the strips' own stylesheet.
 */
.chat-shell {
    height: calc(100vh - var(--header-height) - var(--banner-stack));
    height: calc(100dvh - var(--header-height) - var(--banner-stack));
    overflow: hidden;
}

.chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    background: var(--color-surface);
}

/* ── Who this conversation is with ──────────────────────────────────────── */

.chat__head {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.chat__back {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-surface-variant);
    color: var(--color-text-primary);
    transition: background-color var(--transition-fast);
}

.chat__back:hover {
    background: var(--color-border);
}

.chat__who {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
    min-width: 0;
}

.chat__avatar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Over the letter, not instead of it: a photo that fails to load leaves the
   initial rather than an empty green circle. */
.chat__avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat__ident {
    min-width: 0;
}

.chat__name {
    overflow: hidden;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 1.6, as the line this sits on measures over there: the old page's span is
   inline and takes the body's leading (chat.php:100). */
.chat__order {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    line-height: 1.6;
}

/* A pill, not a button: it is the quietest thing in the row over there, and
   `.btn` would give it a 44px floor and an accent border. */
.chat__trip {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex: 0 0 auto;
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    background: var(--color-surface-variant);
    color: var(--color-text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color var(--transition-fast);
}

.chat__trip:hover {
    background: var(--color-border);
}

.chat__trip .icon {
    width: 14px;
    height: 14px;
}

/* ── The conversation ───────────────────────────────────────────────────── */

.chat__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
}

.chat__msgs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/**
 * A bubble, which is the row itself.
 *
 * 75% of the column, the corner nearest its own side squared off, and the two
 * sides told apart by colour as well as by position — all four read off the
 * old page (chat.php:129).
 */
.msg {
    max-width: 75%;
    margin-bottom: 2px;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.msg[data-own="0"] {
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    background: var(--color-surface-variant);
    color: var(--color-text-primary);
}

.msg[data-own="1"] {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    background: var(--color-accent);
    color: #000000;
}

/* Where the conversation changes hands, so a run of replies reads as one
   answer and not as four. */
.msg[data-own="1"] + .msg[data-own="0"],
.msg[data-own="0"] + .msg[data-own="1"] {
    margin-top: 12px;
}

/**
 * Something the system wrote: an announcement, not a side of the conversation.
 *
 * The old page has no style for these and draws them as the driver's own words
 * (chat.php:497), which is how a passenger comes to read "trip cancelled" as a
 * message from their driver.
 */
.msg[data-system="1"] {
    align-self: center;
    max-width: 85%;
    padding: 4px 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    text-align: center;
}

/* pre-wrap: a driver's line breaks are theirs to keep. */
.msg__text {
    white-space: pre-wrap;
}

/**
 * A photo.
 *
 * Drawn, where the old page drops it and leaves an empty bubble (chat.php:499
 * reads nothing but `text`) — a driver photographing the kerb they are waiting
 * at is the one message where the picture is the whole point.
 */
.msg__image {
    display: block;
    max-width: 250px;
    height: auto;
    margin-top: 4px;
    border-radius: 12px;
}

.msg__meta {
    display: block;
    margin-top: 4px;
    font-size: 0.7rem;
    text-align: right;
    opacity: 0.7;
}

.msg[data-own="0"] .msg__meta,
.msg[data-system="1"] .msg__meta {
    text-align: left;
}

.msg[data-system="1"] .msg__meta {
    text-align: center;
}

/* Whether the driver has read it. Inside our own bubble, so it inherits the
   black-on-accent pair rather than needing a colour of its own. */
.msg__read::before {
    content: '·';
    margin: 0 4px;
}

/* ── What is in its place ───────────────────────────────────────────────── */

/**
 * The wait, as over there: a pulsing ring around an envelope (chat.php:290).
 *
 * The gradient's second colour and the ring's green are the old page's own
 * literals, which predate the theme tokens and are the same green in both
 * themes — the shape is a logo, not a surface.
 */
.chat__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: var(--spacing-lg);
    padding: var(--spacing-2xl);
}

.chat__loading-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-accent), #00a86b);
    color: #000000;
    animation: chat-glow 2s ease-in-out infinite;
}

.chat__loading-icon .icon {
    width: 20px;
    height: 20px;
    animation: chat-bounce 1s ease-in-out infinite;
}

.chat__loading-text {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

@keyframes chat-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
}

@keyframes chat-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* A pulsing ring is decoration, not content. */
@media (prefers-reduced-motion: reduce) {
    .chat__loading-icon,
    .chat__loading-icon .icon {
        animation: none;
    }
}

/**
 * An empty thread, and a conversation that cannot be opened.
 *
 * The old page's own empty state: centred in the scroller, with a large faded
 * icon above it (chat.php:229).
 */
.chat__state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: var(--spacing-sm);
    padding: var(--spacing-xl);
    color: var(--color-text-muted);
    text-align: center;
}

.chat__state .icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--spacing-md);
    opacity: 0.3;
}

/* Muted and unemphasised, as over there: an empty conversation is a state, not
   a warning, and the old page gives it no weight of its own (chat.php:229). */
.chat__state-title {
    font-size: 1rem;
}

.chat__state-text {
    font-size: var(--font-size-sm);
}

/* ── Writing ────────────────────────────────────────────────────────────── */

.chat__composer {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

/* Not `.input`: that one is a 44px-tall field with a 10px radius, and this is
   the old page's pill (chat.php:185). */
.chat__input {
    flex: 1;
    min-width: 0;
    resize: none;
    max-height: 120px;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 24px;
    background: var(--color-surface-variant);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.chat__input:focus {
    border-color: var(--color-accent);
    outline: none;
}

.chat__send {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: #000000;
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.chat__send .icon {
    width: 20px;
    height: 20px;
}

.chat__send:hover:not(:disabled) {
    background: var(--color-accent-hover);
    transform: scale(1.05);
}

.chat__send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Inside the shell, so it cannot push the composer off the viewport. */
.chat__error {
    padding: var(--spacing-sm) var(--spacing-lg) 0;
    color: var(--color-error);
    font-size: var(--font-size-sm);
    text-align: center;
}

/* ── The conversation on a phone ────────────────────────────────────────── */

@media (max-width: 768px) {
    /* The old page's phone numbers, written out rather than taken from the
       spacing scale: --spacing-md is 14px here and 16px on a desktop, and the
       two rows either end of this page are 8px/14px at both widths. */
    .chat__head,
    .chat__composer {
        padding: 8px 14px;
    }

    .chat__head {
        gap: 14px;
    }

    .chat__body {
        padding: 14px;
    }

    .chat__error {
        padding: 8px 14px 0;
    }

    /* Room for the home bar under the composer, as over there (chat.php:340). */
    .chat__composer {
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }

    /* The row has no space for it, and the trip is a tap away through the
       conversation list anyway. */
    .chat__trip {
        display: none;
    }
}

/* ── Desktop ────────────────────────────────────────────────────────────── */

@media (min-width: 769px) {
    /* The gutter stays 16px at every width, as the old web's does
       (style.css:189 has no desktop override). It only shows on a container
       that actually reaches 1200px — which is the bar and the footer — and
       there the old logo sits 56px from the edge of a 1280 viewport. */

    .main:not(.main--map):not(.main--flush) {
        padding: var(--spacing-xl) 0 var(--spacing-2xl);
    }

    .hero__title {
        font-size: var(--font-size-3xl);
    }
}

/* ── QR order page (qr.php) ─────────────────────────────────────────────── */

.qr-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    text-align: center;
}

.qr-state[hidden] {
    display: none;
}

.qr-state .auth-hint {
    margin-bottom: 0;
}

.qr-state__icon {
    width: 40px;
    height: 40px;
    color: var(--color-warning);
}

.qr-place {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface-variant);
}

.qr-place__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: var(--color-accent);
}

.qr-place__label {
    display: block;
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.qr-place__name {
    display: block;
    color: var(--color-text-primary);
}

.qr-place__address {
    display: block;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.qr-signed-in {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.qr-signed-in[hidden] {
    display: none;
}

.btn-link {
    padding: 0;
    border: none;
    background: none;
    color: var(--color-accent);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.qr-note {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.qr-note .icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--color-accent);
}
