/* =========================================================================
   Civitavecchia Cab Service — landing page
   Written mobile first: the base rules target small screens, the media
   queries only add what wider viewports can afford.
   ========================================================================= */

:root {
    /*
     * --accent, --accent-strong, --ink-900 and --ink-800 are set per brand in
     * an inline <style> from config/brands/<slug>.yaml. The values here are the
     * fallbacks used if that block is ever missing.
     */
    --ink-900: #12131a;
    --ink-800: #1b1d27;
    --ink-700: #2b2e3c;
    --ink-500: #575c6e;
    --ink-400: #767c8f;
    --ink-300: #9aa0b1;

    --line: #e6e7ec;
    --line-strong: #d3d5de;

    --surface: #ffffff;
    --surface-muted: #f6f7f9;
    --surface-sunken: #eef0f4;

    --accent: #f4a827;
    --accent-strong: #dd9312;
    --accent-ink: #12131a;


    --danger: #c8102e;
    --good: #1a7f4b;

    --radius-sm: 0.625rem;
    --radius-md: 0.875rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.75rem;

    --shadow-card: 0 1.5rem 3rem -1.25rem rgba(18, 19, 26, 0.45);
    --shadow-pop: 0 1rem 2.5rem -0.75rem rgba(18, 19, 26, 0.3);

    --shell: 72rem;
    --gutter: 1.25rem;

    /* Drop a photo in here to replace the placeholder hero gradient. */
    --hero-image: none;

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Components below set display, which would otherwise defeat the attribute. */
[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--ink-900);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

body.has-picker-open {
    overflow: hidden;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

p {
    margin: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
}

:where(a, button, summary, input, [tabindex]):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 0.35rem;
}

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

.skip-link {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-900);
    font-weight: 600;
    transform: translateY(-160%);
    transition: transform 0.18s ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.shell--narrow {
    max-width: 46rem;
}

/* -------------------------------------------------------------- buttons -- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: 0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 650;
    cursor: pointer;
    transition: background-color 0.16s ease, transform 0.16s ease;
}

.btn--primary {
    background: var(--ink-900);
    color: #fff;
}

.btn--primary:hover {
    background: var(--ink-700);
}

.btn--primary:active {
    transform: translateY(1px);
}

/* --------------------------------------------------------------- header -- */

.site-header {
    position: relative;
    z-index: 30;
    padding-block: 1rem;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    --shell: 100%;
}

.brand img {
    height: 2rem;
    width: auto;
}

.lang {
    position: relative;
}

.lang__button {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: border-color 0.16s ease, transform 0.16s ease;
}

.lang__button:hover {
    border-color: #fff;
    transform: scale(1.04);
}

.lang__button .flag {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lang__menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    min-width: 11rem;
    padding: 0.35rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    /* The header sits on the dark hero, so reset the inherited white. */
    color: var(--ink-900);
    box-shadow: var(--shadow-pop);
}

.lang__item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 550;
}

.lang__item:hover {
    background: var(--surface-muted);
}

.lang__item.is-active {
    color: var(--ink-900);
    font-weight: 700;
}

.lang__flag {
    display: block;
    width: 1.35rem;
    height: 1.35rem;
    overflow: hidden;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(18, 19, 26, 0.15);
}

.lang__flag .flag {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ----------------------------------------------------------------- hero -- */

.hero {
    position: relative;
    isolation: isolate;
    color: #fff;
    padding-bottom: 2.5rem;
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: var(--ink-900);
    /* Light enough to read white text over, dark enough to let the photo
       through; it still closes on the page colour at the foot. */
    background-image:
        linear-gradient(180deg,
            color-mix(in srgb, var(--ink-900) 45%, transparent) 0%,
            color-mix(in srgb, var(--ink-900) 60%, transparent) 65%,
            color-mix(in srgb, var(--ink-900) 88%, transparent) 100%),
        radial-gradient(120% 80% at 20% 0%, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 55%),
        var(--hero-image, none);
    background-size: cover;
    background-position: center;
}

.hero__inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 1.5rem;
}

.hero__heading {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.hero__title {
    font-size: clamp(1.9rem, 7vw, 2.6rem);
    font-weight: 750;
}

.hero__subtitle {
    font-size: clamp(1rem, 3.6vw, 1.15rem);
    font-weight: 450;
    line-height: 1.5;
    color: color-mix(in srgb, #fff 82%, transparent);
}

.hero__card {
    padding: 1rem;
    border-radius: var(--radius-xl);
    background: var(--surface);
    color: var(--ink-900);
    box-shadow: var(--shadow-card);
}

.trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

.trust li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.trust .icon {
    width: 1rem;
    height: 1rem;
    color: var(--accent);
}

/* -------------------------------------------------------- booking form -- */

.booking__fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

.field:focus-within {
    border-color: var(--ink-700);
    background: var(--surface);
}

.field--invalid {
    border-color: var(--danger);
}

/* A search sent back from the quote step, e.g. a pick-up inside the hour. */
.form-error {
    margin-bottom: 0.75rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--danger) 8%, #fff);
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 600;
}

.field__icon {
    display: grid;
    place-items: center;
    color: var(--ink-400);
}

.field__body {
    flex: 1;
    min-width: 0;
}

.field__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 550;
    color: var(--ink-400);
}

