/* ═══════════════════════════════════════════════════════════════
   SkyBuds Cart Drawer — quiz-result only
   Visual language matches /pages/quiz-result (skybuds-quiz-result.css).
   Desktop: slides from right, 420px wide, dim backdrop.
   Mobile: slides from bottom, full screen, 100dvh.
   ═══════════════════════════════════════════════════════════════ */

.sb-drawer {
  /* Tokens mirror skybuds-quiz-result.css */
  --sb-cream: #FFFFFF;
  --sb-cream-deep: #F8F8F8;
  --sb-cream-shadow: #F0F0F0;
  --sb-cream-warm: #FAFAFA;
  --sb-cream-peach: #FFF5F2;
  --sb-ink: #2D1F15;
  --sb-ink-soft: #5A4634;
  --sb-ink-faint: #8A7866;
  --sb-ink-ghost: #B8A994;
  --sb-line: #D4CABA;
  --sb-line-soft: #E4DBCC;
  --sb-accent: #FF6B4A;
  --sb-accent-deep: #E55A3A;
  --sb-accent-soft: #FFD9CB;
  --sb-accent-wash: #FFEDE4;
  --sb-cta: #FF6B4A;
  --sb-cta-deep: #E55A3A;
  --sb-shadow-card: 0 8px 24px rgba(60, 40, 20, 0.08);
  --sb-shadow-cta: 0 10px 24px rgba(255, 107, 74, 0.32), inset 0 1px 0 rgba(255,255,255,0.2);
  --sb-shadow-panel: -16px 0 60px rgba(60, 40, 20, 0.18);
  --sb-r-sm: 10px;
  --sb-r-md: 16px;
  --sb-r-lg: 22px;
  --sb-r-pill: 999px;
  --sb-ff: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;

  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  font-family: var(--sb-ff);
  color: var(--sb-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sb-drawer[data-state="open"] { pointer-events: auto; }
.sb-drawer[data-state="closed"] .sb-drawer__backdrop { opacity: 0; pointer-events: none; }
.sb-drawer[data-state="closed"] .sb-drawer__panel { transform: translateX(100%); }

@media (max-width: 767px) {
  .sb-drawer[data-state="closed"] .sb-drawer__panel { transform: translateY(100%); }
}

/* ─── BACKDROP ─── */
.sb-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 31, 21, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 1;
  transition: opacity .28s ease;
  cursor: pointer;
}

/* ─── PANEL ─── */
.sb-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 420px;
  background: var(--sb-cream);
  box-shadow: var(--sb-shadow-panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(0);
  transition: transform .35s cubic-bezier(0.32, 0.72, 0.24, 1);
  will-change: transform;
}

@media (max-width: 767px) {
  .sb-drawer__panel {
    max-width: 100%;
    top: auto;
    bottom: 0;
    border-radius: 22px 22px 0 0;
    transform: translateY(0);
    transition: transform .38s cubic-bezier(0.32, 0.72, 0.24, 1);
  }
}

/* ─── HEADER ─── */
.sb-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--sb-line-soft);
  background: var(--sb-cream);
  flex: none;
}

.sb-drawer__heading-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.sb-drawer__heading {
  font-family: var(--sb-ff);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--sb-ink);
  margin: 0;
}

.sb-drawer__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sb-accent-deep);
  padding: 5px 10px;
  border-radius: var(--sb-r-pill);
  background: var(--sb-accent-wash);
}

.sb-drawer__badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sb-accent);
}

.sb-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sb-cream-shadow);
  color: var(--sb-ink-soft);
  cursor: pointer;
  border: none;
  flex: none;
  transition: background .18s ease;
}

.sb-drawer__close:hover { background: var(--sb-line-soft); }

/* ─── FREE-SHIPPING PROGRESS BAR (2026-07-09 offer) ───
   Static element between header and [data-body] in BOTH custom drawers.
   Lives outside the rebuild zone so the width transition animates. */
.sb-shipbar {
  padding: 12px 22px 14px;
  background: var(--sb-cream);
  border-bottom: 1px solid var(--sb-line-soft);
}

