/* SkyBuds site chrome in the kit (2026-09-24): the header, the menu sheet and the account card,
   on every storefront page. Markup: sections/skybuds-kit-header.liquid; behaviour:
   assets/skybuds-chrome.js. Colours and easing come from the kit tokens (.sbk in
   skybuds-pdp.css), never from a hex written here. Phones first (docs/DESIGN-HARNESS.md §2). */

/* Sticky needs a page that is not a scroll container: the theme's overflow-x: hidden on html and
   body turns body into one and sticky silently does nothing (harness §4). clip hides the same. */
html:has(.sbh), html:has(.sbh) body { overflow-x: clip; }

/* A phone number is read whole: it broke at its hyphen ("(978) 541-" / "3603") on every legal page at
   320px, and in the privacy summary on every width (2026-09-26). A tel: link never wraps; a number in
   plain text sits in .sb-whole. An email breaks only at the <wbr>s after its @ and dots. The probe's
   contact-split fails any other break (qa/title-sweep.mjs reads every page at ten widths). */
a[href^="tel:"], .sb-whole { white-space: nowrap; }

/* ---------- header ---------- */
.skybuds-kit-header { position: sticky; top: 0; z-index: 1000; transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.skybuds-kit-header.is-tucked { transform: translateY(calc(-100% - 16px)); }
.sbh {
  font-family: Sora, system-ui, sans-serif; color: var(--navy);
  background: rgba(255, 248, 233, .92); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-radius: 0 0 26px 26px; box-shadow: 0 12px 26px -24px rgba(23, 63, 121, .55);
}
.sbh__bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: min(1280px, 100%); min-height: 64px; margin: 0 auto; padding: 10px 16px; }
.sbh__end { display: flex; align-items: center; gap: 8px; }

/* The round white buttons the quiz uses (quiz-kit.css .shell__back), everywhere in the chrome. */
.sbh__btn, .sbh .skybuds-header__account {
  position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; margin: 0;
  border-radius: 50%; background: #fff; color: var(--navy); border: 2.5px solid var(--line);
  box-shadow: 0 6px 14px -10px rgba(23, 63, 121, .55); cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent; transition: transform .15s ease, border-color .15s ease;
}
.sbh__btn:hover, .sbh .skybuds-header__account:hover { border-color: var(--yellow); background: #fff; }
.sbh__btn:active, .sbh .skybuds-header__account:active { transform: scale(.92); border-color: var(--orange); }
.sbh__btn:focus-visible, .sbh .skybuds-header__account:focus-visible, .sb-menu a:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.sbh__btn svg, .sbh .skybuds-header__account svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.sbh__cart svg circle { fill: currentColor; stroke: none; }

/* The theme gives every link a 44px min-height: centre the logo inside its link, or it rides high. */
.sbh__logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; min-height: 44px; line-height: 0; border-radius: 12px; }
/* The logo shrinks before it would touch the buttons: 248px = both sides' buttons, gaps and gutters. */
.sbh__logo-img { display: block; width: clamp(84px, calc(100vw - 248px), 128px); height: auto; }

/* The count bubble shows only when the cart has something in it (skybuds-chrome.js keeps data-count). */
.sbh__count {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; background: var(--orange); color: #fff; border: 2px solid var(--cream);
  font: 800 12px/1 Sora, system-ui, sans-serif; font-variant-numeric: tabular-nums;
}
.sbh__count[data-count="0"], .sbh__count:empty { display: none; }

