/* octane.vehicle.cfm page styles: the vehicle band (structured title + spec
   chips + in-vehicle search), the brand tab rail attached to its bottom edge,
   and the fixed #veh-band-mini that slides in once the band scrolls away.

   LAYOUT-STABILITY CONTRACT: the band is ORDINARY FLOW CONTENT -- it scrolls
   off like anything else and NOTHING about it changes height on scroll, so
   page content below can never jump (the previous condense-in-place sticky
   band shifted everything by ~180px at the toggle; do not reintroduce it).
   The compact state is the SEPARATE fixed mini bar, shown/hidden purely with
   transform, which cannot affect layout.

   FULL-BLEED NOTE: the band and rail live inside .fixedwidth (max-width
   1632px), so on very wide screens their backgrounds are extended to the
   viewport edges with the box-shadow + clip-path trick rather than by moving
   the markup out of the container. The mini bar is position:fixed, so it is
   naturally full-bleed with a centred inner column.

   GEOMETRY: the mini bar is a FIXED 48px tall, and the rail's .has-bar top is
   that same 48px - if either changes, change both, or the rail pins with a
   gap above it / hides under the bar. */

#veh-band {
    background: #f7f3f9;
    box-shadow: 0 0 0 100vmax #f7f3f9;
    clip-path: inset(0 -100vmax);
    margin-top: -20px;            /* close .overall-content-container's top gap
                                     so the band sits flush under the menu bar */
    text-align: left;             /* undo .fixedwidth centring */
}

.veh-band-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    padding: 22px 24px 0;
}

.veh-h1 {
    /* overrides the global h1 (display:table; margin:0 auto; 340% desktop) */
    display: block;
    width: auto;
    margin: 0;
    font-family: Archivo, "gill-sans-nova", sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #11171f;
    line-height: 1.15;
}
.veh-codes {
    font-size: 18px;
    font-weight: 500;
    color: #6b7683;
}
.veh-variant {
    font-family: Archivo, "gill-sans-nova", sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: #35003a;
    margin: 4px 0 12px;
}
.veh-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 16px;
}
.veh-chip {
    background: #fff;
    border: 1px solid #e0d2e4;
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 13.5px;
    color: #55606e;
    white-space: nowrap;
}

.veh-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    padding-top: 4px;
    flex: 0 0 auto;
}
.vehicle-search { display: flex; gap: 8px; margin: 0; }
.vehicle-search input[type="search"] {
    width: 300px;
    font-size: 16px;
    padding: 10px 14px;
    border: 2px solid #35003a;
    border-radius: 6px;
}
.vehicle-search button {
    font-size: 16px;
    padding: 10px 20px;
    border: 0;
    border-radius: 6px;
    background: #35003a;
    color: #fff;
    cursor: pointer;
}
.vehicle-search button:hover { background: #6e1287; }
/* the "Change vehicle" button that lived here moved to the top utility bar */

/* trade export row: its own strip under the vehicle details, before the tab
   rail (trade sessions only - retail never renders it). The bottom padding is
   the deliberate breathing space between the button and the tabs. */
.veh-trade-row { padding: 2px 24px 20px; }

/* ---------- TAB RAIL ----------
   The rail is the jQuery-UI tab strip restyled: one non-wrapping row that
   scrolls horizontally, brand colours kept from the inline styles, active tab
   marked with an orange underline. It sticks just below the condensed band. */

#product-tabs { padding: 0; }     /* .ui-tabs adds .2em */

/* The ul IS the rail: sticky, one non-wrapping row, horizontal scroll. It must
   stay the DIRECT child of #product-tabs - jQuery UI inserts every ajax tab's
   panel with insertAfter(tablist), so wrapping the ul in a div swallows the
   loaded panels into that wrapper (they render as huge flex items and blow the
   page width on mobile). Selector works before tabs() runs and after (the ul
   additionally gains .ui-tabs-nav). */
#product-tabs ul.veh-rail {
    position: sticky;
    top: 0;                       /* flush to the viewport until the mini bar
                                     arrives; .has-bar glides it down 48px */
    transition: top .22s ease;
    z-index: 899;                 /* under the mini bar (900) */
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: none;        /* rail scrolls; no visible bar */
    margin: 0;
    padding: 0;                   /* NO side padding: the sticky arrows pin to
                                     the scrollport's padding box, so padding
                                     leaves a sliver of tabs visible past them */
    list-style: none;
    background: #f7f3f9;
    box-shadow: 0 0 0 100vmax #f7f3f9;
    clip-path: inset(0 -100vmax);
    border-bottom: 1px solid #e0d2e4;
}
#product-tabs ul.veh-rail::-webkit-scrollbar { display: none; }

#product-tabs ul.veh-rail li {
    flex: 0 0 auto;
    display: flex;
    margin: 0;
    border: 0;
    background: transparent;
    white-space: nowrap;
}
#product-tabs ul.veh-rail li .ui-tabs-anchor,
#product-tabs ul.veh-rail li a {
    float: none;
    display: inline-flex;
    align-items: center;
    padding: 13px 13px 10px;
    background: transparent;
    font-family: GothamPro, "gill-sans-nova", sans-serif;
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    line-height: normal;
}
#product-tabs ul.veh-rail li.ui-tabs-active .ui-tabs-anchor {
    background: rgba(255, 255, 255, .85);
    border-bottom-color: #ff3200;
    cursor: pointer;
}

