/* ===========================================================================
   brand.vehicle.panel.css  --  the brand-scoped vehicle picker and the
   "what we do for your car" block. See includes/brand.vehicle.panel.cfm.

   Namespace .bvp- : checked as unused before picking it. Grep for an existing
   prefix before adding another one here -- .ts- looked free and was not, being
   injected at runtime by script.js rather than living in any css file.

   Built on the css/foundations.css tokens rather than fresh values, so it
   inherits the site scale (16px base, 18px inputs) instead of drifting small.
   =========================================================================== */

/* ---------- the picker, under the hero ----------------------------------

   SELF-CONTAINED ON PURPOSE. The first cut coloured the heading and labels
   with var(--brand-ink, #fff). That token only exists when the brand has a
   hero SKIN; DBA has none, so it fell back to white on the light grey band
   and the whole bar was very nearly invisible.

   This block sits inside .brand-hero-band, whose background varies per brand
   from white through to Milltek's black. So it now paints its own card and
   states every colour explicitly -- never inheriting, never defaulting to a
   colour that assumes what is behind it. A brand accent is used only for the
   button, where a wrong value is a wrong tint rather than unreadable text. */
.bvp-selector {
    padding: var(--oct-space-5, 24px) 0;
}

/* Width and gutters come from the .fixedwidth + .oct-page pair the include
   wraps this in, so the heading lines up with the brand name in the hero.
   text-align:left because .fixedwidth centres its text and these are labelled
   fields, not a centred banner. */
.bvp-selector-inner {
    padding: var(--oct-space-4, 16px) var(--oct-space-5, 24px) var(--oct-space-5, 24px);
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    color: #222;
    text-align: left;
}

.bvp-selector h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    line-height: 1.3;
    color: #222;
}

.bvp-selector-hint {
    margin: 0 0 var(--oct-space-4, 16px);
    font-size: 0.95rem;
    color: #555;
}

.bvp-cascade {
    display: flex;
    flex-wrap: wrap;
    gap: var(--oct-space-3, 12px);
    align-items: flex-end;
}

.bvp-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 220px;
    min-width: 0;              /* lets a long option name shrink instead of overflowing */
}

.bvp-field > span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

/* width:100% IS LOAD-BEARING. css/forms.css sets
       input[type=text], ..., select:not(.inmenu) { width: 50% }
   above 769px, at the same specificity as this rule and in a stylesheet that
   loads first, so leaving width unstated does not mean "auto" here - it means
   half the label. That is what made these three boxes render as stubs in a
   row that had plenty of space for them. max-width alone cannot fix it: the
   declared 50% is a width, and there is nothing for a max to cap. */
.bvp-field select {
    width: 100%;
    height: 44px;
    font-size: 1rem;           /* 16px: anything smaller makes iOS zoom on focus */
    padding: 0 10px;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    background: #fff;
    color: #222;
    max-width: 100%;
    box-sizing: border-box;
}

.bvp-field select:disabled { background: #f2f2f2; color: #888; }

/* CENTRED BY FLEX, not by hoping the padding works out. .oct-btn is an
   inline-block with 13px of vertical padding, and everything on this site is
   border-box (style.css `* { box-sizing: border-box }`), so a fixed 44px height
   leaves an 18px content box for a ~19px line: the label was laid out from the
   top padding edge and sat low in the button, a couple of pixels from the
   bottom edge. Zero the vertical padding and centre the line box instead - the
   28px sides come from .oct-btn and still apply. */
.bvp-go {
    height: 44px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
}
.bvp-go:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- the answer for the vehicle in session ----------------------- */
.bvp-vehicle {
    margin: 0 0 var(--oct-space-6, 32px);
    padding: var(--oct-space-5, 24px);
    background: #f7f7f8;
    border-radius: 8px;
}

.bvp-vehicle-head h2 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    line-height: 1.25;
}