/* Account button + card (assets/skybuds-account.js builds them next to the cart). */
.sbh .skybuds-header__actions { display: flex; align-items: center; gap: 8px; }
.sbh .skybuds-header__account { order: -1; }
.sbh .skybuds-header__account.is-signed-in { background: var(--yellow-soft); border-color: var(--yellow); color: var(--navy); }
.sbh .skybuds-header__account-dot { top: -4px; right: -4px; width: 14px; height: 14px; background: #3DBE72; border: 2.5px solid var(--cream); }
.sbh .sbac-pop {
  top: calc(100% + 12px); width: min(330px, calc(100vw - 32px)); padding: 18px; border-radius: 24px;
  background: var(--cream); border: 2.5px solid var(--line); box-shadow: 0 22px 44px -24px rgba(23, 63, 121, .55);
  font-family: Sora, system-ui, sans-serif; color: var(--navy);
}
.sbh .sbac-avatar { background: #fff; color: var(--orange); border: 2.5px solid var(--line); }
.sbh .sbac-title { color: var(--navy); font-size: 15px; }
.sbh .sbac-phone { font-size: 16px; }
.sbh .sbac-email { font-size: 14px; color: var(--navy); opacity: .75; }
.sbh .sbac-perk { background: var(--grass); color: var(--navy); border-radius: 16px; font-size: 14px; }
.sbh .sbac-perk--off { background: #fff; color: var(--navy); opacity: .8; }
.sbh .sbac-tick { color: #2E9E5B; }
.sbh .sbac-orders a { color: var(--navy); font-weight: 700; font-size: 15px; }
.sbh .sbac-out { min-height: 48px; border-radius: 999px; border: 2.5px solid var(--navy); background: transparent; color: var(--navy); font: 700 16px/1 Sora, system-ui, sans-serif; }
.sbh .sbac-out:hover { border-color: var(--orange); color: var(--orange-ink); }

/* ---------- menu sheet (from the left; mirror of the cart sheet from the right) ---------- */
.sb-menu { position: fixed; inset: 0; z-index: 99990; visibility: hidden; pointer-events: none; font-family: Sora, system-ui, sans-serif; color: var(--navy); }
.sb-menu[data-state="open"] { visibility: visible; pointer-events: auto; }
.sb-menu:not([data-state="open"]) { transition: visibility 0s linear .32s; }
/* display: block because the theme hides div:empty (harness §4: tap outside did nothing). */
/* Two classes, so Dawn's `div:empty { display: none }` (one element + one pseudo-class) cannot hide it:
   with one class it did, and the menu opened with no dim and nothing to tap beside it. */
.sb-menu .sb-menu__backdrop { display: block; position: absolute; inset: 0; background: rgba(23, 63, 121, .42); opacity: 0; transition: opacity .3s ease; touch-action: none; -webkit-tap-highlight-color: transparent; }
.sb-menu[data-state="open"] .sb-menu__backdrop { opacity: 1; }
.sb-menu__panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% - 34px); max-width: 400px;
  display: flex; flex-direction: column; background: var(--cream); border-radius: 0 28px 28px 0; overflow: hidden;
  transform: translateX(-104%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
/* No shadow while closed: the waiting panel's shadow drew a grey fade along the edge (harness §4). */
.sb-menu[data-state="open"] .sb-menu__panel { transform: translateX(0); box-shadow: 24px 0 60px -30px rgba(23, 63, 121, .6); }

.sb-menu__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 4px 20px; min-height: 64px; }
.sb-menu__logo { display: grid; place-items: center start; min-height: 44px; line-height: 0; border-radius: 10px; }
.sb-menu__logo img { display: block; width: 112px; height: auto; }

.sb-menu__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 20px 18px; }
.sb-menu__eyebrow { margin: 4px 0 10px; font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-ink); }

.sb-menu__buds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sb-menu__bud {
  display: grid; justify-items: center; gap: 8px; padding: 20px 4px 10px; border-radius: 22px; background: #fff;
  border: 2.5px solid var(--line); color: var(--navy); text-decoration: none; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 8px 18px -16px rgba(23, 63, 121, .6); transition: transform .25s var(--pop), border-color .2s ease;
}
.sb-menu__bud:hover { border-color: var(--yellow); transform: translateY(-2px); }
.sb-menu__bud:active { transform: scale(.96); }
/* The bud sits on the bottom of its colour circle and its head pops out of the top. Positioned, so
   it never pushes into the name; max-width: none, or the theme squeezes it to the circle's width. */
.sb-menu__bud-pic { position: relative; display: block; width: 64px; height: 64px; border-radius: 50%; background: var(--c); }
.sb-menu__bud-pic img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: block; width: auto; max-width: none; height: 80px; filter: drop-shadow(0 6px 6px rgba(23, 63, 121, .18)); }
.sb-menu__bud-name { font-weight: 800; font-size: 17px; line-height: 1.1; }