.field__input {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink-900);
}

.field__input::placeholder {
    font-weight: 500;
    color: var(--ink-300);
}

.field__input:focus {
    outline: none;
}

.field__input--button {
    display: block;
    text-align: start;
    cursor: pointer;
}

.field__value {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.field__value.is-placeholder {
    font-weight: 500;
    color: var(--ink-300);
}

.field-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

/* ------------------------------------------------------------ return leg -- */

.add-return {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.85rem 0.9rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    background: transparent;
    font-weight: 600;
    color: var(--ink-500);
    cursor: pointer;
    transition: border-color 0.16s ease, color 0.16s ease;
}

.add-return:hover {
    border-color: var(--ink-700);
    color: var(--ink-900);
}

.add-return__icon {
    display: grid;
    place-items: center;
    color: var(--ink-400);
}

.return {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-sunken);
}

.return__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.return__title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-500);
}

.return__remove {
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink-400);
    cursor: pointer;
}

.return__remove:hover {
    background: var(--surface);
    color: var(--ink-900);
}

.return .field {
    background: var(--surface);
}

/* -------------------------------------------------------------- stepper -- */

.stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.stepper__label {
    font-size: 0.85rem;
    font-weight: 550;
    color: var(--ink-500);
}

.stepper__controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.stepper__btn {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink-900);
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

.stepper__btn:hover:not(:disabled) {
    border-color: var(--ink-900);
}

.stepper__btn:disabled {
    color: var(--ink-300);
    cursor: not-allowed;
    opacity: 0.6;
}

.stepper__value {
    min-width: 2rem;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.booking__submit {
    width: 100%;
    margin-top: 0.75rem;
}

/* --------------------------------------------------------------- picker -- */
/* Bottom sheet on phones, anchored dropdown from 40rem up. */

.picker {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: flex-end;
}

.picker__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 19, 26, 0.55);
}

.picker__card {
    position: relative;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1rem 1rem 1.25rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    background: var(--surface);
    box-shadow: var(--shadow-pop);
}

.picker__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.picker__nav-btn {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--surface-muted);
    cursor: pointer;
}

.picker__nav-btn:hover {
    background: var(--surface-sunken);
}

.picker__month {
    font-size: 1rem;
    font-weight: 700;
}

.picker__weekdays,
.picker__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.15rem;
}

.picker__weekdays {
    margin-bottom: 0.25rem;
    font-size: 0.7rem;
    font-weight: 650;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-400);
}

.day {
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    font-size: 0.9rem;
    font-weight: 550;
    font-variant-numeric: tabular-nums;
    color: var(--ink-900);
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.day:hover:not(:disabled) {
    background: var(--surface-sunken);
}

.day--outside {
    color: var(--ink-300);
}

.day--today {
    box-shadow: inset 0 0 0 1px var(--line-strong);
}

.day--selected,
.day--selected:hover {
    background: var(--ink-900);
    color: #fff;
    font-weight: 700;
}

.day:disabled {
    color: var(--line-strong);
    cursor: not-allowed;
}

.picker__close {
    display: block;
    width: 100%;
    margin-top: 0.9rem;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-weight: 600;
    cursor: pointer;
}

.picker__close:hover {
    background: var(--surface-muted);
}

/* clock face */

.clock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding-block: 0.5rem;
}

.clock__col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.clock__arrow {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-400);
    cursor: pointer;
}

.clock__arrow:hover {
    background: var(--surface-muted);
    color: var(--ink-900);
}

.clock__value {
    min-width: 3.75rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    font-size: 1.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.clock__value:hover {
    border-color: var(--line-strong);
    background: var(--surface-muted);
}

.clock__sep {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink-400);
}

.unit-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.3rem;
    padding-block: 0.35rem;
}

.unit {
    padding: 0.6rem 0.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 0.95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.unit:hover {
    background: var(--surface-muted);
}

.unit--blocked,
.unit--blocked:hover {
    border-color: var(--line);
    background: var(--surface);
    color: var(--line-strong);
    cursor: not-allowed;
}

.unit--selected,
.unit--selected:hover {
    border-color: var(--ink-900);
    background: var(--ink-900);
    color: #fff;
}

/* ------------------------------------------------------ place suggestions -- */

.field--place {
    position: relative;
}

.suggest {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 50;
    width: 100%;
    max-height: 20rem;
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-pop);
}

.suggest__group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.65rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-400);
}

.suggest__group .icon {
    width: 0.95rem;
    height: 0.95rem;
    color: var(--accent);
}

.suggest__option {
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    cursor: pointer;
}

.suggest__option:hover,
.suggest__option.is-active {
    background: var(--surface-muted);
}

.suggest__empty {
    padding: 0.75rem 0.65rem;
    font-size: 0.9rem;
    color: var(--ink-400);
}

/* -------------------------------------------------------------- sections -- */

.section {
    padding-block: 3.5rem;
}

.section--muted {
    background: var(--surface-muted);
}

.section__head {
    margin-bottom: 2rem;
    text-align: center;
}

