/* ==========================================================================
   Site header (redesign) — self-contained stylesheet, loaded by
   includes/new-header.php. Scoped under .bb-hdr / .bb-hdr-drawer so it
   cannot collide with the legacy .bb-new-header rules in
   css/new-global-styles.css (which also style the footer).
   ========================================================================== */

.bb-hdr, .bb-hdr *, .bb-hdr *::before, .bb-hdr *::after,
.bb-hdr-drawer, .bb-hdr-drawer *, .bb-hdr-drawer *::before, .bb-hdr-drawer *::after {
    box-sizing: border-box;
}

.bb-hdr, .bb-hdr-drawer, .bb-hdr-drawer-overlay {
    --bbh-navy: #004973;
    --bbh-navy-deep: #003C5F;
    --bbh-blue: #57A2DB;
    --bbh-blue-bright: #7EB8E4;
    --bbh-amber: #F5B84A;
}
.bb-hdr {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, var(--bbh-navy-deep) 0%, var(--bbh-navy) 100%);
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-family: 'Poppins', system-ui, sans-serif;
    /* shadow only: swapping the gradient background on scroll cannot be
       transitioned (gradients don't interpolate) and reads as a flash */
    transition: box-shadow .2s ease;

    /* NB: no overflow clipping here, deliberately. A CLOSED dropdown panel still
       occupies layout (visibility:hidden keeps the box), so an unclamped panel
       hanging off the right of the viewport used to give every page ~100px of
       phantom horizontal scroll. That is now fixed at the source: clampAll() in
       new-header.php clamps EVERY panel inside the viewport on load, on resize
       and once webfonts settle — closed ones included — so nothing overhangs and
       there is nothing to clip.

       Clipping here instead would shear the panels' drop shadow, and would rely
       on `overflow: clip`, which Safari only supports from 16.0 (older Safari
       drops the declaration and the phantom scroll comes straight back). */
}
.bb-hdr.bb-hdr--stuck {
    box-shadow: 0 10px 30px rgba(0,20,35,.35);
}
.bb-hdr a, .bb-hdr a:hover { text-decoration: none; }

.bb-hdr-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 26px;
    height: 70px;
}

/* ---------- logo ---------- */
.bb-hdr-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 8px;
}
.bb-hdr-logo img {
    height: 34px;
    width: auto;
    display: block;
}

/* ---------- search trigger (Algolia detached button) ----------
   typeahead-theme.css (loaded after this file) styles the same button with
   !important rules (42px height, purple #6C37B8 icon block on
   .aa-DetachedSearchButtonQuery:after, hidden left icon). Everything below
   is scoped to the header and uses !important to win those fights without
   touching other placements of the widget. */
.bb-hdr-search {
    flex: 0 1 300px;
    min-width: 150px;
    position: relative;
}
/* the theme gives .autocomplete margin:auto + min-width:150px; zero both so
   the widget can never paint wider than its (shrinkable) flex item */