.sb-shipbar__text {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sb-ink-soft);
}

.sb-shipbar--unlocked .sb-shipbar__text {
  color: #3E7C3E;
}

.sb-shipbar__track {
  height: 6px;
  border-radius: var(--sb-r-pill);
  background: var(--sb-cream-shadow);
  overflow: hidden;
}

.sb-shipbar__track .sb-shipbar__fill {
  /* display:block beats Dawn base.css's `div:empty { display: none }` reset,
     which otherwise hides this intentionally-empty fill element. */
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--sb-r-pill);
  background: var(--sb-accent);
  transition: width .45s cubic-bezier(0.22, 1, 0.36, 1), background-color .3s ease;
}

.sb-shipbar--unlocked .sb-shipbar__fill {
  background: #7DD87D;
}

.sb-shipbar__nudge {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--sb-ink-faint);
}

/* ─── BODY (scrollable) ─── */
.sb-drawer__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--sb-cream-warm);
}

/* ─── SKYBUDS+ 6-MONTH PASS TOGGLE (2026-07-09 offer) ───
   The hero upsell. Sits above Shipping Protection in BOTH custom drawers,
   deliberately richer than the protection checkbox. The (?) opens an
   in-flow expanding panel (no absolute positioning, so the drawer's
   scroll container never clips it). */
.sb-pass {
  position: relative;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--sb-accent-wash) 0%, var(--sb-cream) 55%);
  border: 1.5px solid var(--sb-accent-soft);
  border-radius: var(--sb-r-md);
  box-shadow: var(--sb-shadow-card);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.sb-pass--on {
  border-color: var(--sb-accent);
  box-shadow: 0 8px 24px rgba(255, 107, 74, 0.18);
}

.sb-pass__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.sb-pass__title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--sb-ink);
}

.sb-pass__pricing {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: none;
}

.sb-pass__price {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--sb-ink);
}

.sb-pass__strike {
  font-size: 12px;
  color: var(--sb-ink-ghost);
  text-decoration: line-through;
}

.sb-pass__sub {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--sb-ink-soft);
}

.sb-pass__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.sb-pass__note {
  font-size: 11.5px;
  color: var(--sb-ink-faint);
}

.sb-pass__controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.sb-pass__info {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--sb-line);
  background: var(--sb-cream);
  color: var(--sb-ink-faint);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sb-pass__info:hover,
.sb-pass__info[aria-expanded="true"] {
  border-color: var(--sb-accent);
  color: var(--sb-accent);
}

.sb-pass__switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: none;
  cursor: pointer;
}

.sb-pass__switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.sb-pass__slider {
  position: absolute;
  inset: 0;
  border-radius: var(--sb-r-pill);
  background: var(--sb-line-soft);
  transition: background .2s ease;
  pointer-events: none;
}

.sb-pass__slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sb-cream);
  box-shadow: 0 1px 3px rgba(60, 40, 20, 0.25);
  transition: transform .2s ease;
}

.sb-pass__switch input:checked + .sb-pass__slider {
  background: var(--sb-accent);
}

.sb-pass__switch input:checked + .sb-pass__slider::before {
  transform: translateX(20px);
}

.sb-pass__switch input:focus-visible + .sb-pass__slider {
  outline: 2px solid var(--sb-accent);
  outline-offset: 2px;
}

.sb-pass__popover {
  margin-top: 12px;
  padding: 12px 34px 12px 12px;
  position: relative;
  background: var(--sb-cream);
  border: 1px solid var(--sb-line-soft);
  border-radius: var(--sb-r-sm);
}

.sb-pass__popover p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--sb-ink-soft);
}

.sb-pass__popover p:last-child { margin-bottom: 0; }

.sb-pass__popover-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: var(--sb-cream-shadow);
  color: var(--sb-ink-soft);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

/* ─── LINE ITEM CARD ─── */
.sb-line {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--sb-cream);
  border: 1px solid var(--sb-line-soft);
  border-radius: var(--sb-r-md);
  box-shadow: var(--sb-shadow-card);
}