.section__title {
    font-size: clamp(1.5rem, 5.5vw, 2.1rem);
    font-weight: 720;
}

.section__subtitle {
    margin-top: 0.6rem;
    color: var(--ink-500);
}

.steps,
.cards,
.reviews {
    display: grid;
    gap: 1rem;
}

.step {
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.step__number {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 0.9rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 750;
}

.step__title,
.card__title {
    font-size: 1.1rem;
    font-weight: 680;
}

.step__text,
.card__text {
    margin-top: 0.5rem;
    color: var(--ink-500);
}

.card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.card__icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 0.9rem;
    border-radius: var(--radius-md);
    background: var(--ink-900);
    color: var(--accent);
}

.card__icon .icon {
    width: 1.4rem;
    height: 1.4rem;
}

.review {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.review__mark {
    color: var(--accent);
}

.review__mark .icon {
    width: 1.6rem;
    height: 1.6rem;
}

.review__text {
    margin: 0;
    font-size: 1.02rem;
}

.review__meta {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.review__author {
    font-weight: 650;
}

.review__origin {
    font-size: 0.85rem;
    color: var(--ink-400);
}

/* ------------------------------------------------------------------ faq -- */

.faq {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.faq__item {
    padding: 0.25rem 1.15rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1rem;
    font-weight: 650;
    cursor: pointer;
    list-style: none;
}

.faq__question::-webkit-details-marker {
    display: none;
}

.faq__chevron {
    color: var(--ink-400);
    transition: transform 0.18s ease;
}

.faq__item[open] .faq__chevron {
    transform: rotate(180deg);
}

.faq__answer {
    padding-bottom: 1.1rem;
    color: var(--ink-500);
}

/* ------------------------------------------------------------------ cta -- */

.cta {
    padding-block: 3.5rem;
    background: var(--ink-900);
    color: #fff;
}

.cta__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.cta__title {
    font-size: clamp(1.5rem, 5.5vw, 2.1rem);
    font-weight: 720;
}

.cta__text {
    color: rgba(255, 255, 255, 0.75);
}

.cta .btn--primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.cta .btn--primary:hover {
    background: var(--accent-strong);
}

/* --------------------------------------------------------------- footer -- */

.site-footer {
    padding-top: 3rem;
    background: var(--ink-800);
    color: rgba(255, 255, 255, 0.72);
}

.site-footer__inner {
    display: grid;
    gap: 2rem;
    --shell: 100%;
}

.site-footer__brand img {
    height: 2rem;
    width: auto;
    margin-bottom: 0.9rem;
}

.site-footer__contact {
    margin-top: 0.9rem;
    font-size: 0.9rem;
}

.site-footer__contact li+li {
    margin-top: 0.35rem;
}

.site-footer__contact a:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer__vat {
    margin-left: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
}

.site-footer__nav h2 {
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
}

.site-footer__nav li+li {
    margin-top: 0.5rem;
}

.site-footer__nav a:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer__legal {
    margin-top: 2.5rem;
    padding-block: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
    --shell: 100%;
}

/* ====================================================== 40rem and wider == */

@media (min-width: 40rem) {
    :root {
        --gutter: 2rem;
    }

    .hero__card {
        padding: 1.5rem;
    }

    .booking__fields {
        gap: 0.6rem;
    }

    .booking__submit {
        width: auto;
        min-width: 14rem;
        margin-inline: auto;
        display: flex;
    }

    /* The sheet becomes a dropdown anchored to its field. */
    .picker {
        position: absolute;
        inset: auto auto auto 0;
        top: calc(100% + 0.4rem);
        display: block;
        width: 20rem;
        max-width: calc(100vw - 2 * var(--gutter));
    }

    .picker__backdrop {
        display: none;
    }

    .picker__card {
        max-height: none;
        border-radius: var(--radius-lg);
        border: 1px solid var(--line);
    }

    .field-pair>.field--picker:last-child .picker {
        inset: auto 0 auto auto;
        top: calc(100% + 0.4rem);
    }

    .picker__close {
        display: none;
    }

    .steps,
    .reviews {
        grid-template-columns: repeat(3, 1fr);
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer__inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ====================================================== 60rem and wider == */

@media (min-width: 60rem) {
    .hero {
        padding-bottom: 4rem;
        min-height: 65vh;
    }

    .hero__inner {
        gap: 2rem;
        padding-top: 4rem;
        align-items: center;
    }

    .hero__heading {
        align-items: center;
    }

    .hero__title {
        /* max-width: 20ch; */
        text-align: center;
        font-size: 3.25rem;
    }

    .hero__subtitle {
        /* max-width: 46ch; */
        text-align: center;
        font-size: 1.25rem;
    }

    .hero__card {
        width: 100%;
        max-width: 40rem;
        padding: 1.75rem;
    }

    .field-pair {
        gap: 0.6rem;
    }

    .section {
        padding-block: 5rem;
    }

    .cards {
        grid-template-columns: repeat(4, 1fr);
    }

    .site-footer__inner {
        grid-template-columns: 1.5fr repeat(3, 1fr);
        gap: 3rem;
    }
}

/* ================================================== 62rem (992px) and up == */
/*
 * The booking card turns into a horizontal bar.
 *
 * From 992px to 1360px it wraps onto two rows: seven cells across need about
 * 1100px of bar, and the 72rem shell only ever gives 1088px however wide the
 * screen is. The single row of the mockup arrives at 1360px, where the hero
 * widens enough to hold it.
 */

@media (min-width: 62rem) {
    .hero__card {
        max-width: none;
        padding: 0.4rem;
        border-radius: var(--radius-lg);
    }

    .booking--bar .booking__fields {
        display: grid;
        gap: 0;
        align-items: stretch;
        grid-template-columns:
            minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
        /*
         * A row whose only item is hidden collapses to zero height, so the
         * return leg appears and disappears without a :has() rule.
         */
        grid-template-areas:
            "from   to     date time"
            "ret    ret    ret  ret"
            "addret addret pax  submit";
    }

    /* Hands the date/time wrappers' children straight to the grid. */
    .booking--bar .field-pair,
    .booking--bar .return .field-pair {
        display: contents;
    }

    /*
     * Flattens the cells into one seamless bar. The submit is excluded: it is a
     * .btn and this reset would strip the background right off it, leaving white
     * text on the white card.
     */
    .booking--bar .cell:not(.btn) {
        padding: 0.65rem 0.85rem;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .booking--bar .cell.field {
        gap: 0.55rem;
    }

    /* A wrapped label would push the whole bar taller. */
    .booking--bar .cell .field__label {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .booking--bar .cell.field:focus-within {
        background: var(--surface-muted);
    }

    .booking--bar .cell.field--invalid {
        box-shadow: inset 0 0 0 1px var(--danger);
    }

    /* The bar's cells are narrower than a readable suggestion list. */
    .suggest {
        width: max(100%, 20rem);
        max-width: calc(100vw - 2 * var(--gutter));
    }

    .booking--bar .cell--from {
        grid-area: from;
    }

    .booking--bar .cell--to {
        grid-area: to;
    }

    .booking--bar .cell--date {
        grid-area: date;
    }

    .booking--bar .cell--time {
        grid-area: time;
    }

    .booking--bar .cell--add-return {
        grid-area: addret;
    }

    .booking--bar .cell--passengers {
        grid-area: pax;
    }

    .booking--bar .cell--submit {
        grid-area: submit;
    }

    /* Hairlines are drawn inside the cells, so they never shift the grid. */
    .booking--bar .cell--to,
    .booking--bar .cell--date,
    .booking--bar .cell--time,
    .booking--bar .cell--return-to,
    .booking--bar .cell--return-date,
    .booking--bar .cell--return-time {
        box-shadow: inset 1px 0 0 var(--line);
    }

    .booking--bar .cell--add-return {
        box-shadow: inset 0 1px 0 var(--line);
    }

    .booking--bar .cell--passengers {
        box-shadow: inset 1px 0 0 var(--line), inset 0 1px 0 var(--line);
    }

    .booking--bar .cell--add-return {
        justify-content: flex-start;
        white-space: nowrap;
        font-size: 0.95rem;
    }

    .booking--bar .cell--passengers {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0.15rem;
    }

    .booking--bar .stepper__btn {
        width: 1.9rem;
        height: 1.9rem;
    }

    .booking--bar .cell--submit {
        width: auto;
        min-width: 0;
        margin: 0;
        padding-inline: 1.4rem;
        border-radius: var(--radius-md);
        box-shadow: none;
    }

    /* The return leg borrows the bar's own columns, so it lines up with row one. */
    .booking--bar .return {
        grid-area: ret;
        display: grid;
        grid-template-columns: subgrid;
        gap: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: inset 0 1px 0 var(--line);
    }

    .booking--bar .return .field {
        background: transparent;
    }

    .booking--bar .return__head {
        grid-column: 1 / -1;
        padding: 0.5rem 0.85rem 0;
    }

    .booking--bar .cell--return-from {
        grid-column: 1;
    }

    .booking--bar .cell--return-to {
        grid-column: 2;
    }

    .booking--bar .cell--return-date {
        grid-column: 3;
    }

    .booking--bar .cell--return-time {
        grid-column: 4;
    }
}

/* ================================================= 85rem (1360px) and up == */
/* The hero widens past the shell so the whole bar fits on one row. */

@media (min-width: 85rem) {

    /* Only the hero: the sections below stay at the readable 72rem. */
    .hero__inner {
        max-width: 78rem;
        --shell: 100%;
    }

    main .shell {
        max-width: 78rem;
        --shell: 100%;
    }

    .booking--bar .booking__fields {
        grid-template-columns:
            minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.95fr) auto auto auto;
        grid-template-areas:
            "from to  date time addret pax submit"
            "ret  ret ret  ret  ret    ret ret";
    }

    .booking--bar .cell:not(.btn) {
        padding: 0.7rem 1rem;
    }

    /* Row three is gone, so these only need the vertical hairline. */
    .booking--bar .cell--add-return,
    .booking--bar .cell--passengers {
        box-shadow: inset 1px 0 0 var(--line);
    }

    .booking--bar .cell--submit {
        padding-inline: 1.6rem;
    }

    .booking--bar .return__head {
        padding-inline: 1rem;
    }
}

/* =========================================================================
   Quote page: map, booking details, and the summary rail.
   Mobile keeps a fixed action bar; the summary and the search form open as
   sheets. From 62rem the rail sits alongside and sticks while the page scrolls.
   ========================================================================= */

.quote {
    min-height: 100vh;
    background: var(--surface-muted);
}

.quote .site-header {
    background: var(--ink-900);
    color: #fff;
}

/* On a phone the header is dropped: the map owns the top of the screen. */
.quote__header {
    display: none;
}

.quote__layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* Room for the fixed action bar, plus a little air under the last panel. */
    padding-bottom: 8.5rem;
    /* The map is fixed behind, and this scrolls over it. */
    padding-inline: 0;
}

.quote__main {
    display: flex;
    flex-direction: column;
}

/*
 * Full-bleed and pinned to the top of the viewport. The content below is the
 * only thing that scrolls, sliding up over the map and covering it.
 */
.map,
.map.mapboxgl-map {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 0;
    height: 42vh;
    background: var(--surface-sunken);
}

/* Black and white basemap. Only the canvas is drained, so the pins keep their
   colours: they are the one thing that has to stand out. */
.map .mapboxgl-canvas {
    filter: grayscale(1);
}

.quote__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 38vh;
    padding: 1rem var(--gutter) 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    background: var(--surface-muted);
    box-shadow: 0 -0.75rem 1.5rem -1rem rgba(18, 19, 26, 0.35);
}

/* The grab handle that says the panel can be pushed over the map. */
.quote__content::before {
    content: "";
    display: block;
    width: 2.5rem;
    height: 0.25rem;
    margin: -0.25rem auto 0.25rem;
    border-radius: 999px;
    background: var(--line-strong);
}

.quote__reassurance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--ink-500);
}

.quote__reassurance .icon {
    width: 1rem;
    height: 1rem;
    color: var(--accent);
}

.quote__toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.currency__select {
    appearance: none;
    padding: 0.6rem 2rem 0.6rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background-color: var(--surface);
    /* Chevron drawn inline so the control needs no extra markup. */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23575c6e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 5.5 6-5.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 1rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.toolbar-btn {
    display: grid;
    place-items: center;
    width: 2.85rem;
    height: 2.85rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--ink-900);
    cursor: pointer;
}

.toolbar-btn:hover {
    border-color: var(--ink-900);
}

/* ---------------------------------------------------------- detail panels -- */

.details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.panel {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.panel__title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.05rem;
    font-weight: 680;
}

.panel__title .icon {
    color: var(--accent);
}

.panel__tag {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: var(--surface-sunken);
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-500);
}

.panel__hint {
    margin-top: 0.35rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--ink-500);
}

