/** Globals **/
bundle-builder-cart-box *,
bundle-builder-item-modal * {
  box-sizing: border-box;
}

/** Cart Block **/
bundle-builder-cart-box {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 1px solid var(--bb-border-color);
  margin-top: 20px;
  margin-bottom: 20px;
  font-size: var(--bb-font-size, 100%);
  color: var(--bb-font-color);
  text-align: var(--bb-font-alignment, left);
  background: var(--bb-background, transparent);
  width: 100%;
}

bundle-builder-cart-box [data-bb-selector="bb-bundle-title-cost"] {
  display: flex;
  flex: 1 auto;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 12px;
}

bundle-builder-cart-box [data-bb-selector="bb-title"] {
  flex-grow: 1;
  padding-right: 16px;
  color: var(--bb-font-color);
}

bundle-builder-cart-box [data-bb-selector="bb-title"],
bundle-builder-cart-box [data-bb-selector="bb-price"] {
  font-weight: bold;
  font-size: 110%;
  border: none;
  text-align: left;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  border: 0;
}

bundle-builder-cart-box [data-bb-selector="bb-compare-at-price"] {
  font-weight: bold;
  font-size: 110%;
  border: none;
  text-align: left;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  border: 0;
  text-decoration: line-through;
  opacity: 0.8;
  margin-right: 8px;
}

bundle-builder-cart-box [data-bb-selector="bb-price"] {
  white-space: nowrap;
}

bundle-builder-cart-box [data-bb-selector="bb-view"] {
  cursor: pointer;
  color: var(--bb-button-color);
  background: var(--bb-button-background, transparent);
  align-self: flex-start;
  padding: 0.5rem 1rem;
  border-radius: var(--bb-button-radius);
  border: 1px solid var(--bb-border-color);
}

bundle-builder-cart-box [data-bb-selector="bb-view"]:hover {
  opacity: 0.8;
}