.sb-line__media {
  width: 80px;
  height: 80px;
  flex: none;
  border-radius: var(--sb-r-sm);
  overflow: hidden;
  background: var(--sb-cream-peach);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-line__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sb-line__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.sb-line__name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--sb-ink);
  margin: 0;
}

.sb-line__pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.sb-line__price {
  font-size: 16px;
  font-weight: 700;
  color: var(--sb-ink);
}

.sb-line__strike {
  font-size: 13px;
  color: var(--sb-ink-faint);
  text-decoration: line-through;
  font-weight: 500;
}

.sb-line__save {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--sb-accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sb-line__meta {
  font-size: 12.5px;
  color: var(--sb-ink-soft);
  margin-top: 2px;
}

.sb-line__qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-top: 10px;
  background: var(--sb-cream-shadow);
  border-radius: var(--sb-r-pill);
  padding: 2px;
  align-self: flex-start;
}

.sb-line__qty-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 600;
  color: var(--sb-ink-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}

.sb-line__qty-btn:hover:not(:disabled) { background: var(--sb-cream); }
.sb-line__qty-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.sb-line__qty-val {
  min-width: 26px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--sb-ink);
}

/* Free bonus variant — compact single-row layout so the whole cart
   fits a phone viewport without scrolling. Icon | title (flex-fill) |
   FREE $89 (right-aligned, all inline). */
.sb-line--bonus {
  background: linear-gradient(135deg, var(--sb-cream-peach) 0%, var(--sb-cream) 100%);
  border: 1px solid var(--sb-accent-soft);
  padding: 10px 12px;
  gap: 12px;
  align-items: center;
}

.sb-line--bonus .sb-line__media {
  width: 44px;
  height: 44px;
  border-radius: var(--sb-r-sm);
}

.sb-line--bonus .sb-line__body {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.sb-line--bonus .sb-line__name {
  font-size: 13.5px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.sb-line--bonus .sb-line__pricing {
  flex: none;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.sb-line--bonus .sb-line__free {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sb-accent-deep);
  padding: 4px 8px;
  border-radius: var(--sb-r-pill);
  background: rgba(255, 255, 255, 0.65);
}

.sb-line--bonus .sb-line__strike {
  font-size: 11.5px;
}

/* ─── SECTION HEADER (e.g. "Most families end up with 2") ─── */
.sb-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sb-section__head { margin: 8px 0 0; }
.sb-section__title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--sb-ink);
  margin: 0;
  letter-spacing: -0.005em;
}

.sb-section__sub {
  font-size: 12.5px;
  color: var(--sb-ink-soft);
  margin-top: 2px;
}

/* ─── SIBLING UPSELL CARDS ─── */
.sb-siblings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.sb-sibling {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--sb-cream);
  border: 1px solid var(--sb-line-soft);
  border-radius: var(--sb-r-md);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color .15s ease, transform .12s ease, box-shadow .2s ease;
  font: inherit;
}

.sb-sibling:hover {
  border-color: var(--sb-accent-soft);
  transform: translateY(-1px);
  box-shadow: var(--sb-shadow-card);
}

.sb-sibling__media {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--sb-r-sm);
  overflow: hidden;
  background: var(--sb-cream-peach);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-sibling__media img { width: 100%; height: 100%; object-fit: contain; }

.sb-sibling__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sb-sibling__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--sb-ink);
}

.sb-sibling__price {
  font-size: 12.5px;
  color: var(--sb-ink-soft);
}

.sb-sibling__price-strong { color: var(--sb-accent-deep); font-weight: 700; }

.sb-sibling__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sb-accent);
  color: white;
  font-weight: 700;
  font-size: 18px;
  flex: none;
  box-shadow: 0 4px 10px rgba(255, 107, 74, 0.32);
}