.bb-hdr .bb-hdr-search .autocomplete { width: 100%; min-width: 0; margin: 0; max-width: 100%; }
.bb-hdr .bb-hdr-search #autocomplete { width: 100%; min-width: 0; max-width: 100%; }
.bb-hdr .bb-hdr-search button.aa-DetachedSearchButton {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    padding: 0 10px 0 12px !important;
    background: rgba(255,255,255,.07) !important;
    border: 1px solid rgba(255,255,255,.13) !important;
    border-radius: 10px !important;
    color: rgba(255,255,255,.6) !important;
    font-family: 'Poppins', system-ui, sans-serif !important;
    font-size: 13px !important;
    text-align: left !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.bb-hdr .bb-hdr-search button.aa-DetachedSearchButton:hover,
.bb-hdr .bb-hdr-search button.aa-DetachedSearchButton:focus,
.bb-hdr .bb-hdr-search button.aa-DetachedSearchButton:focus-visible {
    border-color: rgba(126,184,228,.7) !important;
    background: rgba(255,255,255,.10) !important;
    box-shadow: none !important;
    outline: none;
}
.bb-hdr .bb-hdr-search .aa-DetachedSearchButtonIcon {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    color: rgba(255,255,255,.55);
    background: none !important;
    flex-shrink: 0;
    width: auto !important;
    height: auto !important;
    cursor: pointer;
}
.bb-hdr .bb-hdr-search .aa-DetachedSearchButtonIcon svg { width: 15px; height: 15px; }
.bb-hdr .bb-hdr-search .aa-DetachedSearchButtonPlaceholder,
.bb-hdr .bb-hdr-search .aa-DetachedSearchButtonQuery {
    color: rgba(255,255,255,.55) !important;
    font-family: 'Poppins', system-ui, sans-serif !important;
    font-size: 13px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0; /* allow ellipsis instead of propping the button open */
    text-align: left;
    padding: 0;
}
.bb-hdr .bb-hdr-search .aa-DetachedSearchButtonPlaceholder[hidden] { display: none !important; }
.bb-hdr .bb-hdr-search .aa-DetachedSearchButtonQuery { color: #fff !important; }
/* an empty query div must not steal flex space from the placeholder */
.bb-hdr .bb-hdr-search .aa-DetachedSearchButtonQuery:empty { flex: 0 0 auto; }
/* kill the theme's purple search block */
.bb-hdr .bb-hdr-search .aa-DetachedSearchButtonQuery::after { content: none !important; }
/* shortcut chip */
.bb-hdr-search button.aa-DetachedSearchButton::after {
    content: 'Ctrl K';
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10.5px;
    color: rgba(255,255,255,.6);
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 5px;
    padding: 2px 6px;
    flex-shrink: 0;
    line-height: 1.4;
}
.bb-hdr.bb-hdr--mac .bb-hdr-search button.aa-DetachedSearchButton::after { content: '\2318K'; }
/* fallback pill while the Algolia widget is still mounting */
.bb-hdr-search #autocomplete:empty {
    display: flex;
    align-items: center;
    height: 38px;
    padding: 0 12px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 10px;
}
.bb-hdr-search #autocomplete:empty::before {
    content: 'Search Drugs by Name or Code Here';
    color: rgba(255,255,255,.55);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- primary nav ---------- */
.bb-hdr-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.bb-hdr-drop { position: relative; }
.bb-hdr-top {
    appearance: none;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: rgba(255,255,255,.88);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: normal;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
    position: relative;
    white-space: nowrap;
}
.bb-hdr-top:hover { background: rgba(255,255,255,.08); color: #fff; }
.bb-hdr-top:focus-visible { outline: 2px solid var(--bbh-blue-bright); outline-offset: 1px; }
.bb-hdr-top[aria-current="page"], .bb-hdr-top.bb-hdr-top--active { color: #fff; }
.bb-hdr-top[aria-current="page"]::after, .bb-hdr-top.bb-hdr-top--active::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: var(--bbh-blue);
}
/* Analytics: a nav item whose label IS the logo. Selectors are (0,2,0) on
   purpose — the max-width:1420px block below restyles .bb-hdr-top (0,1,0) and
   comes later in the file, so a single-class modifier here would lose to it. */
.bb-hdr-nav .bb-hdr-top--logo { padding: 6px 12px; }
/* 34px: below that the two-line lockup reads lighter than the text labels
   beside it; above it the mark starts to crowd the 70px bar. */
.bb-hdr-nav .bb-hdr-top--logo img {
    height: 34px;
    width: auto;
    display: block;
    opacity: .9;
    transition: opacity .15s ease;
}
/* The mark is already white, so it can't take the text links' colour change —
   it brightens instead. */
.bb-hdr-nav .bb-hdr-top--logo:hover img,
.bb-hdr-nav .bb-hdr-top--logo.bb-hdr-top--active img { opacity: 1; }
.bb-hdr-nav .bb-hdr-top--logo.bb-hdr-top--active::after { left: 12px; right: 12px; }
.bb-hdr-top .bb-hdr-chev { width: 14px; height: 14px; transition: transform .18s ease; opacity: .65; flex-shrink: 0; }
.bb-hdr-drop.bb-hdr-open > .bb-hdr-top { background: rgba(255,255,255,.10); color: #fff; }
.bb-hdr-drop.bb-hdr-open > .bb-hdr-top .bb-hdr-chev { transform: rotate(180deg); }

/* ---------- right cluster ---------- */
.bb-hdr-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
    flex-shrink: 0;
}
.bb-hdr-verify {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: #F7CE7E;
    cursor: pointer;
    background: rgba(245,184,74,.13);
    border: 1px solid rgba(245,184,74,.45);
    border-radius: 999px;
    padding: 7px 15px;
    transition: background .15s ease;
    white-space: nowrap;
}
.bb-hdr-verify:hover { background: rgba(245,184,74,.22); }
.bb-hdr-verify:focus-visible { outline: 2px solid var(--bbh-amber); outline-offset: 1px; }
.bb-hdr-verify .bb-hdr-verify-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bbh-amber);
    box-shadow: 0 0 0 3px rgba(245,184,74,.25);
}
.bb-hdr-upgrade {
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    background: var(--bbh-blue);
    border: 0;
    border-radius: 10px;
    padding: 9px 18px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease;
    white-space: nowrap;
    line-height: normal;
}
.bb-hdr-upgrade:hover { background: var(--bbh-blue-bright); }
.bb-hdr-upgrade:focus-visible { outline: 2px solid var(--bbh-blue-bright); outline-offset: 1px; }
.bb-hdr-login {
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,.88);
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 10px;
    white-space: nowrap;
}
.bb-hdr-login:hover { background: rgba(255,255,255,.08); color: #fff; }
.bb-hdr-cta {
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: #00354F;
    background: #fff;
    border: 0;
    border-radius: 10px;
    padding: 9px 18px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    line-height: normal;
    transition: transform .15s ease, box-shadow .15s ease;
}
.bb-hdr-cta:hover { box-shadow: 0 4px 14px rgba(0,0,0,.25); transform: translateY(-1px); }

/* The one action we want a logged-out visitor to take. A sky halo (the design
   system's on-dark accent) plus a little extra weight and size separates it
   from the plain nav links either side of it.
   Modifier rules must stay AFTER the base :hover — both are (0,2,0) specificity,
   so the override rides on source order alone. */
.bb-hdr-cta--focus {
    font-size: 14.5px;
    font-weight: 700;
    padding: 10px 22px;
    box-shadow: 0 0 0 3px rgba(126,184,228,.28), 0 6px 18px rgba(87,162,219,.40);
}
.bb-hdr-cta--focus:hover {
    box-shadow: 0 0 0 4px rgba(126,184,228,.42), 0 8px 24px rgba(87,162,219,.60);
    transform: translateY(-1px);
}
.bb-hdr-cta--focus:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Slow breathing halo — enough to catch the eye once, not a strobe. Sits on the
   drop shadow only; the ring stays put so the button never looks like it moves. */
@media (prefers-reduced-motion: no-preference) {
    .bb-hdr-cta--focus { animation: bbHdrCtaGlow 3.2s ease-in-out infinite; }
    .bb-hdr-cta--focus:hover { animation: none; }
}
@keyframes bbHdrCtaGlow {
    0%, 100% { box-shadow: 0 0 0 3px rgba(126,184,228,.24), 0 6px 16px rgba(87,162,219,.32); }
    50%      { box-shadow: 0 0 0 3px rgba(126,184,228,.38), 0 8px 26px rgba(87,162,219,.62); }
}

/* avatar */
.bb-hdr-user { position: relative; }
.bb-hdr-avatar-btn {
    appearance: none;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px;
    border-radius: 999px;
    transition: background .15s ease;
}
.bb-hdr-avatar-btn:hover, .bb-hdr-user.bb-hdr-open .bb-hdr-avatar-btn { background: rgba(255,255,255,.10); }
.bb-hdr-avatar-btn:focus-visible { outline: 2px solid var(--bbh-blue-bright); }
.bb-hdr-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #57A2DB, #2A7AB8);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
    flex-shrink: 0;
}
.bb-hdr-avatar-btn .bb-hdr-chev { width: 13px; height: 13px; color: rgba(255,255,255,.6); transition: transform .18s ease; }
.bb-hdr-user.bb-hdr-open .bb-hdr-chev { transform: rotate(180deg); }