.counters {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.counter__text {
    display: flex;
    flex-direction: column;
}

.counter__label {
    font-weight: 600;
}

.counter__note {
    font-size: 0.8rem;
    color: var(--ink-400);
}

.field--boxed {
    background: var(--surface);
}

.field__input--area {
    resize: vertical;
    min-height: 4.5rem;
    font-weight: 500;
}

/* ---------------------------------------------------------------- summary -- */

.summary {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.summary__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.summary__title {
    font-size: 1.15rem;
    font-weight: 700;
}

.summary__trip {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
    font-weight: 650;
}

/* Passengers keep a line of their own; the two luggage chips sit under them. */
.summary__counts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.summary__bags {
    display: flex;
    gap: 0.35rem;
}

.summary__pax {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 550;
}

.summary__pax .icon {
    width: 1rem;
    height: 1rem;
}

.leg {
    margin-top: 1.25rem;
}

.leg__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.leg__title {
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--ink-500);
}

.leg__date {
    color: var(--ink-400);
    font-weight: 500;
}

.leg__edit {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-500);
    cursor: pointer;
}

.leg__edit:hover {
    color: var(--ink-900);
}

.leg__edit .icon {
    width: 0.95rem;
    height: 0.95rem;
}

.leg__stops {
    margin-top: 0.6rem;
    padding-left: 1.1rem;
    border-left: 2px solid var(--line);
}