/* ─── SHIPPING PROTECTION TOGGLE ─── */
/* Keep the optional charge readable in one line; details never toggle it. */
.sb-protect {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 8px;
  padding: 8px 10px;
  background: var(--sb-cream);
  border: 1px solid var(--sb-line-soft);
  border-radius: var(--sb-r-sm);
}
.sb-protect__choice { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.sb-protect input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--sb-line);
  border-radius: 5px;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: var(--sb-cream);
  transition: background .15s ease, border-color .15s ease;
}
.sb-protect input[type="checkbox"]:checked { background: var(--sb-accent); border-color: var(--sb-accent); }
.sb-protect input[type="checkbox"]:checked::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.sb-protect__title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--sb-ink);
  white-space: nowrap;
}
.sb-protect__price { margin-left: auto; font-size: 13px; color: var(--sb-ink-soft); font-weight: 600; }
.sb-protect__details { display: contents; }
.sb-protect__details > summary {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  list-style: none;
  cursor: pointer;
  border-radius: 50%;
  color: var(--sb-ink-faint);
}
.sb-protect__details > summary::-webkit-details-marker { display: none; }
.sb-protect__details > summary > span { display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; line-height: 1; }
.sb-protect__details > summary:focus-visible,
.sb-protect input:focus-visible { outline: 2px solid var(--sb-accent-deep); outline-offset: 3px; }
.sb-protect__sub { grid-column: 1 / -1; margin: 4px 0 0 26px; font-size: 12px; line-height: 1.5; color: var(--sb-ink-faint); }
.sb-protect__details:not([open]) > .sb-protect__sub { display: none; }

/* ─── SUMMARY ─── */
.sb-summary {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 16px;
  background: var(--sb-cream);
  border: 1px solid var(--sb-line-soft);
  border-radius: var(--sb-r-md);
}

.sb-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13.5px;
  color: var(--sb-ink-soft);
}

.sb-summary__row--save { color: var(--sb-accent-deep); font-weight: 600; }
.sb-summary__row--free { color: var(--sb-ink-soft); }
.sb-summary__row strong { color: var(--sb-ink); font-weight: 600; }

.sb-summary__divider {
  height: 1px;
  background: var(--sb-line-soft);
  margin: 4px 0;
}

.sb-summary__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 16px;
  font-weight: 800;
  color: var(--sb-ink);
  letter-spacing: -0.01em;
}

/* ─── TRUST PILLS ─── */
.sb-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.sb-trust__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--sb-line-soft);
  border-radius: var(--sb-r-pill);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sb-ink-soft);
  white-space: nowrap;
}

.sb-trust__pill svg {
  width: 12px;
  height: 12px;
  color: var(--sb-accent);
}

/* ─── FOOTER (CTA) ─── */
.sb-drawer__footer {
  padding: 14px 22px calc(16px + env(safe-area-inset-bottom));
  background: var(--sb-cream);
  border-top: 1px solid var(--sb-line-soft);
  flex: none;
}

.sb-drawer__footer[hidden] { display: none; }

.sb-checkout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--sb-cta);
  color: white;
  padding: 17px 24px;
  border-radius: var(--sb-r-pill);
  font-family: var(--sb-ff);
  font-weight: 800;
  font-size: 15.5px;
  border: none;
  cursor: pointer;
  box-shadow: var(--sb-shadow-cta);
  transition: transform .15s ease, box-shadow .2s ease;
  letter-spacing: 0.01em;
}

.sb-checkout-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(255, 107, 74, 0.42), inset 0 1px 0 rgba(255,255,255,0.2);
}

.sb-checkout-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.sb-checkout-btn__total {
  opacity: 1;
  font-weight: 800;
  font-size: 15px;
}

.sb-checkout-btn__sep { opacity: 0.7; font-weight: 800; padding: 0 2px; }

/* ─── WALLET BUTTONS (split test wallet-cart-2026-07-50-50) ───
   Hidden for everyone by default. skybuds-wallet-test.js adds .sb-wallets-on
   to <html> synchronously in <head> for the treatment arm, so the control arm
   never renders a frame containing these. Do NOT flip this to display:block
   with a JS-added class on the drawer itself: this stylesheet is not the only
   thing that has to agree, and a late class swap would flash the buttons. */
.sb-drawer__wallets {
  display: none;
  margin-top: 12px;
}