/* ---------- dropdown panels (always light — product surface) ---------- */
.bb-hdr-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translate(-50%, 6px) scale(.985);
    background: #fff;
    border: 1px solid rgba(0,73,115,.10);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0,25,40,.22), 0 4px 14px rgba(0,25,40,.10);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
    z-index: 110;
    max-width: calc(100vw - 24px);
    /* Never let a panel run past the bottom of the window — the two-row Tools
       grid is ~525px tall, which overhangs a 600px-high viewport (a 1280x800
       laptop once browser chrome is taken out). Only binds on short screens. */
    max-height: calc(100vh - 88px);
    overflow-y: auto;
}
.bb-hdr-open > .bb-hdr-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
}
.bb-hdr-panel.bb-hdr-panel--right {
    left: auto;
    right: 0;
    transform: translate(0, 6px) scale(.985);
    transform-origin: top right;
}
.bb-hdr-open > .bb-hdr-panel.bb-hdr-panel--right { transform: translate(0, 0) scale(1); }

.bb-hdr-panel-cols { display: flex; gap: 10px; padding: 20px 20px 16px; }
/* Explicit width, not min-width. The panel is position:absolute with width:auto
   inside a .bb-hdr-drop that is only as wide as its trigger (~92px), so CSS
   shrink-to-fit resolves it to its MIN-content width, never max-content. Under
   min-content the columns were squeezed ~30px below what their rows need and the
   nowrap titles spilled out of their own hover background. Fixing the column
   width makes min-content == max-content, so the panel is the same size either
   way and the rows always fit. */