.stop {
    position: relative;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.stop::before {
    content: "";
    position: absolute;
    left: -1.55rem;
    top: 0.4rem;
    width: 0.6rem;
    height: 0.6rem;
    background: var(--ink-900);
}

.stop--end::before {
    background: var(--accent);
}

.stop__name {
    font-weight: 600;
}

.stop__time {
    color: var(--ink-500);
    font-variant-numeric: tabular-nums;
}

.stop__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-block: 0.7rem;
}

.pill {
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--ink-500);
}

.prices {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.prices__title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 680;
}

.prices__title .icon {
    width: 1.05rem;
    height: 1.05rem;
    color: var(--ink-400);
}

.prices__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.3rem;
    color: var(--ink-500);
}

.prices__list {
    margin-left: auto;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-400);
    text-decoration-thickness: 1px;
}

/* The only row left, so it carries no separator above it. */
.prices__row--total {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink-900);
}

.summary__perks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.perk {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--ink-500);
}

.perk .icon {
    width: 0.95rem;
    height: 0.95rem;
}

.perk--ok {
    color: #1a7f4b;
    border-color: currentColor;
}

/* ----------------------------------------------------------------- prices -- */

.summary__add-return {
    margin-top: 1.25rem;
}

.summary__add-return .icon {
    color: var(--ink-400);
}