/* Modal */
bundle-builder-item-modal [data-bb-selector="modal-container"] {
  pointer-events: all;
  display: flex;
  position: fixed;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  top: 0px;
  left: 0px;
  /* Max stacking value so the bundle-summary modal sits above the merchant's
     theme cart drawer. "View details" is opened from inside the drawer, and many
     themes give the drawer a very high z-index (>= 99999). This modal is
     body-level (cart-integration block target: "body", injected late in the DOM),
     so the max z-index wins the stack reliably (#5577). */
  z-index: 2147483647;
}
bundle-builder-item-modal [data-bb-selector="underlay"] {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0px;
  background-color: #333;
  opacity: 0;
  transition: opacity 250ms ease-in-out;
  display: block;
}
[data-bb-animate="open"] [data-bb-selector="underlay"] {
 opacity: 0.5;
}
bundle-builder-item-modal [data-bb-selector="modal-inner"] {
  display: flex;
  flex-direction: column;
  width: 95%;
  max-width: 1080px;
  max-height: 85%;
  background: var(--bb-modal-background, #ffffff);
  color: var(--bb-modal-font-color, #000000);
  z-index: 999;
  margin-top: 0;
}
@media only screen and (max-width: 1023px) {
  bundle-builder-item-modal [data-bb-selector="modal-inner"] {
    width: 100%;
    height: 100%;
    min-height: 100%;
    min-width: 100%;
    max-width: 100%;
    max-height: 100%;
    position: fixed;
    top: 0px;
    left: 0px;
  }
  [data-bb-selector="underlay"] {
    display: none;
  }
}
bundle-builder-item-modal [data-bb-selector="modal-header"] {
  display: flex;
  padding: 20px;
  border-bottom: 2px solid var(--bb-modal-border-color, #C4C4C4);
}
bundle-builder-item-modal [data-bb-selector="modal-footer"] {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 20px;
  border-top: 2px solid var(--bb-modal-border-color, #C4C4C4);
}

bundle-builder-item-modal [data-bb-selector="modal-total"] {
  flex-grow: 1;
  font-size: 18px;
  font-weight: bold;
}

bundle-builder-item-modal [data-bb-selector="modal-title"] {
  flex-grow: 1;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: initial;
  border: 0;
  margin: 0;
  padding: 0;
  text-align: left;
  line-height: 1.5;
  color: var(--bb-modal-font-color, #000000);
}
bundle-builder-item-modal [data-bb-selector="modal-content"] {
 flex-grow: 1;
 padding: 20px;
 overflow-x: auto;
 /* opacity: 1; */
 transition: opacity .3s ease;
}

[data-bb-selector="done"],
[data-bb-selector="modal-close-x"],
[data-bb-line-item-card-action] {
  cursor: pointer;
}

[data-bb-selector="modal-close-x"] > svg > path {
  fill: var(--bb-modal-font-color, #000000);
}

bundle-builder-item-modal [data-bb-selector="done"] {
  color: var(--bb-button-color);
  background: var(--bb-button-background, transparent);
  padding: 0.5rem 1rem;
  border-radius: var(--bb-button-radius);
}

bundle-builder-item-modal [data-bb-selector="done"]:hover {
  opacity: 0.8;
}

/* ANIMATE */
[data-bb-animate="open"] [data-bb-selector="modal-inner"] {
  -moz-animation: slideUp 0.5s ease;
  -webkit-animation: slideUp 0.5s ease;
  animation: slideUp 0.5s ease;
  animation-fill-mode: forwards;
}

[data-bb-animate="close"] [data-bb-selector="modal-inner"] {
  -moz-animation: slideDown 0.5s ease;
  -webkit-animation: slideDown 0.5s ease;
  animation: slideDown 0.5s ease;
  animation-fill-mode: forwards;
}

/* slide Anim */

@-webkit-keyframes slideUp {
  from {margin-top: 80vh; opacity: 0;} to { margin-top: 0px; opacity: 1;}
}
@-moz-keyframes slideUp {
  from {margin-top: 80vh; opacity: 0;} to { margin-top: 0px; opacity: 1;}
}
@keyframes slideUp {
  from {margin-top: 80vh; opacity: 0;} to { margin-top: 0px; opacity: 1;}
}

@-webkit-keyframes slideDown {
  from {margin-top: 0; opacity: 1 } to { margin-top: 80vh; opacity: 0 }
}
@-moz-keyframes slideDown {
  from {margin-top: 0; opacity: 1 } to { margin-top: 80vh; opacity: 0 }
}
@keyframes slideDown {
  from {margin-top: 0; opacity: 1 } to { margin-top: 80vh; opacity: 0 }
}

/** Line Item Card **/

bundle-builder-line-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 16px;
  border: 2px solid var(--bb-modal-border-color, #c4c4c4);
  padding-top: 16px;
  border-radius: 4px;
  box-shadow: -4px -4px 12px rgba(0,0,0,0.1);
  transition: opacity 20ms ease;
  background-color: var(--bb-modal-item-background, transparent);
}

bundle-builder-line-card [data-bb-selector="line-item-card-header"] {
  display: flex;
  width: 100%;
}

bundle-builder-line-card [data-bb-selector="line-item-card-details"] {
  display: flex;
  width: 100%;
}

@media only screen and (max-width: 767px) {
  bundle-builder-line-card [data-bb-selector="line-item-card-details"] {
    flex-direction: column;
  }
}

bundle-builder-line-card [data-bb-selector="line-item-card-title"] {
  color: var(--bb-modal-font-color, #000000);
  padding: 0;
  margin: 0;
  border: 0;
  text-align: left;
  letter-spacing: initial;
  font-weight: bold;
}

bundle-builder-line-card [data-bb-selector="line-item-card-title-price"] {
  flex-grow: 1;
  font-size: 18px;
  line-height: 100%;
}

bundle-builder-line-card [data-bb-selector="line-item-card-frequency"] {
  font-size: 14px;
  opacity: 0.8;
  font-weight: normal;
}

bundle-builder-line-card [data-bb-selector="line-item-card-price-wrapper"] {
  margin-top: 8px;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
}

bundle-builder-line-card [data-bb-selector="line-item-card-compare-at-price"] {
  opacity: 0.6;
  text-decoration: line-through;
}

bundle-builder-line-card [data-bb-selector="line-item-card-actions"] {
  display: flex;
  align-self: flex-start;
  flex-wrap: wrap;
}

@media only screen and (max-width: 767px)  {
  bundle-builder-line-card [data-bb-selector="line-item-card-actions"] {
    margin-left: -10px;
  }

}

bundle-builder-line-card [data-bb-line-item-card-action] {
  opacity: 0.8;
  margin-bottom: 8px;
}
bundle-builder-line-card [data-bb-line-item-card-action] span {
  padding-left: 10px;
  padding-right: 10px;
  padding-bottom: 8px;
  padding-top: 8px;
  border-right: 1px solid #ccc;
}

bundle-builder-line-card [data-bb-line-item-card-action]:last-child span {
  border-right: 0px;
}

bundle-builder-line-card [data-bb-selector="line-item-bundle-contents"] {
  padding: 8px;
  background-color: var(--bb-modal-item-content-background, #f1f1f1);
  display: flex;
  flex-wrap: wrap;
}

bundle-builder-line-card [data-bb-selector="line-item-card-thumnail-wrapper"] {
  margin-right: 16px;
  margin-left: 16px;
  margin-bottom: 16px;
}

@media only screen and (max-width: 767px) {
  bundle-builder-line-card [data-bb-selector="line-item-card-thumnail-wrapper"] {
    margin-right: 8px;
    margin-left: 8px;
    margin-bottom: 8px;
  }
}

bundle-builder-line-card [data-bb-selector="line-item-thumbnail"] {
  width: 120px;
  height: auto;
}

bundle-builder-line-card [data-bb-selector="line-item-card-contents"] {
  display: flex;
}

bundle-builder-line-card [data-bb-selector="line-item-card-contents-item"] {
  display: flex;
  /* Column so a personalised product's values (#5570) stack under the
     thumbnail/details row, which keeps its own horizontal layout via
     `line-item-card-contents-item-main`. */
  flex-direction: column;
  max-width: calc(25% - 8px);
  flex: 1 auto;
  margin: 4px;
  margin-bottom: 8px;
  border: 1px solid var(--bb-modal-border-color, #c4c4c4);
  background-color: var(--bb-modal-item-product-background, #fff);
  padding: 8px;
  border-radius: 4px;
}

bundle-builder-line-card [data-bb-selector="line-item-card-contents-item-main"] {
  display: flex;
  width: 100%;
}

@media only screen and (max-width: 1023px) {
  bundle-builder-line-card [data-bb-selector="line-item-card-contents-item"] {
    max-width: calc(33% - 8px);
  }
}
@media only screen and (max-width: 767px) {
  bundle-builder-line-card [data-bb-selector="line-item-card-contents-item"] {
    max-width: calc(50% - 8px);
  }
}
@media only screen and (max-width: 564px) {
  bundle-builder-line-card [data-bb-selector="line-item-card-contents-item"] {
    max-width: calc(100% - 8px);
  }
}

bundle-builder-line-card [data-bb-selector="line-item-card-contents-thumbnail"] {
  width: 80px;
  min-width: 80px;
  margin-right: 16px;
}

bundle-builder-line-card [data-bb-selector="line-item-card-contents-thumbnail-image"] {
  width: 100%;
  height: auto;

}

bundle-builder-line-card [data-bb-selector="line-item-card-contents-details-title"] {
  font-size: 14px;
  opacity: 0.8;
  padding: 0;
  margin: 0;
  border: 0;
  line-height: 1.5;
  text-align: left;
  letter-spacing: initial;
}
bundle-builder-line-card [data-bb-selector="line-item-card-contents-qty"] {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 8px;
  font-weight: bold;
}

/* Per-product price + compare-at (RRP) on bundle contents (#5323) */
bundle-builder-line-card [data-bb-selector="line-item-card-contents-price-wrapper"] {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  margin-top: 4px;
  font-size: 14px;
}

bundle-builder-line-card [data-bb-selector="line-item-card-contents-compare-at-price"] {
  opacity: 0.6;
  text-decoration: line-through;
}

/* Visually hidden but available to screen readers */
bundle-builder-line-card .bb-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Accodion */
[data-bb-selector="line-item-bundle-accordion"] {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
[data-bb-selector="line-item-bundle-accordion"] [data-bb-selector="chevron-icon"] {
  transition: transform .3s ease-in-out;
}
[data-bb-selector="line-item-bundle-accordion"][open] [data-bb-selector="chevron-icon"] {
  transform: rotate(180deg);
}
[data-bb-selector="line-item-bundle-accordion"] summary {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  font-weight: bold;
  padding: 8px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
[data-bb-selector="line-item-bundle-accordion"] summary:hover {
  opacity: 1;
}

[data-bb-selector="line-item-bundle-accordion"][open] summary {
  border-bottom: 1px solid #ccc;
}
/* Loading bar */

[data-bb-selector="loading-bar"] {
  width: 100%;
  min-width: 100%;
  height: 5px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

[data-bb-selector="loading-indicator"] {
  animation: SPAN-SPACE 3s infinite;
  text-indent: -999em;
  display: block;
  border-radius: 4px;
  background-color: #cccccc;
  background-image: linear-gradient(144deg, #555, #666 48%, #444);
}
@keyframes SPAN-SPACE{
  0%   { width: 0%; opacity: 1}
  75% {width: 100%; opacity: 0.8}
  100% { width: 0%; opacity: 1}
}

[data-bb-selector="composed-image-block"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 90px;
  height: 90px;
  padding: 0px;
  margin-right: 8px;
}
[data-bb-selector="composed-sub-thumbnail"] {
  max-width: 50%;
  padding: 2px;
  text-indent: 0px;
  margin: 0px;
  flex: 1 auto;
}
[data-bb-selector="composed-sub-thumbnail"] img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--bb-modal-border-color, #C4C4C4);
}
[data-bb-selector="dots"] {
  flex-grow: 1;
  background-color: #333;
  min-height: 50%;
}

/* Theme editor alert */
#bundle-builder-editor-alert {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #ebf9fc;
  border-top: solid 1px #98c6cd;
  color: black;
  padding: 1rem;
  z-index: 10000;
}

#bundle-builder-editor-alert .bundle-builder-editor-alert-content {
  display: flex;
}

#bundle-builder-editor-alert .bundle-builder-editor-alert-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 1rem;
  margin-top: 0.25rem;
  fill: #00a0ac;
}

#bundle-builder-editor-alert .bundle-builder-editor-alert-title {
  font-weight: bold;
  font-size: 120%;
}

#bundle-builder-editor-alert .bundle-builder-editor-alert-buttons {
  margin-top: 1rem;
}

#bundle-builder-editor-alert .bundle-builder-editor-alert-button-primary {
  background-color: #ebf9fc;
  border: solid 1px #98c6cd;
  border-radius: 0.25rem;
  padding: 0.5rem 1rem;
}

#bundle-builder-editor-alert .bundle-builder-editor-alert-button-primary:hover {
  background-color: #e4f7fa
}

#bundle-builder-editor-alert .bundle-builder-editor-alert-button-secondary {
  border: none;
  color: black;
  outline: none;
  background: none;
  margin-left: 1rem;
}

#bundle-builder-editor-alert .bundle-builder-editor-alert-button-secondary:hover {
  text-decoration: underline;
}

.bundle-builder-no-accelerated-checkout [data-shopify="dynamic-checkout-cart"] {
  display: none;
}

/* =====================================================================
   #5783 — Refreshed appearance (opt-in)
   ---------------------------------------------------------------------
   Enabled per-store by the "Cart appearance" block setting; the engine
   sets data-bb-cart-style="refreshed" on <html>. When the marker is
   ABSENT the Classic look above is byte-identical — none of it is edited.

   RULES for this section (do not break):
   - The marker is on <html>, so EVERY selector must ALSO contain a
     bundle-builder-* element. These components render real <h2>/<h3>/
     <img>/<summary> tags in light DOM; an unscoped selector would style
     the whole merchant theme.
   - Override explicitly — the greys/borders in Classic are baked in as
     `var(x, #fff)` FALLBACKS, so omitting a variable does not remove them.
   - Keep it additive: inherit font weight for a lighter, on-theme feel,
     but never drop Classic's structural resets (margin/letter-spacing/
     etc.) or theme <h2>/<summary> rules leak back in.
   - Colours derive from `currentColor` so they adapt to the theme's own
     text colour. Each color-mix is preceded by a neutral-grey rgba
     fallback (visible on light AND dark) for browsers without color-mix
     (Safari < 16.2 / Firefox < 113). The fallback line must come FIRST.
   - Merchant BRAND colours (box/modal/button backgrounds, text colours)
     are left to the Classic `var(--bb-*)` declarations — refreshed only
     replaces the dated NEUTRALS (black borders, grey fills, the inverted
     shadow) and lightens typography.
   - Modal container / underlay / ::backdrop / z-index / [data-bb-animate]
     slide are owned by PR #5780 — not touched here.
   ===================================================================== */

/* --- Cart box ------------------------------------------------------- */
[data-bb-cart-style="refreshed"] bundle-builder-cart-box {
  padding: 16px;
  border-radius: 10px;
  border-color: rgba(128, 128, 128, 0.35);
  border-color: color-mix(in srgb, currentColor 28%, transparent);
}

[data-bb-cart-style="refreshed"] bundle-builder-cart-box [data-bb-selector="bb-title"],
[data-bb-cart-style="refreshed"] bundle-builder-cart-box [data-bb-selector="bb-compare-at-price"],
[data-bb-cart-style="refreshed"] bundle-builder-cart-box [data-bb-selector="bb-price"] {
  font-weight: 600;
  font-size: 1em;
}

/* Outline button: a visible adaptive border always gives affordance and
   meets WCAG 1.4.11 (3:1), while the merchant's --bb-button-background is
   still honoured via the Classic declaration when they set one. */
[data-bb-cart-style="refreshed"] bundle-builder-cart-box [data-bb-selector="bb-view"] {
  border-radius: var(--bb-button-radius, 8px);
  border-color: rgba(128, 128, 128, 0.45);
  border-color: color-mix(in srgb, currentColor 38%, transparent);
  transition: opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

/* Subtle entrance — cart box ONLY (cards inside the modal have their
   opacity driven by item-modal.ts JS; animating them would fight it).
   Gated on reduced-motion; `both` ends at opacity 1, and when the media
   query doesn't match the rule never applies, so nothing can stick at 0. */
@media (prefers-reduced-motion: no-preference) {
  [data-bb-cart-style="refreshed"] bundle-builder-cart-box {
    animation: bbRefreshedFadeIn 0.35s ease both;
  }
}
@keyframes bbRefreshedFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Line item card ------------------------------------------------- */
[data-bb-cart-style="refreshed"] bundle-builder-line-card {
  border-width: 1px;
  border-radius: 12px;
  border-color: rgba(128, 128, 128, 0.3);
  border-color: color-mix(in srgb, currentColor 18%, transparent);
  /* Even padding so the header + product rows read as one tidy card
     (mockup), instead of Classic's top-only padding. */
  padding: 16px;
  /* Replace the inverted top-left shadow with a soft, even one. */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-card-title"] {
  font-weight: 600;
}

/* Product list — a plain vertical stack (mockup) instead of the grey
   #f1f1f1 strip full of boxed tiles. Rows carry their own dividers. */
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-bundle-contents"] {
  flex-direction: column;
  flex-wrap: nowrap;
  padding: 4px 0 0;
  border-radius: 0;
  background: transparent;
}
/* Accordion nests line-item-bundle-contents inside itself — reset the
   inner one so the tint/inset isn't doubled (higher specificity wins). */
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-bundle-contents"] [data-bb-selector="line-item-bundle-contents"] {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

/* Product rows — full width, no boxed tile; a light divider between rows
   (mockup). Classic keeps its #c4c4c4 tiles. */
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-card-contents-item"] {
  max-width: 100%;
  margin: 0;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid rgba(128, 128, 128, 0.22);
  border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-card-contents-item"]:last-child {
  border-bottom: 0;
}

/* Action pills (Edit / Duplicate / Remove) — full opacity for contrast;
   adaptive separators. Classic's :last-child border:0 still wins on width. */
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-line-item-card-action] {
  opacity: 1;
}
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-line-item-card-action] span {
  font-weight: 500;
  border-right-color: rgba(128, 128, 128, 0.35);
  border-right-color: color-mix(in srgb, currentColor 22%, transparent);
}

/* Accordion open divider. */
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-bundle-accordion"][open] summary {
  border-bottom-color: rgba(128, 128, 128, 0.3);
  border-bottom-color: color-mix(in srgb, currentColor 18%, transparent);
}