.sb-wallets-on .sb-drawer__wallets {
  display: block;
}

/* Cart mutations (pass / shipping-protection toggles) sync in the background.
   The orange CTA waits for that queue; wallet buttons check out the server
   cart instantly, so they get blocked instead of racing it. */
.sb-drawer__wallets--busy {
  pointer-events: none;
  opacity: 0.45;
}

/* Sibling-discount safety gate: on 2+ bud carts the drawer promises a saving
   that only the orange CTA can apply (it appends ?discount=SIBLING10). Hiding
   rather than dimming, because a visible-but-dead wallet button is worse than
   no wallet button. Goes away once the discount is automatic in Admin. */
.sb-drawer__wallets--blocked {
  display: none !important;
}

.sb-drawer__wallets-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--sb-ink-soft, #6b6560);
  font-family: var(--sb-ff);
  font-size: 12.5px;
  font-weight: 600;
}

.sb-drawer__wallets-label::before,
.sb-drawer__wallets-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--sb-line-soft);
}

/* Shopify renders the buttons inside <shopify-accelerated-checkout-cart>,
   which owns its own shadow DOM. Only layout is ours to set: never try to
   restyle the button faces. Shop Pay purple and Apple Pay black are the whole
   reason these lift conversion, and a repainted wallet button reads as fake. */
.sb-drawer__wallets-buttons {
  min-height: 48px;
}

.sb-drawer__wallets-buttons [data-shopify-buttoncontainer] {
  justify-content: stretch;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

/* ─── EMPTY STATE ─── */
.sb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 20px;
  text-align: center;
}

.sb-empty__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--sb-ink);
}

.sb-empty__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  background: var(--sb-accent);
  color: white;
  border-radius: var(--sb-r-pill);
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

/* ─── LOADING SPINNER ─── */
.sb-drawer__loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2;
}

.sb-drawer[data-loading="true"] .sb-drawer__loading { display: flex; }

.sb-drawer__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--sb-cream-shadow);
  border-top-color: var(--sb-accent);
  border-radius: 50%;
  animation: sb-spin 0.7s linear infinite;
}

@keyframes sb-spin { to { transform: rotate(360deg); } }

/* ─── ENTRANCE ANIMATION (line items fade in) ─── */
.sb-line, .sb-sibling, .sb-protect, .sb-summary, .sb-trust {
  animation: sb-fadeup .35s ease;
  animation-fill-mode: both;
}

.sb-line { animation-delay: .02s; }
.sb-section { animation: sb-fadeup .35s ease both; animation-delay: .08s; }
.sb-protect { animation-delay: .14s; }
.sb-summary { animation-delay: .18s; }
.sb-trust { animation-delay: .22s; }