.sb-menu__links { list-style: none; margin: 14px 0 0; padding: 0; }
.sb-menu__link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 4px 2px;
  border-bottom: 2px solid var(--line); color: var(--navy); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.01em;
  -webkit-tap-highlight-color: transparent;
}
.sb-menu__links li:last-child .sb-menu__link { border-bottom: 0; }
.sb-menu__link svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: .45; transition: transform .2s ease, opacity .2s ease; }
.sb-menu__link:hover { color: var(--orange-ink); }
.sb-menu__link:hover svg { transform: translateX(3px); opacity: 1; }
.sb-menu__link:active { color: var(--orange-ink); }
.sb-menu__link[aria-current="page"] { color: var(--orange-ink); }
.sb-menu__link[aria-current="page"] svg { opacity: 1; }

/* Trustpilot and the socials share one row (they wrap under each other on the narrowest phones). */
.sb-menu__proof { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.sb-menu__tp { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 16px 6px 10px; border-radius: 999px; background: #fff;
  color: var(--navy); text-decoration: none; font-size: 16px; box-shadow: 0 8px 18px -14px rgba(23, 63, 121, .5); }
.sb-menu__tp .pdp-tp span.is-off { background: #DCDCE6; }

.sb-menu__social { display: flex; gap: 10px; }
.sb-menu__social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); color: var(--navy); transition: transform .25s var(--pop); }
.sb-menu__social a:hover { transform: translateY(-3px) rotate(-6deg); }
.sb-menu__social svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sb-menu__social svg .dot { fill: currentColor; stroke: none; }
.sb-menu__social:empty { display: none; }

/* The one action, pinned in the thumb zone. While more links wait under it, it casts a soft
   shadow up the list (skybuds-chrome.js sets data-more), so the list reads as scrollable.
   The bottom padding is the top one plus the button's 5px ledge: the eye measures to the ledge. */
.sb-menu__foot { flex: none; padding: 14px 20px calc(19px + env(safe-area-inset-bottom, 0px)); border-top: 2px solid var(--line); background: var(--cream); transition: box-shadow .2s ease; }
.sb-menu[data-more] .sb-menu__foot { box-shadow: 0 -14px 22px -18px rgba(23, 63, 121, .45); }
.sb-menu__cta.pdp-btn { display: flex; width: 100%; min-height: 60px; padding: 0 20px; font-size: 20px; }

/* Short phones (iPhone SE with Safari's bars): a tighter sheet so the links need less scrolling. */
@media (max-height: 700px) {
  .sb-menu__top { min-height: 56px; padding-top: 6px; }
  .sb-menu__bud { padding: 14px 4px 8px; }
  .sb-menu__bud-pic { width: 54px; height: 54px; }
  .sb-menu__bud-pic img { height: 68px; }
  .sb-menu__link { min-height: 46px; font-size: 19px; }
  .sb-menu__foot { padding-top: 10px; padding-bottom: calc(15px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 350px) {
  .sb-menu__scroll { padding-inline: 16px; }
  .sb-menu__buds { gap: 8px; }
  .sb-menu__bud-name { font-size: 15px; }
  .sb-menu__link { font-size: 18px; }
}
@media (min-width: 768px) {
  .sbh__bar { padding: 12px 24px; min-height: 72px; }
  .sbh__logo-img { width: 140px; }
}

/* The page stays put under an open menu. */
html.sb-menu-locked, html.sb-menu-locked body { overflow: hidden !important; }

@media (prefers-reduced-motion: reduce) {
  .skybuds-kit-header, .sb-menu__panel, .sb-menu__backdrop, .sb-menu__bud, .sb-menu__social a { transition: none; }
}