.actionbar__total {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 1.05rem;
    color: var(--ink-900);
}

.actionbar__label {
    font-size: 0.8rem;
    font-weight: 550;
    color: var(--ink-400);
}

.actionbar__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.85rem;
    font-weight: 550;
    color: var(--ink-500);
    cursor: pointer;
}

.actionbar__link:hover {
    color: var(--ink-900);
}

.actionbar__link .icon {
    width: 1.05rem;
    height: 1.05rem;
}

/* ------------------------------------------------------------- action bar -- */

.actionbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -0.5rem 1.5rem -0.75rem rgba(18, 19, 26, 0.25);
}

.actionbar__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Total on the left, the link that opens the recap on the right. */
.actionbar__row--info {
    justify-content: space-between;
}

.actionbar__cta {
    flex: 1;
    padding-block: 0.85rem;
}

/* ----------------------------------------------------------------- sheets -- */

.sheet {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: flex-end;
}

.sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 19, 26, 0.55);
}

.sheet__card {
    position: relative;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 0.5rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    background: var(--surface);
}

.sheet__card--edit {
    padding: 1rem;
}

.sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.sheet__title {
    font-size: 1.1rem;
    font-weight: 700;
}

.sheet__close {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--ink-500);
    cursor: pointer;
}

.sheet__close:hover {
    color: var(--ink-900);
}

/* The rail is the sheet's content on mobile, so it must not show twice. */
.quote__rail {
    display: none;
}

@media (min-width: 62rem) {
    .quote__header {
        display: block;
    }

    .quote__layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 24rem;
        gap: 1.5rem;
        align-items: start;
        /* Both columns start on the same line, clear of the header. */
        padding-block: 1.25rem 3rem;
        padding-inline: var(--gutter);
    }

    .quote__main {
        gap: 1.25rem;
    }

    /*
     * Back in the flow: only the rail stays pinned on a wide screen. It has to
     * stay `relative`, because mapbox-gl absolutely positions its canvas
     * against this element and `static` would let it escape the card.
     */
    .map,
    .map.mapboxgl-map {
        position: relative;
        height: 24rem;
        border-radius: var(--radius-lg);
        overflow: hidden;
    }

    .quote__content {
        margin-top: 0;
        padding: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
        gap: 1.25rem;
    }

    .quote__content::before {
        display: none;
    }

    .quote__toolbar {
        border-top: 0;
        padding-top: 0;
    }

    .quote__rail {
        display: block;
        position: sticky;
        top: 1.5rem;
    }

    /*
     * Higher specificity on purpose: the mobile rule for this element is
     * declared later in the file, and a media query adds none of its own.
     */
    .quote.quote--plain .quote__content {
        padding-top: 0;
    }

    /* The action bar and the summary sheet are a phone affordance only. */
    .actionbar,
    .sheet[data-sheet-key="summary"] {
        display: none;
    }

    .sheet {
        align-items: center;
        padding: var(--gutter);
    }

    .sheet__card {
        max-width: 34rem;
        margin: auto;
        max-height: 90vh;
        border-radius: var(--radius-xl);
    }
}

/* ------------------------------------------------------ passenger details -- */

/* No map on this step: the header stays, and the panel starts at the top. */
.quote--plain .quote__header {
    display: block;
}

.quote--plain .quote__content {
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
    padding-top: 1.25rem;
}

.quote--plain .quote__content::before {
    display: none;
}

/* shared / private switch */

.transfer-type {
    margin-top: 1.25rem;
}

.switch {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0;
    padding: 0.25rem;
    border-radius: 999px;
    background: var(--surface-sunken);
}

/* The single pill that slides between the two options. */
.switch__thumb {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    z-index: 0;
    width: calc(50% - 0.25rem);
    height: calc(100% - 0.5rem);
    border-radius: 999px;
    background: var(--ink-900);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch__option {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.95rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink-500);
    cursor: pointer;
    transition: color 0.22s ease;
}

.switch__option .icon {
    width: 1.05rem;
    height: 1.05rem;
}

.switch__option:hover {
    color: var(--ink-900);
}

.switch__option.is-active,
.switch__option.is-active:hover {
    color: #fff;
}

/* The totals fade while the new price is on its way. */
.is-repricing [data-price-kind] {
    opacity: 0.45;
    transition: opacity 0.15s ease;
}

.transfer-type__locked {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--ink-500);
}

.transfer-type__locked .icon {
    color: var(--accent);
}

/* collapsible explainers, closed by default */

.explainers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.explainer__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.35rem;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    cursor: pointer;
    list-style: none;
}

.explainer__summary::-webkit-details-marker {
    display: none;
}

.explainer__chevron {
    width: 1.05rem;
    height: 1.05rem;
    color: var(--ink-500);
    transition: transform 0.18s ease;
}

.explainer[open] .explainer__chevron {
    transform: rotate(180deg);
}