@keyframes sb-fadeup {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── BODY SCROLL LOCK ─── */
body.sb-drawer-locked {
  overflow: hidden !important;
  position: relative;
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  .sb-drawer__panel,
  .sb-drawer__backdrop,
  .sb-line, .sb-sibling, .sb-protect, .sb-summary, .sb-trust, .sb-section,
  .sb-checkout-btn, .sb-sibling, .sb-line__qty-btn, .sb-drawer__close {
    animation: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Specificity overrides
   ───────────────────────────────────────────────────────────────
   skybuds-quiz-result.css contains a global reset:
     .rp-page button { background: none; border: none; color: inherit; }
   Its (0,1,1) specificity beats our single-class rules at (0,1,0).
   The page <body> has class "rp-page", so the drawer (rendered inside
   that body) inherits the reset and our coral CTA loses its color.

   Re-asserting with .sb-drawer.X selectors lifts us to (0,2,0), which
   beats (0,1,1). Keep this block last so cascade order is also clear.
   ═══════════════════════════════════════════════════════════════ */
.sb-drawer .sb-drawer__close {
  background: var(--sb-cream-shadow);
  color: var(--sb-ink-soft);
  border: none;
}
.sb-drawer .sb-drawer__close:hover { background: var(--sb-line-soft); }

.sb-drawer .sb-checkout-btn {
  background: var(--sb-cta);
  color: white;
  border: none;
  box-shadow: var(--sb-shadow-cta);
}
.sb-drawer .sb-checkout-btn:hover:not(:disabled) {
  background: var(--sb-cta);
  color: white;
  box-shadow: 0 14px 30px rgba(255, 107, 74, 0.42), inset 0 1px 0 rgba(255,255,255,0.2);
}
.sb-drawer .sb-checkout-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.sb-drawer .sb-sibling {
  background: var(--sb-cream);
  color: var(--sb-ink);
  border: 1px solid var(--sb-line-soft);
}
.sb-drawer .sb-sibling:hover { border-color: var(--sb-accent-soft); }

.sb-drawer .sb-line__qty-btn {
  background: transparent;
  color: var(--sb-ink-soft);
  border: none;
}
.sb-drawer .sb-line__qty-btn:hover:not(:disabled) { background: var(--sb-cream); }

.sb-drawer .sb-empty__btn {
  background: var(--sb-accent);
  color: white;
  border: none;
}

/* ═══════════════════════════════════════════════════════════════
   Savings treatment — "You save $X" pill on the line item and
   prominent total-savings row in the summary.
   ═══════════════════════════════════════════════════════════════ */
.sb-line__save-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sb-accent-deep);
  background: var(--sb-accent-wash);
  padding: 3px 8px;
  border-radius: var(--sb-r-pill);
}

.sb-summary__row--savings {
  font-size: 14px;
  font-weight: 700;
  color: var(--sb-accent-deep);
  background: var(--sb-accent-wash);
  padding: 8px 12px;
  margin: 4px -4px;
  border-radius: var(--sb-r-sm);
}

.sb-summary__row--savings span:last-child { font-weight: 800; }

/* ═══════════════════════════════════════════════════════════════
   Line item: name + remove button row, 10%-off styling for siblings
   ═══════════════════════════════════════════════════════════════ */
.sb-line__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.sb-drawer .sb-line__remove {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--sb-ink-faint);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  flex: none;
  margin-top: -2px;
  transition: background .15s ease, color .15s ease;
}
.sb-drawer .sb-line__remove:hover {
  background: var(--sb-cream-shadow);
  color: var(--sb-accent-deep);
}
.sb-drawer .sb-line__remove svg { display: block; }

/* ═══════════════════════════════════════════════════════════════
   PRODUCT LINE — qty stepper inline at right, price+strike+pill
   collapse onto one row (above qty).
   ═══════════════════════════════════════════════════════════════ */
.sb-line:not(.sb-line--bonus) .sb-line__body {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 10px;
  row-gap: 3px;
  align-items: center;
}
.sb-line:not(.sb-line--bonus) .sb-line__body > * {
  grid-column: 1 / -1;
}
.sb-line:not(.sb-line--bonus) .sb-line__body > .sb-line__pricing {
  grid-column: 1;
  grid-row: 2;
  align-items: center;
  row-gap: 4px;
}
.sb-line:not(.sb-line--bonus) .sb-line__body > .sb-line__qty {
  grid-column: 2;
  grid-row: 2;
  margin-top: 0;
  align-self: center;
}
.sb-line__pricing .sb-line__save-pill {
  margin-left: 2px;
}

