@layer sdpb-compat, sdpb-module;
@layer sdpb-module{
/* The Add-on products block (views/templates/sections/sd_addonproducts_glue__addons.tpl), served by the shop on the pages
   showing it (src/Blocks/Addons.php storefrontAssets()). Plain CSS: the storefront app puts every rule under this
   module's class and in a cascade layer below the site's own rules, so a site's CSS for the Buy Box's rows and panels
   (the same class names) restyles these too. Only the layout every site needs is here: the row like the Buy Box's option
   rows, the panel a side drawer at the right with its head, its list and its foot (the Close button), the cards, the
   "continue without?" dialog. Colours from the page builder's tokens. */

.sdap-addons { display: flex; flex-direction: column; width: 100%; text-align: left; }
.sdap-addons *, .sdap-addons *::before, .sdap-addons *::after { box-sizing: border-box; }
.sdap-addons [hidden] { display: none; }

/* A row: picture-less like the Buy Box's option rows; the line is the add-on picked, else the note. */
.sdap-row .sdpb-buy__row { display: flex; align-items: center; gap: 16px; width: 100%; padding: 14px 0; border: 0;
  border-bottom: 1px solid var(--sdpb-color-line, #e5e7eb); background: transparent; color: var(--sdpb-color-ink, #111827);
  font: inherit; text-align: left; cursor: pointer; }
.sdap-row .sdpb-buy__row-icon { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 48px; height: 48px; }
.sdap-row .sdpb-buy__row-icon:empty { display: none; }
.sdap-row__text { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.sdap-row .sdpb-buy__row-label { font-size: 13px; line-height: 1.25; }
.sdap-row .sdpb-buy__row-value { font-size: 17px; font-weight: 700; line-height: 1.25; }
.sdap-row .sdpb-buy__row-caret { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 28px; height: 28px; }
.sdap-row .sdpb-buy__row-caret svg { width: 20px; height: 20px; }
.sdap-error { margin: 0; padding: 4px 0; color: #b3261e; font-size: 13px; }

/* The panel: a side drawer at the right, the page darkened behind it. */
.sdap-panel { position: fixed; inset: 0 0 0 auto; width: min(563px, 100vw); max-width: none; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0; background: #fff; color: var(--sdpb-color-ink, #111827);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25); }
.sdap-panel[open] { display: flex; flex-direction: column; }
.sdap-panel::backdrop { background: rgba(68, 58, 64, .6); }
.sdap-panel .sdpb-panel__head { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 16px;
  padding: clamp(20px, 3vw, 48px) clamp(20px, 4vw, 62px) 24px; }
.sdap-panel .sdpb-panel__title { margin: 0; font-size: clamp(26px, 2.4vw, 36px); font-weight: 700; line-height: 1.15; }
.sdap-panel .sdpb-panel__close { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 40px; height: 40px;
  padding: 0; border: 0; border-radius: 50%; background: var(--sdpb-color-soft, #f3f4f6); color: inherit; cursor: pointer; }
.sdap-panel .sdpb-panel__close svg { width: 20px; height: 20px; }
.sdap-panel .sdpb-panel__body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 clamp(20px, 4vw, 62px) 32px; }
.sdap-panel .sdpb-panel__values { display: grid; gap: 15px; }

/* The cards: a radio each (out of sight, the card shows it), "none" first. */
.sdap-panel .sdpb-panel__item { position: relative; }
.sdap-panel .sdpb-panel__value { position: relative; display: block; height: 100%; cursor: pointer; }
.sdap-panel .sdap-radio { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.sdap-panel .sdpb-panel__card { display: flex; align-items: stretch; height: 100%; overflow: hidden; border: 1px solid #c9bec6;
  border-radius: 8px; background: #fff; font-size: 13px; line-height: 1.6; }
.sdap-panel .sdap-none .sdpb-panel__card { align-items: center; padding: 16px 18px; font-size: 15px; }
.sdap-panel .sdpb-panel__item .sdpb-panel__card { min-height: 144px; }
.sdap-panel .sdap-radio:checked + .sdpb-panel__card { border-color: var(--sdpb-color-ink, #111827);
  box-shadow: inset 0 0 0 1px var(--sdpb-color-ink, #111827); }
.sdap-panel .sdap-radio:focus-visible + .sdpb-panel__card { outline: 2px solid var(--sdpb-color-accent, #4f46e5); outline-offset: 2px; }
.sdap-panel .sdap-radio[data-unavailable] + .sdpb-panel__card { opacity: .5; }
.sdap-panel .sdap-radio:disabled ~ * { cursor: default; }
.sdap-panel .sdpb-panel__picture { flex-shrink: 0; width: 150px; max-width: 35%; background: var(--sdpb-color-soft, #f3f4f6); }
.sdap-panel .sdpb-panel__picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sdap-card__text { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 14px 48px 14px 18px; }
.sdpb-panel__item:has(.sdpb-panel__info) .sdap-card__text { padding-bottom: 40px; }
.sdap-heading { font-size: 12px; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; }
.sdap-panel .sdpb-panel__item .sdpb-panel__name { font-size: 15px; line-height: 1.27; }
.sdap-panel .sdpb-panel__tag { padding: 2px 10px; border-radius: 999px; background: #e5f1f6; }
.sdap-panel .sdpb-panel__price { margin-top: auto; }
.sdap-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.sdap-regular { opacity: .6; }
.sdap-off { padding: 1px 8px; border-radius: 999px; background: var(--sdpb-color-ink, #443a40); color: #fff; font-size: 12px; font-weight: 700; }
.sdap-panel .sdpb-panel__check { position: absolute; top: 16px; right: 16px; display: none; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--sdpb-color-ink, #111827); color: #fff; pointer-events: none; }
.sdap-panel .sdap-radio:checked ~ .sdpb-panel__check { display: flex; }
.sdap-panel .sdpb-panel__check svg { width: 14px; height: 14px; }
.sdap-panel .sdpb-panel__info { position: absolute; right: 14px; bottom: 14px; color: var(--sdpb-color-ink, #111827); font-size: 13px; text-decoration: underline; }

/* The foot: the panel's Close button. */
.sdap-foot { display: flex; flex-shrink: 0; align-items: center; justify-content: center; min-height: 109px; padding: 0 24px; background: #faf9f5; }
.sdap-done { padding: 14px 40px; border: 0; border-radius: 999px; background: var(--sdpb-color-ink, #111827); color: #fff;
  font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; }

/* "Continue without?": a dialog in the middle of the page. */
.sdap-ask { width: min(520px, calc(100vw - 32px)); margin: auto; padding: 32px; border: 0; border-radius: 12px; background: #fff;
  color: var(--sdpb-color-ink, #111827); text-align: center; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25); }
.sdap-ask::backdrop { background: rgba(68, 58, 64, .6); }
.sdap-ask__text { margin: 0 0 24px; font-size: 20px; font-weight: 700; line-height: 1.375; }
.sdap-ask__buttons { display: flex; flex-direction: column; gap: 12px; }
.sdap-ask__back, .sdap-ask__continue { padding: 12px 24px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; }
.sdap-ask__back { border: 1px solid var(--sdpb-color-ink, #111827); background: #fff; color: var(--sdpb-color-ink, #111827); }
.sdap-ask__continue { border: 0; background: var(--sdpb-color-ink, #111827); color: #fff; }
.sdap-hint { margin: 0; padding: 12px 0; font-size: 13px; opacity: .7; }

@media (min-width: 640px) {
  .sdap-ask__buttons { flex-direction: row; justify-content: center; }
}

}