.explainer__body {
    padding-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--ink-700);
}

.explainer__list {
    margin-top: 0.5rem;
    padding-left: 1.1rem;
    list-style: disc;
}

.explainer__list li {
    margin-top: 0.3rem;
}

/* chips that open the option panels */

.extras {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.25rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 550;
    color: var(--ink-500);
    cursor: pointer;
    list-style: none;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.chip::-webkit-details-marker {
    display: none;
}

.chip:hover {
    border-color: var(--ink-900);
    color: var(--ink-900);
}

.chip .icon {
    width: 1rem;
    height: 1rem;
}

.chip__mark--open {
    display: none;
}

.chip-panel[open]>.chip {
    border-color: var(--ink-900);
    background: var(--ink-900);
    color: #fff;
}

.chip-panel[open]>.chip .chip__mark--open {
    display: inline-flex;
}

.chip-panel[open]>.chip .chip__mark--closed {
    display: none;
}

.chip-panel__body {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* option rows */

.options {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 0.9rem;
    padding: 1rem;
}

.option+.option {
    border-top: 1px solid var(--line);
}

.option__art {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    color: var(--ink-500);
}

.option__art .icon {
    width: 1.6rem;
    height: 1.6rem;
}

.option__name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-weight: 650;
}

.option__note {
    margin-top: 0.2rem;
    font-size: 0.88rem;
    color: var(--ink-500);
}

.badge {
    padding: 0.1rem 0.45rem;
    border-radius: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge--free {
    background: #e6f6ec;
    color: #1a7f4b;
}

.option__choice {
    grid-column: 1 / -1;
}

.select {
    width: 100%;
    min-width: 0;
    text-overflow: ellipsis;
    padding: 0.6rem 2rem 0.6rem 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23575c6e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 5.5 6-5.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 1rem;
    appearance: none;
    font: inherit;
    cursor: pointer;
}

.notice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--ink-500);
}

.notice .icon {
    width: 1rem;
    height: 1rem;
    flex: none;
    margin-top: 0.1rem;
}

.notice--warning {
    padding: 0.75rem 0.9rem;
    border: 1px solid #f0d48a;
    border-radius: var(--radius-sm);
    background: #fdf8e7;
    color: var(--ink-700);
}

/* notification toggle */

.toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    cursor: pointer;
}

.toggle__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle {
    position: relative;
    flex: none;
    width: 2.75rem;
    height: 1.6rem;
    border-radius: 999px;
    background: var(--line-strong);
    transition: background-color 0.2s ease;
}