/* --- Modal (visual only; stacking/backdrop are PR #5780's) ---------- */
[data-bb-cart-style="refreshed"] bundle-builder-item-modal [data-bb-selector="modal-title"],
[data-bb-cart-style="refreshed"] bundle-builder-item-modal [data-bb-selector="modal-total"] {
  font-weight: 600;
}

[data-bb-cart-style="refreshed"] bundle-builder-item-modal [data-bb-selector="modal-header"] {
  border-bottom-width: 1px;
  border-bottom-color: rgba(128, 128, 128, 0.3);
  border-bottom-color: color-mix(in srgb, currentColor 16%, transparent);
}
[data-bb-cart-style="refreshed"] bundle-builder-item-modal [data-bb-selector="modal-footer"] {
  border-top-width: 1px;
  border-top-color: rgba(128, 128, 128, 0.3);
  border-top-color: color-mix(in srgb, currentColor 16%, transparent);
}

/* Done — outline affordance, matches the View button. */
[data-bb-cart-style="refreshed"] bundle-builder-item-modal [data-bb-selector="done"] {
  border-radius: var(--bb-button-radius, 8px);
  border: 1px solid rgba(128, 128, 128, 0.45);
  border: 1px solid color-mix(in srgb, currentColor 38%, transparent);
  transition: opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

/* --- Modal list layout & shell (#5783 refreshed) --------------------
   Turns the "View Details" popup into the on-brand list from the issue
   mockup: a narrower rounded shell, product rows (thumbnail • title • qty
   pill) with light dividers, and a tinted personalisation box. Every
   selector stays scoped to the refreshed marker; Classic is untouched.
   Neutrals derive from currentColor so they adapt to the theme's own text
   colour, each with a neutral-grey fallback FIRST for old Safari/Firefox
   without color-mix. */

/* Narrower, rounded shell on desktop — Classic's 1080px is far too wide
   for a single-column list. Below 1024px the modal is full-screen (the
   Classic rule), so these only apply on desktop. */
@media only screen and (min-width: 1024px) {
  [data-bb-cart-style="refreshed"] bundle-builder-item-modal [data-bb-selector="modal-inner"] {
    max-width: 640px;
    border-radius: 14px;
    overflow: hidden;
  }
}
/* Let a tall bundle scroll inside the shell instead of spilling past the
   footer (Classic only scrolls horizontally). */
[data-bb-cart-style="refreshed"] bundle-builder-item-modal [data-bb-selector="modal-content"] {
  overflow-y: auto;
}

/* Divider under the bundle header so title/actions sit apart from the
   product rows (mockup). */
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-card-header"] {
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.22);
  border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