/* Guarantee note under the trust pills (2026-08-29) */
.sb-trust__note {
  flex-basis: 100%;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 6px;
  font-size: 12px; font-weight: 500; color: #6b6259; text-align: center;
}
.sb-trust__note svg { width: 13px; height: 13px; color: #2E9B57; flex-shrink: 0; }

/* Provider-owned installment terms: optional, never a checkout loading state. */
.sb-payment-message { margin-block: var(--th-space-sm, 8px); }
.sb-payment-message[hidden] { display: none !important; }
.sb-payment-message[data-loading="true"] { visibility: hidden; height: 0; margin: 0; overflow: hidden; }

/* Original cart refinement: equal circular controls and less empty row space. */
#sb-pdp-drawer .sb-pass__info,
#sb-pdp-drawer .sb-pass__popover-close {
  box-sizing: border-box;
  inline-size: 32px;
  block-size: 32px;
  min-inline-size: 32px;
  max-inline-size: 32px;
  min-block-size: 32px;
  max-block-size: 32px;
  flex: 0 0 32px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
#sb-pdp-drawer .sb-pass__info { position: relative; }
#sb-pdp-drawer .sb-pass__info::after,
#sb-pdp-drawer .sb-pass__popover-close::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
#sb-pdp-drawer .sb-pass__info:focus-visible,
#sb-pdp-drawer .sb-pass__popover-close:focus-visible { outline: 2px solid var(--sb-accent-deep); outline-offset: 3px; }

/* The PDP uses an inert, persistent disclosure. */
#sb-pdp-drawer .sb-pass__popover[data-expanded] {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: none;
  opacity: 0;
  transition: grid-template-rows .26s cubic-bezier(.22, 1, .36, 1), opacity .2s ease;
}
#sb-pdp-drawer .sb-pass__popover[data-expanded="true"] { grid-template-rows: 1fr; opacity: 1; }
#sb-pdp-drawer .sb-pass__popover-inner {
  position: relative;
  min-height: 0;
  overflow: hidden;
  padding: 0 44px 0 12px;
  border-radius: var(--sb-r-sm);
  background: var(--sb-cream);
  box-shadow: inset 0 0 0 1px var(--sb-line-soft);
}
#sb-pdp-drawer .sb-pass__popover-inner > p:first-of-type { padding-top: 12px; }
#sb-pdp-drawer .sb-pass__popover-inner > p:last-child { padding-bottom: 12px; }
#sb-pdp-drawer .sb-pass__popover[data-expanded="false"] { pointer-events: none; }

#sb-pdp-drawer .sb-line:not(.sb-line--bonus) { padding: 10px; gap: 10px; align-items: center; }
#sb-pdp-drawer .sb-line:not(.sb-line--bonus) .sb-line__media { width: 64px; height: 64px; }
#sb-pdp-drawer .sb-line:not(.sb-line--bonus) .sb-line__body { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 2px; }
#sb-pdp-drawer .sb-line:not(.sb-line--bonus) .sb-line__pricing { gap: 4px 6px; min-width: 0; }
#sb-pdp-drawer .sb-line:not(.sb-line--bonus) .sb-line__meta { margin-top: 0; }
#sb-pdp-drawer .sb-line__name { line-height: 1.25; }

#sb-pdp-drawer .sb-cart-trustpilot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--sb-ink-soft);
  font-size: 11px;
  line-height: 1.2;
  text-decoration: none;
}
#sb-pdp-drawer .sb-cart-trustpilot img { display: block; flex: 0 0 82px; width: 82px; height: auto; }
#sb-pdp-drawer .sb-cart-trustpilot span { white-space: nowrap; }
#sb-pdp-drawer .sb-cart-trustpilot strong { color: var(--sb-ink); font-weight: 700; }
#sb-pdp-drawer .sb-cart-trustpilot:hover span { text-decoration: underline; text-underline-offset: 3px; }
#sb-pdp-drawer .sb-cart-trustpilot:focus-visible { outline: 2px solid var(--sb-accent-deep); outline-offset: 4px; }
@media (max-width: 360px) {
  #sb-pdp-drawer .sb-line:not(.sb-line--bonus) .sb-line__media { width: 56px; height: 56px; }
  #sb-pdp-drawer .sb-line:not(.sb-line--bonus) .sb-line__body { column-gap: 6px; }
  #sb-pdp-drawer .sb-line:not(.sb-line--bonus) .sb-line__name { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  #sb-pdp-drawer .sb-pass__popover[data-expanded], #sb-pdp-drawer .sb-pass__popover-inner { transition: none; }
}