.toggle::after {
    content: "";
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.toggle__input:checked+.toggle {
    background: var(--ink-900);
}

.toggle__input:checked+.toggle::after {
    transform: translateX(1.15rem);
}

.toggle__input:focus-visible+.toggle {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.toggle-row__label {
    flex: 1;
    font-weight: 600;
}

.panel__hint--after {
    margin-top: 0.6rem;
    margin-bottom: 0;
}

/* passenger fields */

.passenger-fields {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

/* intl-tel-input inside the boxed field */

.field--phone .iti {
    width: 100%;
}

.field--phone .iti__tel-input {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 600;
    color: var(--ink-900);
}

.field--phone .iti__tel-input:focus {
    outline: none;
}

.field--phone .iti--separate-dial-code .iti__selected-country {
    background: transparent;
}

/* Opening downwards pushes the country list past the card and the viewport. */
.field--phone .iti__dropdown-content {
    top: auto;
    bottom: calc(100% + 0.4rem);
}

.field--phone.is-invalid {
    border-color: var(--danger);
}

/* back button in the action bar */

.actionbar__back {
    display: grid;
    place-items: center;
    width: 2.85rem;
    height: 2.85rem;
    flex: none;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    color: var(--ink-900);
}

.actionbar__back:hover {
    border-color: var(--ink-900);
}

@media (min-width: 48rem) {

    /* Wide enough to put the picker on the same row as the description. */
    .option {
        grid-template-columns: auto 1fr auto;
        align-items: center;
    }

    /* Fixed, so the longest wheelchair label cannot squeeze the description. */
    .option__choice {
        grid-column: auto;
        width: 14rem;
        min-width: 0;
    }

    /* Chips sit side by side; the one that opens claims the whole row. */
    .extras {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .chip-panel {
        flex: 0 1 auto;
        min-width: 0;
    }

    /* Trimmed just enough for both chips to share the row at this column width. */
    .chip {
        padding: 0.55rem 0.85rem;
        font-size: 0.86rem;
    }

    .chip-panel[open] {
        flex: 1 1 100%;
    }
}

/* ----------------------------------------------------------- checkout step -- */

.breakdown {
    margin-top: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.breakdown__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
}

.breakdown__row+.breakdown__row {
    border-top: 1px solid var(--line);
}

.breakdown__discount {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.breakdown__remove {
    display: grid;
    place-items: center;
    width: 1.4rem;
    height: 1.4rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
}

.breakdown__remove:hover {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.breakdown__remove .icon {
    width: 0.95rem;
    height: 0.95rem;
    stroke-width: 2.4;
}

.breakdown__included {
    font-size: 0.85rem;
    color: var(--ink-400);
}

.breakdown__free {
    color: #1a7f4b;
    font-weight: 600;
}

/* Brand marks keep their own colours instead of currentColor. */
.icon--brand {
    width: 1.35rem;
    height: 1.35rem;
    flex: none;
}

.breakdown__row--note {
    justify-content: flex-start;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #1a7f4b;
}

.breakdown__row--note .icon {
    width: 1.05rem;
    height: 1.05rem;
}

.breakdown__row--total {
    background: var(--surface-muted);
    font-size: 1rem;
    font-weight: 700;
}

/* discount code, below the breakdown */

.discount {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
}

/* A small aside next to the total, not a form field in its own right. */
.discount__field {
    /* Fills the row next to Apply, whatever the column width. */
    flex: 1;
    gap: 0.45rem;
    padding: 0.4rem 0.65rem;
    background: var(--surface-muted);
}

.discount__field .field__icon .icon {
    width: 1rem;
    height: 1rem;
}

.discount__field .field__input {
    font-size: 0.85rem;
    font-weight: 500;
}

.discount__apply {
    flex: none;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-500);
}

.discount__apply:hover {
    border-color: var(--ink-900);
    color: var(--ink-900);
}

/* payment methods */

.methods {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

.method {
    display: block;
    cursor: pointer;
}

.method__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.method__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.method__head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.method__head .icon {
    color: var(--ink-400);
}

.method__name {
    font-weight: 650;
}

.method__note {
    font-size: 0.88rem;
    color: var(--ink-500);
}

.method__input:checked+.method__body {
    border-color: var(--ink-900);
    box-shadow: inset 0 0 0 1px var(--ink-900);
}

.method__input:focus-visible+.method__body {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* The cash card loses its bottom corners while the guarantee hangs off it. */
.method:has(+ .guarantee:not([hidden])) .method__body {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* card kept as a guarantee, attached under the cash option */

.guarantee {
    /* Closes the flex gap so it reads as one block with the card above. */
    margin-top: -0.6rem;
    padding: 1rem;
    border: 1px solid var(--ink-900);
    border-top: 0;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: var(--surface-muted);
}

.guarantee__hint {
    font-size: 0.88rem;
    color: var(--ink-500);
}

.guarantee__card {
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

/* terms */

.consent {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-top: 1.25rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    cursor: pointer;
}

.consent__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.consent__box {
    display: grid;
    place-items: center;
    flex: none;
    width: 1.35rem;
    height: 1.35rem;
    border: 1px solid var(--line-strong);
    border-radius: 0.35rem;
    color: transparent;
}

.consent__box .icon {
    width: 0.95rem;
    height: 0.95rem;
}

.consent__input:checked+.consent__box {
    border-color: var(--ink-900);
    background: var(--ink-900);
    color: #fff;
}

.consent__input:focus-visible+.consent__box {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.notice--error {
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
    color: var(--danger);
}

/* Off the discount row, so the rejection does not read as part of the field. */
.discount+.notice--error {
    margin-top: 0.6rem;
}

.notice--good {
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-sm);
    background: #e9f7ef;
    color: #16653c;
}

.notice--good .icon {
    color: currentColor;
}

/* The in-page action row is a desktop affordance; mobile keeps the action bar. */
.form-actions {
    display: none;
}

/* thank you */

.thanks {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-block: 4rem;
    text-align: center;
}

.thanks__mark {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #e9f7ef;
    color: #16653c;
}

.thanks__title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 720;
}

.thanks__text,
.thanks__reference {
    color: var(--ink-500);
}

@media (min-width: 62rem) {
    .form-actions {
        display: flex;
        gap: 0.75rem;
        margin-top: 0.25rem;
    }

    .form-actions__confirm {
        flex: 1;
    }

    .btn--ghost {
        flex: none;
        width: 3.75rem;
        /* .btn's inline padding would squeeze the chevron to a sliver. */
        padding-inline: 0;
        border: 1px solid var(--line-strong);
        background: var(--surface);
        color: var(--ink-900);
    }

    .btn--ghost .icon {
        width: 1.5rem;
        height: 1.5rem;
        stroke-width: 2;
    }

    .btn--ghost:hover {
        border-color: var(--ink-900);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ---------------------------------------------- cancellation and reviews -- */

.reassure {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.cancelbox {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--good) 35%, transparent);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--good) 6%, var(--surface));
}

.cancelbox__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--good) 14%, var(--surface));
    color: var(--good);
}

.cancelbox__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.cancelbox__badge {
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--good) 16%, var(--surface));
    color: var(--good);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.cancelbox__text {
    margin-top: 0.3rem;
    color: var(--good);
    font-size: 0.85rem;
    line-height: 1.5;
}

.cancelbox__text strong {
    font-weight: 700;
}

/* Tripadvisor's widget brings its own styling and fixed sizes; it only needs
   centring and the right variant for the width available. */
.reviews {
    display: flex;
    justify-content: center;
}

.reviews--wide {
    display: none;
}

@media (min-width: 34rem) {
    .reviews--narrow {
        display: none;
    }

    .reviews--wide {
        display: flex;
    }
}