/* Scroll controls: arrow buttons pinned to the rail's edges with HORIZONTAL
   position:sticky (left:0 / right:0 inside the scrolling ul), which tracks
   both the rail's own vertical stickiness and its scrolling - the reasons a
   wrapper or absolutely-positioned siblings can't work here. The page JS
   toggles .can-left / .can-right from scrollLeft, so each arrow only shows
   when there are tabs beyond it, and re-seats the arrow items first/last
   after the footer's alphabetical reorder. Each arrow carries a soft
   gradient shadow on its inner side as the fade cue. */
#product-tabs ul.veh-rail li.veh-rail-nav {
    display: none;
    position: sticky;
    z-index: 2;
    flex: 0 0 auto;
}
#product-tabs ul.veh-rail.can-left li.veh-rail-prev { display: flex; left: 0; }
#product-tabs ul.veh-rail.can-right li.veh-rail-next { display: flex; right: 0; }
#product-tabs ul.veh-rail li.veh-rail-prev {
    border-right: 1px solid #e0d2e4;
    box-shadow: 14px 0 12px -6px rgba(247, 243, 249, .95);
}
#product-tabs ul.veh-rail li.veh-rail-next {
    border-left: 1px solid #e0d2e4;
    box-shadow: -14px 0 12px -6px rgba(247, 243, 249, .95);
}
#product-tabs ul.veh-rail li.veh-rail-nav button {
    border: 0;
    cursor: pointer;
    width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f3f9;
    color: #6e1287;
    padding: 0;
}
#product-tabs ul.veh-rail li.veh-rail-nav button:hover { background: #efe6f2; }
#product-tabs ul.veh-rail li.veh-rail-nav svg { display: block; }

/* wheel- and drag-scroll stay as conveniences on top of the arrows */
#product-tabs ul.veh-rail.can-left,
#product-tabs ul.veh-rail.can-right { cursor: grab; }
#product-tabs ul.veh-rail.is-dragging { cursor: grabbing; }
#product-tabs ul.veh-rail.is-dragging li a { pointer-events: none; }

/* ---------- MINI BAR (scrolled state) ---------- */

/* The fixed 48px twin of the band. transform + visibility only -- never
   display or height -- so showing/hiding it cannot move page content. The
   delayed visibility on hide keeps it focusable/visible for exactly the
   length of the slide-out. The rail's .has-bar (top 0 -> 48px) is toggled
   by the same observer, and being sticky it moves without affecting flow. */
#veh-band-mini {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    z-index: 900;                 /* over the rail (899); under the
                                     header/mega-menu (1040/1100) */
    background: #f7f3f9;
    box-shadow: 0 2px 10px rgba(17, 23, 31, .10);
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform .22s ease, visibility 0s linear .22s;
}
#veh-band-mini.is-shown {
    transform: translateY(0);
    visibility: visible;
    transition: transform .22s ease;
}
.veh-mini-inner {
    max-width: 1632px;            /* mirror .fixedwidth */
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    box-sizing: border-box;
    text-align: left;
}
.veh-mini-title {
    font-family: Archivo, "gill-sans-nova", sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #11171f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.veh-mini-title .veh-codes { font-size: 13px; }
.veh-mini-variant {
    font-family: Archivo, "gill-sans-nova", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #35003a;
    white-space: nowrap;
    flex: 0 0 auto;
}
.veh-mini-search { margin-left: auto; flex: 0 0 auto; }
.veh-mini-search input[type="search"] {
    width: 200px;
    padding: 5px 10px;
    font-size: 14px;
}
.veh-mini-search button {
    padding: 5px 12px;
    font-size: 14px;
}
#product-tabs ul.veh-rail.has-bar { top: 48px; }   /* = mini bar height */

/* ---------- MOBILE ---------- */

@media (max-width: 760px) {
    .veh-band-main {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 14px 16px 0;
    }
    .veh-h1 { font-size: 21px; line-height: 1.2; }
    .veh-codes { font-size: 14px; }
    .veh-variant { font-size: 16px; margin: 3px 0 10px; }
    .veh-chips { padding-bottom: 12px; }
    .veh-side {
        /* column: full-width search row, then (trade only) the export button */
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 0 0 14px;
    }
    .vehicle-search { flex: 1 1 auto; min-width: 0; width: 100%; }
    .vehicle-search input[type="search"] { width: 100%; min-width: 0; flex: 1; }
    .vehicle-search button { padding: 10px 14px; }
    .veh-trade-row { padding: 0 16px 16px; }

    /* name only in the mini bar on small screens */
    .veh-mini-inner { padding: 0 16px; }
    .veh-mini-variant { display: none; }
    .veh-mini-search { display: none; }
}