/* Keep the visible row controls compact without shrinking their touch area. */
#sb-pdp-drawer .sb-line__remove {
  position: relative;
  box-sizing: border-box;
  min-width: 26px;
  max-width: 26px;
  min-height: 26px;
  max-height: 26px;
  padding: 0;
}
#sb-pdp-drawer .sb-line__remove::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
#sb-pdp-drawer .sb-line__qty-btn {
  position: relative;
  box-sizing: border-box;
  min-width: 30px;
  max-width: 30px;
  min-height: 30px;
  max-height: 30px;
  padding: 0;
  flex: 0 0 30px;
}
#sb-pdp-drawer .sb-line__qty-btn::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; }

/* Quiz drawer: circular 44px controls and the same persistent disclosure. */
#skybuds-cart-drawer .sb-pass__info,
#skybuds-cart-drawer .sb-pass__popover-close {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
  min-height: 44px;
  max-height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
#skybuds-cart-drawer .sb-pass__info:focus-visible,
#skybuds-cart-drawer .sb-pass__popover-close:focus-visible { outline: 2px solid var(--sb-accent-deep); outline-offset: 3px; }
/* Keep the visible circles above the quiz page's button reset. */
#skybuds-cart-drawer .sb-pass__info {
  border: 1.5px solid var(--sb-line);
  background: var(--sb-cream);
  color: var(--sb-ink-faint);
  font-size: 12px;
  font-weight: 700;
}
#skybuds-cart-drawer .sb-pass__info:hover,
#skybuds-cart-drawer .sb-pass__info[aria-expanded="true"] {
  border-color: var(--sb-accent);
  color: var(--sb-accent);
}
#skybuds-cart-drawer .sb-pass__popover-close {
  border: 1px solid var(--sb-line);
  background: var(--sb-cream-shadow);
  color: var(--sb-ink-soft);
  font-size: 15px;
}
#skybuds-cart-drawer .sb-pass__popover[data-expanded] {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: none;
  opacity: 0;
  transition: grid-template-rows .26s cubic-bezier(.22, 1, .36, 1), opacity .2s ease;
}
#skybuds-cart-drawer .sb-pass__popover[data-expanded="true"] { grid-template-rows: 1fr; opacity: 1; }
#skybuds-cart-drawer .sb-pass__popover-inner {
  position: relative;
  min-height: 0;
  overflow: hidden;
  padding: 0 56px 0 12px;
  border-radius: var(--sb-r-sm);
  background: var(--sb-cream);
  box-shadow: inset 0 0 0 1px var(--sb-line-soft);
}
#skybuds-cart-drawer .sb-pass__popover-inner > p:first-of-type { padding-top: 12px; }
#skybuds-cart-drawer .sb-pass__popover-inner > p:last-child { padding-bottom: 12px; }
#skybuds-cart-drawer .sb-pass__popover[data-expanded="false"] { pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  #skybuds-cart-drawer .sb-pass__popover[data-expanded] { transition: none; }
}

/* Preserve a visible acknowledgement until the destination page takes over. */
:is(#sb-pdp-drawer, skybuds-cart-drawer) .sb-checkout-btn[aria-busy="true"], #add-to-cart-btn[aria-busy="true"] { cursor: progress; }
:is(#sb-pdp-drawer, skybuds-cart-drawer) .sb-checkout-btn[aria-busy="true"] .sb-checkout-btn__sep,
:is(#sb-pdp-drawer, skybuds-cart-drawer) .sb-checkout-btn[aria-busy="true"] .sb-checkout-btn__total { display: none; }
:is(#sb-pdp-drawer, skybuds-cart-drawer) .sb-checkout-btn[aria-busy="true"]::after, #add-to-cart-btn[aria-busy="true"]::after {
  content: ''; inline-size: 1em; block-size: 1em; flex: 0 0 1em;
  border: 0.12em solid currentColor; border-inline-end-color: transparent;
  border-radius: 50%; animation: sb-cart-busy-spin 0.8s linear infinite;
}
#add-to-cart-btn[aria-busy="true"] .hero-reserve-card__cta-arrow { display: none; }
@keyframes sb-cart-busy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  :is(#sb-pdp-drawer, skybuds-cart-drawer) .sb-checkout-btn[aria-busy="true"]::after, #add-to-cart-btn[aria-busy="true"]::after { animation: none; }
}
