/* Vehicle lookup panel (VRM/make-model/OEM) styles. Moved from inline
   <style> in includes/vehicle.lookup.panel.cfm (global, via header). */
@font-face {
  font-family: "elcomeVrmFont";
  src: url("../fonts/CharlesWrightBoldCaps.woff") format("woff"), url("../fonts/CharlesWrightBoldCaps.ttf") format("truetype"), url("../fonts/CharlesWrightBoldCaps.otf") format("opentype");
}

/* ---- shared panel ---- */
.vlp { box-sizing: border-box; }
.vlp *, .vlp *::before, .vlp *::after { box-sizing: inherit; }
.vlp-cols {
    display: grid;
    grid-template-columns: 1.1fr 1.5fr 1.1fr;
    gap: 18px;
    align-items: stretch;
}
.vlp-col {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.vlp-col h3 {
    margin: 0 0 4px;
    font-size: 120%;
    color: #35003a;
}
.vlp-col .vlp-sub {
    margin: 0 0 14px;
    font-size: 13px;
    color: #777;
}
.vlp-col-body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }

/* ---- VRM column ---- */
.vlp-vrm-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; }
/* .vlp input.<class> outguns forms.css's input[type=text] rule (which
   sets padding:2.5%/width:95%) in BOTH states -- with only a single
   class the plate padding held on :focus but collapsed on blur */
.vlp input.vlp-vrm-input, .vlp input.vlp-vrm-input:focus {
    background: url(../images/icons/vrm-flag.png) no-repeat -6px -9px #ffd800;
    background-color: #FFD752 !important;
    padding-left: 35px;
    font-size: 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
    font-family: "elcomeVrmFont";
    height: 50px;
    width: 200px;
    max-width: 100%;
    color: black !important;
    border-radius: 0.35rem;
    border: 0;
}
.vlp input.vlp-vrm-input.invalid { outline: 2px solid #ff3200; }
.vlp-vrm-go.primaryButton { width: auto; padding-left: 28px; padding-right: 28px; border-radius: 0.35rem; }

/* ---- manual selector column (ids consumed by vehicle-filter-cookies.js) ---- */
.vlp .vehicle-filter-wrapper { padding: 0; }
.vlp .vehicle-filter-wrapper form { display: flex; flex-direction: column; gap: 10px; }
.vlp .select-wrapper { width: 100%; margin: 0; }
.vlp .select-wrapper label { display: none; }
.vlp select {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    font-size: 1em;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    font-family: inherit;
}
.vlp .button-wrapper { display: flex; gap: 8px; margin: 4px 0 0; }
.vlp button[type="submit"], .vlp button#clear-selection {
    height: 46px;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .2s ease;
    font-size: 1em;
    font-family: inherit;
}
.vlp button[type="submit"] {
    background-color: #ff3200;
    color: #fff;
    flex: 1 1 auto;
    font-weight: bold;
    gap: 10px;
    padding: 0 16px;
}
.vlp button[type="submit"]:disabled, .vlp button#clear-selection:disabled {
    background-color: #999;
    cursor: not-allowed;
    pointer-events: all !important;
}
.vlp button#clear-selection { background-color: #999; color: #fff; width: 46px; flex: 0 0 46px; }
.vlp button[type="submit"] svg { width: 18px; height: 18px; }
.vlp button[type="submit"] .button-label-small { display: none; }