/* Bundle representative image (when present) — small + rounded so it
   never dominates the header; Classic renders it at 120px. */
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-card-thumnail-wrapper"] {
  margin: 0 12px 0 0;
}
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-thumbnail"] {
  width: 56px;
  border-radius: 8px;
}

/* Product row = thumbnail • title • quantity pill, vertically centred. */
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-card-contents-item-main"] {
  align-items: center;
  gap: 12px;
}
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-card-contents-thumbnail"] {
  width: 48px;
  min-width: 48px;
  margin-right: 0;
}
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-card-contents-thumbnail-image"] {
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Details become a single row: title grows, price + qty pill sit right.
   Classic stacks a bold "QTY: 1" above the muted title. */
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-card-contents-details"] {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-grow: 1;
  /* min-width:0 lets this flex item shrink below its content's intrinsic
     width so the title wraps instead of overflowing a narrow cart drawer /
     mobile modal (the pill keeps its size via white-space:nowrap). */
  min-width: 0;
  gap: 10px;
}
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-card-contents-details-title"] {
  order: 0;
  flex-grow: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.35;
  opacity: 1;
  font-weight: 500;
}
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-card-contents-price-wrapper"] {
  order: 1;
  margin-top: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}
/* Quantity as a rounded pill on the right (mockup) — not a bold label. */
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-card-contents-qty"] {
  order: 2;
  margin-bottom: 0;
  opacity: 1;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.14);
  background: color-mix(in srgb, currentColor 10%, transparent);
}

/* Personalisation values → a tinted rounded box (mockup). The tint,
   radius and side/bottom padding are clean adds; the grey `border-top`
   is set inline in personalisationCartMarkup.ts, so it needs !important
   to drop. */
[data-bb-cart-style="refreshed"] bundle-builder-line-card [data-bb-selector="line-item-card-personalisation"] {
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 12px;
  border-radius: 10px;
  border-top: 0 !important;
  background: rgba(128, 128, 128, 0.1);
  background: color-mix(in srgb, currentColor 6%, transparent);
}
