/*
 * Inline Year / Make / Model picker, home page.
 *
 * This sits directly under the hero and is the most valuable control on the
 * page, so it is treated as a piece of equipment rather than a form: a raised
 * dark console on the dark band, hairline-separated cells, and one yellow
 * action. The yellow is spent on exactly two things — the accent rule and the
 * button — because spending it anywhere else stops it meaning "press this".
 *
 * Scoped to .hh2-vehicle-band .hhv so nothing here can reach another form.
 */

.hh2-vehicle-band .hhv {
    --hhv-ink: #ffffff;
    --hhv-muted: rgba(255, 255, 255, 0.62);
    --hhv-faint: rgba(255, 255, 255, 0.40);
    --hhv-accent: #FEDD00;
    --hhv-surface: rgba(255, 255, 255, 0.055);
    --hhv-surface-hi: rgba(255, 255, 255, 0.10);
    --hhv-line: rgba(255, 255, 255, 0.14);

    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px 30px;
    padding: 18px 22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
    border: 1px solid var(--hhv-line);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255,255,255,0.06);
    position: relative;
}

/*
 * The `hidden` attribute has to win here.
 *
 * The bed field and the saved-vehicle row both ship with `hidden` on them and
 * both are given a `display` by the rules below, which outrank the browser's
 * own `[hidden] { display: none }`. Without this they were never hidden at
 * all: every visitor saw an empty Bed dropdown and a bare "Change" line, and
 * because the fields grid only widens to four columns once the bed field is
 * genuinely un-hidden, the bed field sat wrapped onto a second row until the
 * picker finished loading and then jumped back up — 58px of the page moving
 * under the customer.
 */
.hh2-vehicle-band .hhv [hidden] { display: none; }

/* The accent rule — one of the two places yellow is allowed here. */
.hh2-vehicle-band .hhv::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 22px;
    width: 54px;
    height: 3px;
    background: var(--hhv-accent);
    border-radius: 0 0 2px 2px;
}

/*
 * Full width.
 *
 * The band is already full-bleed, but the .container inside it caps at 1340px,
 * which left the picker floating in the middle of a wide screen. Released here
 * rather than on .container globally, because every other section on the page
 * genuinely wants that measure -- this is the one element that should span
 * everything.
 *
 * Gutters stay generous so it reads as a deliberate full-width band rather
 * than something that has burst its container.
 */
.hh2-vehicle-band > .container {
    max-width: none;
    padding-left: clamp(16px, 2.6vw, 56px);
    padding-right: clamp(16px, 2.6vw, 56px);
}

/* On a very wide screen four evenly-stretched selects get comically long, so
   the fields hold a sane measure and sit to the right of the lead, which is
   where the eye already is after the hero. */
@media (min-width: 1500px) {
    .hh2-vehicle-band .hhv { gap: 10px 44px; }
    .hh2-vehicle-band .hhv__fields { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
    .hh2-vehicle-band .hhv__fields:has(.hhv__field--bed:not([hidden])) {
        grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    }
    .hh2-vehicle-band .hhv select { height: 50px; font-size: 15.5px; }
    .hh2-vehicle-band .hhv__go { height: 50px; padding: 0 34px; }
}

/* ---- lead ---- */

.hh2-vehicle-band .hhv__lead {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-right: 28px;
    border-right: 1px solid var(--hhv-line);
}

.hh2-vehicle-band .hhv__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    color: var(--hhv-accent);
    background: rgba(254, 221, 0, 0.10);
    border: 1px solid rgba(254, 221, 0, 0.26);
    border-radius: 10px;
}

.hh2-vehicle-band .hhv__icon svg { width: 22px; height: 22px; }

.hh2-vehicle-band .hhv__lead-text { display: flex; flex-direction: column; gap: 2px; }