.bb-hdr-panel-col { flex: 0 0 auto; width: 264px; min-width: 0; padding: 0 8px; }
.bb-hdr-panel-col + .bb-hdr-panel-col { border-left: 1px solid #E4EDF3; padding-left: 18px; }

/* --grid: two groups per row instead of one long row. Tools has four groups on
   the beta tier, and laid out in a single row the panel was 1128px — 89% of a
   1266px viewport, which read as "running off the screen". Two-group (non-beta)
   Tools falls out of the same rule as a single row of two. */
.bb-hdr-panel--grid .bb-hdr-panel-cols { flex-wrap: wrap; width: 642px; }
.bb-hdr-panel--grid .bb-hdr-panel-col { width: 296px; }
/* the left-hand column of each row starts the row: no vertical rule */
.bb-hdr-panel--grid .bb-hdr-panel-col:nth-child(odd) { border-left: 0; padding-left: 8px; }
/* ...rows after the first are separated horizontally instead */
.bb-hdr-panel--grid .bb-hdr-panel-col:nth-child(n+3) {
    border-top: 1px solid #E4EDF3;
    margin-top: 14px;
    padding-top: 16px;
}
.bb-hdr-group-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #6B8A9C;
    margin: 2px 0 12px;
    padding-left: 10px;
    white-space: nowrap;
}
.bb-hdr-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 11px 12px;
    border-radius: 10px;
    text-decoration: none;
    transition: background .13s ease;
    cursor: pointer;
}
.bb-hdr-item:hover { background: #F2F8FC; }
.bb-hdr-item:focus-visible { outline: 2px solid var(--bbh-blue); outline-offset: -2px; }
.bb-hdr-ico { width: 20px; height: 20px; color: #8AA3B2; flex-shrink: 0; margin-top: 2px; transition: color .13s ease; }
.bb-hdr-ico svg { width: 20px; height: 20px; stroke-width: 1.7; display: block; }
.bb-hdr-item:hover .bb-hdr-ico { color: #1B6EA8; }
/* the text block must be allowed to shrink; without min-width:0 a flex item
   refuses to go below its min-content size and overflows the row instead */
.bb-hdr-txt { min-width: 0; }
.bb-hdr-item-title {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
    color: #0F2B3D;
    line-height: 1.4;
    /* Inline flow, NOT a flex row. The trailing ↗ / New pill are flowed inline so
       they stay attached to the last word: as flex children of a title that wraps,
       they were pushed onto a flex line of their own and dangled under the text.
       And NOT nowrap: a title longer than its column used to escape the row and
       paint outside its own hover background. */
}
.bb-hdr-item-desc {
    display: block;
    font-size: 12.5px;
    color: #5A7484;
    line-height: 1.5;
    margin-top: 3px;
    /* the column now sets the measure; a 30ch cap on top of it just left a ragged
       right edge that didn't line up with the group label above */
}
/* the logo lockup row keeps a flex line: its "title" is an <img>, not text */
.bb-hdr-item-title--logo { display: flex; align-items: center; gap: 8px; margin: -2px 0; }
.bb-hdr-item-logo { height: 42px; width: auto; display: block; }
/* inline-level, and spaced with a margin rather than a literal space in the markup
   — a space would be a line-break opportunity and let the mark wrap away from the
   word it belongs to */
.bb-hdr-ext {
    width: 11px;
    height: 11px;
    color: #5A7484;
    opacity: .7;
    display: inline-block;
    vertical-align: baseline;
    margin-left: 4px;
}
.bb-hdr-pill-new {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .03em;
    color: #fff;
    background: linear-gradient(135deg, #57A2DB, #2A7AB8);
    border: 0;
    border-radius: 999px;
    padding: 2.5px 9px;
    line-height: 1.5;
    box-shadow: 0 1px 4px rgba(42,122,184,.35);
}

/* account panel */
.bb-hdr-panel--account { width: 272px; }
.bb-hdr-acct-head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px 18px 14px;
    border-bottom: 1px solid #E4EDF3;
}
.bb-hdr-acct-head .bb-hdr-avatar { width: 40px; height: 40px; font-size: 14px; }
.bb-hdr-acct-who { min-width: 0; }
.bb-hdr-acct-who b {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #0F2B3D;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bb-hdr-acct-who span {
    display: block;
    font-size: 11.5px;
    color: #5A7484;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bb-hdr-plan-chip {
    margin-left: auto;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 6px;
    padding: 3px 8px;
    flex-shrink: 0;
}
.bb-hdr-plan-chip--free { background: #EDF1F4; color: #5A7484; }
.bb-hdr-plan-chip--basic { background: #EAF3F9; color: #1B6EA8; }
.bb-hdr-plan-chip--pro { background: #004973; color: #fff; }
.bb-hdr-acct-list { padding: 8px; }
.bb-hdr-acct-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: 9px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: normal;
    color: #0F2B3D;
    cursor: pointer;
    transition: background .13s ease;
}
.bb-hdr-acct-item:hover { background: #F2F8FC; }
.bb-hdr-acct-item:focus-visible { outline: 2px solid var(--bbh-blue); outline-offset: -2px; }
.bb-hdr-acct-item svg { width: 15px; height: 15px; color: #5A7484; stroke-width: 1.8; flex-shrink: 0; }
.bb-hdr-acct-item--danger { color: #B3453C; }
.bb-hdr-acct-item--danger svg { color: #B3453C; }
.bb-hdr-acct-upgrade {
    margin: 4px 8px 10px;
    padding: 11px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #EAF3F9, #F4FAFE);
    border: 1px solid #D6E8F4;
    font-size: 11.5px;
    color: #3D6377;
    line-height: 1.45;
}
.bb-hdr-acct-upgrade b { color: #0F2B3D; font-weight: 600; display: block; font-size: 12px; }
/* explicit size/line-height: the site-wide `a { font-size:16px }` rule in
   new-global-styles.css otherwise beats inheritance on any bare anchor */
.bb-hdr-acct-upgrade a { color: #1B6EA8; font-weight: 600; text-decoration: none; font-size: 11.5px; line-height: inherit; }
.bb-hdr-acct-upgrade a:hover { text-decoration: underline; }

/* ---------- burger (mobile) ---------- */
.bb-hdr-burger {
    display: none;
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 8px;
    border-radius: 9px;
    color: rgba(255,255,255,.85);
    flex-shrink: 0;
}
.bb-hdr-burger:hover { background: rgba(255,255,255,.08); }
.bb-hdr-burger:focus-visible { outline: 2px solid var(--bbh-blue-bright); }
.bb-hdr-burger svg { width: 20px; height: 20px; display: block; }

/* ---------- mobile drawer ---------- */
.bb-hdr-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,25,40,.5);
    z-index: 990;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s;
}
.bb-hdr-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 88vw);
    background: #fff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(102%);
    transition: transform .25s ease;
    box-shadow: -16px 0 50px rgba(0,25,40,.25);
    font-family: 'Poppins', system-ui, sans-serif;
    overflow-y: auto;
}
.bb-hdr-drawer-open .bb-hdr-drawer { transform: translateX(0); }
.bb-hdr-drawer-open .bb-hdr-drawer-overlay { opacity: 1; visibility: visible; }
.bb-hdr-drawer a, .bb-hdr-drawer a:hover { text-decoration: none; }
.bb-hdr-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(180deg, #003C5F 0%, #004973 100%);
}
.bb-hdr-drawer-head img { height: 26px; width: auto; display: block; }
.bb-hdr-drawer-close {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 8px;
    border-radius: 9px;
    color: rgba(255,255,255,.85);
}
.bb-hdr-drawer-close:hover { background: rgba(255,255,255,.10); }
.bb-hdr-drawer-close svg { width: 18px; height: 18px; display: block; }
.bb-hdr-drawer-body { flex: 1; padding: 8px 8px 16px; }
.bb-hdr-drawer-link {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: normal;
    color: #0F2B3D;
}
.bb-hdr-drawer-link:hover { background: #F2F8FC; }
.bb-hdr-acc { border-radius: 10px; }
.bb-hdr-acc-toggle {
    appearance: none;
    border: 0;
    background: transparent;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #0F2B3D;
    cursor: pointer;
}
.bb-hdr-acc-toggle:hover { background: #F2F8FC; }
.bb-hdr-acc-toggle svg { width: 14px; height: 14px; color: #5A7484; transition: transform .18s ease; }
.bb-hdr-acc.bb-hdr-open .bb-hdr-acc-toggle svg { transform: rotate(180deg); }
.bb-hdr-acc-body { display: none; padding: 0 6px 8px; }
.bb-hdr-acc.bb-hdr-open .bb-hdr-acc-body { display: block; }
.bb-hdr-acc-body .bb-hdr-group-label { margin-top: 10px; }
.bb-hdr-acc-body .bb-hdr-item-desc { max-width: none; }
.bb-hdr-drawer-foot { border-top: 1px solid #E4EDF3; padding: 12px 16px 18px; }
.bb-hdr-drawer-foot .bb-hdr-verify { width: 100%; justify-content: center; margin-bottom: 10px; }
.bb-hdr-drawer-foot .bb-hdr-upgrade { display: block; text-align: center; margin-bottom: 12px; }
.bb-hdr-drawer-acct { display: flex; gap: 12px; align-items: center; padding: 6px 0; }
.bb-hdr-drawer-acct .bb-hdr-avatar { width: 40px; height: 40px; font-size: 14px; }
.bb-hdr-drawer-acct .bb-hdr-acct-who b { color: #0F2B3D; }
.bb-hdr-drawer-login { display: flex; gap: 10px; }
.bb-hdr-drawer-login .bb-hdr-login { color: #0F2B3D; background: #EDF1F4; flex: 1; text-align: center; }
.bb-hdr-drawer-login .bb-hdr-cta { background: var(--bbh-navy); color: #fff; flex: 1; text-align: center; }
body.bb-hdr-drawer-lock { overflow: hidden; }

/* ---------- responsive ---------- */
/* tighten before the drawer takes over */
@media (max-width: 1420px) {
    .bb-hdr-search { flex-basis: 240px; }
    .bb-hdr-top { padding: 10px 12px; }
    .bb-hdr-top[aria-current="page"]::after, .bb-hdr-top.bb-hdr-top--active::after { left: 12px; right: 12px; }
    /* the logo is the widest single nav item — trim it hardest as room runs out */
    .bb-hdr-nav .bb-hdr-top--logo { padding: 6px 8px; }
    .bb-hdr-nav .bb-hdr-top--logo img { height: 30px; }
    .bb-hdr-nav .bb-hdr-top--logo.bb-hdr-top--active::after { left: 8px; right: 8px; }
    .bb-hdr-search button.aa-DetachedSearchButton::after { display: none; }
}
/* the enlarged desktop bar needs ~1180px; below that (including high browser
   zoom, which shrinks the effective viewport) switch to the drawer */
@media (max-width: 1180px) {
    .bb-hdr-nav, .bb-hdr-right { display: none; }
    .bb-hdr-burger { display: block; margin-left: auto; }
    .bb-hdr-inner { padding: 0 14px; }
    .bb-hdr-search { flex: 1 1 auto; margin-left: 4px; }
}
/* Phones. The bar is logo + search + burger, and the logo (127px, flex-shrink:0)
   plus the search's 150px min-width plus the burger simply do not fit: at 375px
   the burger was laid out at 362..398 — entirely outside the viewport, so the
   ONLY way into the nav was unreachable on every phone narrower than ~390px
   (SE, mini, X/11/12/13). Let the search shrink to nothing and trim the logo so
   all three always fit. The search stays usable: it is only a trigger for the
   full-screen Algolia modal, and its placeholder already ellipsizes. */
@media (max-width: 480px) {
    .bb-hdr-inner { gap: 8px; }
    .bb-hdr-logo { margin-right: 0; }
    .bb-hdr-logo img { height: 28px; }
    .bb-hdr-search { min-width: 0; margin-left: 0; }
}
@media (min-width: 1181px) {
    .bb-hdr-drawer, .bb-hdr-drawer-overlay { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .bb-hdr, .bb-hdr-panel, .bb-hdr-top .bb-hdr-chev, .bb-hdr-avatar-btn .bb-hdr-chev,
    .bb-hdr-search button.aa-DetachedSearchButton, .bb-hdr-drawer, .bb-hdr-drawer-overlay,
    .bb-hdr-acc-toggle svg {
        transition: none;
    }
}