/* ---- saved vehicles column ---- */
.vlp-saved-list { display: flex; flex-direction: column; gap: 8px; }
.vlp-saved-item {
    display: flex;
    align-items: stretch;
    width: 100%;
    background: #faf7fb;
    border: 1px solid #e0d2e4;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color .15s ease;
}
.vlp-saved-item:hover { border-color: #6e1287; }
.vlp-saved-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 8px 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: #35003a;
}
.vlp-saved-remove {
    flex: 0 0 auto;
    border: 0;
    border-left: 1px solid #e0d2e4;
    background: transparent;
    color: #999;
    font-size: 16px;
    line-height: 1;
    padding: 0 11px;
    cursor: pointer;
    font-family: inherit;
    transition: color .15s ease, background-color .15s ease;
}
.vlp-saved-remove:hover { color: #ff3200; background: #fdf0ec; }
.vlp-saved-plate {
    flex: 0 0 auto;
    background: #ffd800;
    font-family: "elcomeVrmFont";
    font-size: 15px;
    padding: 2px 7px;
    border-radius: 3px;
    color: #000;
    white-space: nowrap;
}
.vlp-saved-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vlp-saved-year { flex: 0 0 auto; color: #777; }
.vlp-saved-empty { font-size: 13px; color: #666; line-height: 1.5; }
.vlp-saved-foot { margin-top: 10px; font-size: 13px; }
.vlp-saved-foot a { color: #6e1287; }

/* ---- hero context ---- */
.vlp--hero {
    background: url("../images/backgrounds/vehicle.selector.jpg?v=1") center / cover #4b3144;
    border-radius: 8px;
    padding: 22px;
    margin: 40px auto;
}
.vlp--hero .vlp-heading {
    margin: 0 0 16px;
    color: #fff;
    font-size: 175%;
    text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.vlp--hero .vlp-oem-strip {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.vlp--hero .vlp-oem-strip input {
    height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
}
.vlp--hero .vlp-oem-strip input.invalid { outline: 2px solid #ff3200; }
.vlp--hero .vlp-oem-strip .primaryButton { width: auto; padding: 0 20px; height: 40px; border-radius: 4px; }

/* ---- menu context ---- */
.vlp--menu { padding: 4px 0 8px; }
.vlp--menu .vlp-heading { margin: 0 0 14px; font-size: 140%; color: #35003a; }
.vlp--menu .vlp-col { background: #fafafa; }

/* pulse when the header button scrolls the user here */
.vlp-pulse { animation: vlpPulse 1s ease 2; }
@keyframes vlpPulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,50,0,.65); }
    100% { box-shadow: 0 0 0 18px rgba(255,50,0,0); }
}

@media (max-width: 900px) {
    .vlp-cols { grid-template-columns: 1fr; }
    /* Mobile hero art: a 600x400 CENTRE CROP of the desktop banner, not a
       downscale of it (53KB vs 192KB).

       Why a crop. Below this breakpoint .vlp-cols stacks to one column, so the
       hero becomes roughly 412x932 -- a tall box fed a 2048x400 letterbox.
       background-size:cover then scales that source 6.1x and shows only the
       middle ~177px of it. All the horizontal detail we were paying 192KB to
       send is cropped away unseen. Downscaling the full banner instead would
       have made it worse, not better: the visible slice would drop to ~88px of
       real detail and get blown up 12x.

       600px wide gives headroom -- it still covers any hero box down to a 1.5:1
       aspect, so a shorter panel (empty saved-vehicles column, say) does not
       run out of image. Appearance is unchanged from the full banner because
       the browser was upscaling either way.

       THE BREAKPOINT IS LOAD-BEARING: includes/header.cfm preloads these two
       files behind media queries that must MATCH this 900px exactly. If they
       disagree, the browser preloads one image and the CSS then requests the
       other -- both get downloaded. Change them together. */
    .vlp--hero {
        padding: 14px;
        margin: 20px auto;
        border-radius: 0;
        background-image: url("../images/backgrounds/vehicle.selector.mobile.jpg?v=1");
    }
    /* returning visitors: their saved vehicles are the fastest route in,
       so that column jumps to the top of the stack (class set by the
       saved-list renderer when the list is non-empty) */
    .vlp.vlp-has-saved .vlp-col-saved { order: -1; }
    /* OEM search becomes a card like the columns above it */
    .vlp--hero .vlp-oem-strip {
        background: #fff;
        border: 1px solid #e2e2e2;
        border-radius: 8px;
        padding: 16px;
        margin-top: 16px;
        color: #35003a;
        text-shadow: none;
        font-weight: bold;
    }
}

/* ---------------------------------------------------------------------------
   VRM column background: Octane's three-car shot, anchored bottom-right.
   Source: Trade/images/backgrounds/cars.jpg, cropped to the cars + the Octane
   "D" device and resized to 760px (41KB).

   The fade is done HERE as a layered linear-gradient rather than baked into the
   JPEG. Baking it left a hard vertical seam where the ramp ended, and a CSS
   gradient also lets the falloff be tuned without regenerating the asset. The
   photo's own background is a light grey concrete, not white, so without this
   veil the image reads as a pasted rectangle on the white card.

   Text stays dark (the panel's normal colours) because the image is light -
   the opposite of the dark platform hero, which needed white text. */
.vlp-col-vrm {
    background-image:
        linear-gradient(to right,  #fff 0%, rgba(255,255,255,.94) 26%, rgba(255,255,255,.55) 55%, rgba(255,255,255,.35) 100%),
        linear-gradient(to bottom, #fff 0%, rgba(255,255,255,.85) 22%, rgba(255,255,255,0)   55%),
        url("../images/backgrounds/vlp-cars.jpg");
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: right bottom, right bottom, right bottom;
    background-size: cover, cover, auto 78%;
}
/* the input sits over the artwork, so keep it on its own solid ground */
.vlp-col-vrm .vlp-vrm-form { position: relative; z-index: 1; }

@media (max-width: 900px) {
    /* stacked layout - the card is much shorter, so the artwork would crowd
       the input. Shrink it and lighten the veil further. */
    .vlp-col-vrm { background-size: cover, cover, auto 62%; }
}