.hh2-vehicle-band .hhv__eyebrow {
    color: var(--hhv-accent);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hh2-vehicle-band .hhv__title {
    color: var(--hhv-ink);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* ---- fields ---- */

.hh2-vehicle-band .hhv__fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 12px;
    margin: 0;
}

.hh2-vehicle-band .hhv__fields:has(.hhv__field--bed:not([hidden])) {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.hh2-vehicle-band .hhv__field { margin: 0; display: flex; flex-direction: column; gap: 5px; }

.hh2-vehicle-band .hhv__field label {
    color: var(--hhv-faint);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

/* Native select, restyled — a custom listbox would be worse here: the native
   one is searchable by typing, works on a phone, and 92 years is a long list. */
.hh2-vehicle-band .hhv__select { position: relative; display: block; }

.hh2-vehicle-band .hhv__select::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -5px;
    border-right: 2px solid var(--hhv-muted);
    border-bottom: 2px solid var(--hhv-muted);
    transform: rotate(45deg);
    pointer-events: none;
    transition: border-color 140ms ease;
}

.hh2-vehicle-band .hhv__select:hover::after { border-color: var(--hhv-ink); }

.hh2-vehicle-band .hhv select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 46px;
    padding: 0 36px 0 14px;
    background: var(--hhv-surface);
    color: var(--hhv-ink);
    border: 1px solid var(--hhv-line);
    border-radius: 9px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.hh2-vehicle-band .hhv select:hover:not(:disabled) {
    background: var(--hhv-surface-hi);
    border-color: rgba(255, 255, 255, 0.28);
}

.hh2-vehicle-band .hhv select:focus-visible {
    outline: none;
    border-color: var(--hhv-accent);
    box-shadow: 0 0 0 3px rgba(254, 221, 0, 0.26);
}

.hh2-vehicle-band .hhv select:disabled {
    color: var(--hhv-faint);
    background: rgba(255, 255, 255, 0.025);
    cursor: not-allowed;
}

/* The dropdown list itself is drawn by the OS — give it readable colours
   rather than white-on-white in dark mode. */
.hh2-vehicle-band .hhv select option { background: #16181c; color: #fff; }

.hh2-vehicle-band .hhv select.is-loading { color: var(--hhv-faint); }

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

.hh2-vehicle-band .hhv__field--go { justify-content: flex-end; }

.hh2-vehicle-band .hhv__go {
    height: 46px;
    padding: 0 26px;
    background: var(--hhv-accent);
    color: #111;
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 160ms ease, background-color 140ms ease;
}

.hh2-vehicle-band .hhv__go:hover:not(:disabled) {
    background: #ffe733;
    box-shadow: 0 8px 22px rgba(254, 221, 0, 0.28);
    transform: translateY(-1px);
}

.hh2-vehicle-band .hhv__go:active:not(:disabled) { transform: translateY(0); }

.hh2-vehicle-band .hhv__go:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Disabled until a model is chosen: the button cannot do anything useful
   before that, and a live button that refuses to work is worse than a
   visibly waiting one. */
.hh2-vehicle-band .hhv__go:disabled {
    background: rgba(255, 255, 255, 0.10);
    color: var(--hhv-faint);
    cursor: not-allowed;
}

/* ---- saved vehicle + status ---- */

.hh2-vehicle-band .hhv__saved {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0 0;
    color: var(--hhv-muted);
    font-size: 13px;
}

.hh2-vehicle-band .hhv__saved-dot {
    width: 7px; height: 7px;
    background: #35d07f;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.18);
}

.hh2-vehicle-band .hhv__saved-text { color: var(--hhv-ink); font-weight: 650; }

.hh2-vehicle-band .hhv__saved-clear {
    padding: 0;
    background: none;
    border: 0;
    color: var(--hhv-muted);
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.hh2-vehicle-band .hhv__saved-clear:hover { color: var(--hhv-accent); }

.hh2-vehicle-band .hhv__status {
    grid-column: 1 / -1;
    margin: 0;
    color: #ffb4b4;
    font-size: 13px;
}

.hh2-vehicle-band .hhv__status:empty { display: none; }

/* ---- responsive ---- */

@media (max-width: 1100px) {
    .hh2-vehicle-band .hhv {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .hh2-vehicle-band .hhv__lead {
        padding-right: 0;
        border-right: 0;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--hhv-line);
    }
    .hh2-vehicle-band .hhv__title { white-space: normal; }
}

@media (max-width: 720px) {
    .hh2-vehicle-band .hhv { padding: 16px; border-radius: 12px; }
    .hh2-vehicle-band .hhv::before { left: 16px; }
    .hh2-vehicle-band .hhv__fields,
    .hh2-vehicle-band .hhv__fields:has(.hhv__field--bed:not([hidden])) {
        grid-template-columns: 1fr 1fr;
    }
    /* The action spans the row so it never ends up a narrow stub beside a
       select. */
    .hh2-vehicle-band .hhv__field--go { grid-column: 1 / -1; }
    .hh2-vehicle-band .hhv__go { width: 100%; }
}

@media (max-width: 420px) {
    .hh2-vehicle-band .hhv__fields,
    .hh2-vehicle-band .hhv__fields:has(.hhv__field--bed:not([hidden])) {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hh2-vehicle-band .hhv select,
    .hh2-vehicle-band .hhv__go,
    .hh2-vehicle-band .hhv__select::after {
        transition-duration: 1ms;
    }
    .hh2-vehicle-band .hhv__go:hover:not(:disabled) { transform: none; }
}