.bvp-vehicle-sub { margin: 0; font-size: 1rem; color: #555; }

/* The "we don't cover it" state is informative, not an error: a neutral rule
   rather than anything red. The useful content is the list underneath. */
.bvp-vehicle-head--none { border-left: 4px solid #c9ccd2; padding-left: 12px; }

.bvp-alts {
    list-style: none;
    margin: var(--oct-space-4, 16px) 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--oct-space-3, 12px);
}

.bvp-alts a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.bvp-alts a:hover { border-color: #999; box-shadow: 0 1px 6px rgba(0,0,0,.08); }

.bvp-alt-brand { font-weight: 700; font-size: 1.05rem; }
.bvp-alt-count { font-size: 0.9rem; color: #666; }

.bvp-vehicle-cta { margin: var(--oct-space-4, 16px) 0 0; }

/* The way out to every brand for this vehicle. A link, not a button: it is the
   secondary route, offered under the answer the customer asked for. */
.bvp-vehicle-allbrands { margin: var(--oct-space-4, 16px) 0 0; font-size: 1rem; }
.bvp-vehicle-allbrands a { color: #35003a; text-decoration: underline; text-underline-offset: 2px; }
.bvp-vehicle-allbrands a:hover { color: #6e1287; }

/* What replaces the results once the customer starts picking a different
   vehicle. Deliberately quiet and short - it is a placeholder explaining an
   absence, not a new thing to read. */
.bvp-stale { margin: 0; padding: var(--oct-space-4, 16px) 0; color: #555; font-size: 1rem; }

.bvp-grid { margin-top: var(--oct-space-4, 16px); }
.bvp-loading { margin: 0; color: #666; font-size: 0.95rem; }

/* ---------- the picker ON A PAINTED HERO BAND ---------------------------

   brand.cfm paints the whole hero band for a brand that has a hero image or a
   primary colour (.brand-hero-band--photo / --colour in css/brand.landing.css).
   The white card above is right on a white page and wrong there: it cuts a
   hard-edged box out of the photograph, which is the seam the band exists to
   remove -- the same reason Milltek's selector goes transparent over its own
   band.

   So on a painted band the card becomes glass: enough of a surface to ground
   the labels over whatever part of the frame lands behind them, not enough to
   read as a separate panel. The SELECTS stay opaque white, as Milltek's do -
   a control you type into should not be translucent.

   Both directions are covered, because the band can be a dark photograph or a
   light one (and Whiteline's yellow is a light colour): --ink-dark flips the
   glass and the type back the other way. Never inherit here - the whole point
   is that what is behind this varies per brand. */
.brand-hero-band--photo  .bvp-selector-inner,
.brand-hero-band--colour .bvp-selector-inner {
    background: rgba(12, 16, 22, .55);
    border-color: rgba(255, 255, 255, .18);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
}
.brand-hero-band--photo  .bvp-selector h2,
.brand-hero-band--colour .bvp-selector h2 { color: #fff; }

.brand-hero-band--photo  .bvp-selector-hint,
.brand-hero-band--colour .bvp-selector-hint { color: rgba(255, 255, 255, .82); }

.brand-hero-band--photo  .bvp-field > span,
.brand-hero-band--colour .bvp-field > span { color: rgba(255, 255, 255, .92); }

.brand-hero-band--ink-dark .bvp-selector-inner {
    background: rgba(255, 255, 255, .80);
    border-color: rgba(0, 0, 0, .10);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
    color: #222;
}
.brand-hero-band--ink-dark .bvp-selector h2      { color: #11171f; }
.brand-hero-band--ink-dark .bvp-selector-hint    { color: #4a4f57; }
.brand-hero-band--ink-dark .bvp-field > span     { color: #2c3138; }

/* The Go button, inverted the same way .brand-hero-cta is a few hundred pixels
   above it: on a painted band the brand colour IS the background, so a button
   in the brand colour disappears into it. Filling with the ink and lettering
   in the brand colour keeps it the loudest thing in the card, which is what a
   submit button on a three-field form should be. Both properties are set on
   the band by brand.cfm, not inherited from the hero -- the hero re-declares
   its own and its values do not reach this far. */
.brand-hero-band--photo  .bvp-go:not(:disabled),
.brand-hero-band--colour .bvp-go:not(:disabled) {
    background: var(--brand-ink, #fff);
    color: var(--brand-colour, #11171f);
    border: 2px solid var(--brand-ink, #fff);
    font-weight: 700;
}
.brand-hero-band--photo  .bvp-go:not(:disabled):hover,
.brand-hero-band--colour .bvp-go:not(:disabled):hover {
    background: transparent;
    color: var(--brand-ink, #fff);
}

@media only screen and (max-width: 700px) {
    .bvp-cascade { flex-direction: column; align-items: stretch; }
    .bvp-go { width: 100%; }
    .bvp-vehicle { padding: var(--oct-space-4, 16px); }
}
