/* Size picker block */
#my-custom-bundle[template-id="denise-s-black-friday-bebe-bundle-54795"] {
  --bundle-primary: var(--gbbCustom-primary, #000);
  --bundle-text: var(--gbbCustom-text, #000);
  --bundle-bg: var(--gbbCustom-bg, #fff);
  --bundle-btn-text: var(--gbbCustom-btn-text, #fff);
  --bundle-radius: var(--gbbCustom-radius-btn, 0);
  --bundle-hover-bg: #f4f4f4;

  box-sizing: border-box;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: inherit;
  color: var(--bundle-text);
  /* Left-aligned like the screenshot, even when the theme centres its product column */
  text-align: left;

  & *,
  & *::before,
  & *::after {
    box-sizing: inherit;
  }

  & button {
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
  }
  & button:focus-visible {
    outline: 2px solid var(--bundle-primary);
    outline-offset: 2px;
  }

  /* Description: 17px text on 30px lines, as in the screenshot */
  & .bundle__desc {
    margin: 0 0 30px;
    /* Description: the theme's own body font (Dawn-style and other common theme variables); with none set, it inherits the page font */
    font-family: var(--font-body-family, var(--font-body, var(--font-family-body, var(--body-font-family))));
    font-size: 17px;
    font-weight: 400;
    line-height: 30px;
    color: var(--bundle-text);
    overflow-wrap: break-word;
    text-align: left;
  }
  /* Bullets and their text stay left-aligned together */
  & .bundle__desc ul,
  & .bundle__desc li {
    text-align: left;
  }
  & .bundle__desc[hidden] { display: none; }
  /* Every part of the description uses that same font, even where the theme styles lists or headings */
  & .bundle__desc * { font-family: inherit; }
  & .bundle__desc > * { margin: 0; }
  & .bundle__desc p { margin: 0; }
  & .bundle__desc strong,
  & .bundle__desc b { font-weight: 700; }
  /* Description headings (What's inside, How to use) */
  & .bundle__desc .bundle__desc-heading {
    margin: 15px 0 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
  }
  & .bundle__desc > .bundle__desc-heading:first-child { margin-top: 0; }
  /* Gap before the approval line */
  & .bundle__desc .bundle__desc-gap { margin-top: 14px; }
  /* What's inside list */
  & .bundle__desc .bundle__desc-list {
    margin: 0;
    padding: 0 0 0 22px;
    list-style: disc outside;
  }
  & .bundle__desc .bundle__desc-list li {
    margin: 0;
    padding: 0;
    line-height: 32px;
    list-style: inherit;
  }
  /* Grey small print */
  & .bundle__desc .bundle__desc-small {
    margin-top: 14px;
    font-size: 14px;
    line-height: 24px;
    color: #666;
  }

  /* Heading above the sizes */
  & .bundle__heading {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--bundle-text);
  }
  & .bundle__heading[hidden] { display: none; }

  /* Size buttons row */
  & .bundle__sizes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
    gap: 8px;
  }
  & .bundle__size {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 4px 12px;
    border: 1px solid var(--bundle-primary);
    border-radius: var(--bundle-radius);
    background: var(--bundle-bg);
    color: var(--bundle-text);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
  }
  & .bundle__size:hover:not(:disabled) {
    background: var(--bundle-hover-bg);
  }
  /* Selected size: light grey fill and a bold 2px border; the inset line keeps the button from shifting */
  & .bundle__size.is-selected {
    background: #f5f5f5;
    box-shadow: inset 0 0 0 1px var(--bundle-primary);
  }
  & .bundle__size.is-selected:hover {
    background: #f5f5f5;
  }
  & .bundle__size:disabled {
    opacity: 0.4;
    text-decoration: line-through;
    cursor: not-allowed;
  }

  /* Add to cart button */
  & .bundle__atc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 50px;
    margin-top: 22px;
    padding: 8px 16px 8px calc(16px + 0.35em);
    border: 1px solid var(--bundle-primary);
    border-radius: var(--bundle-radius);
    background: var(--bundle-bg);
    color: var(--bundle-text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
  }
  & .bundle__atc-btn:disabled {
    cursor: not-allowed;
  }
  & .bundle__atc-btn.is-ready {
    background: var(--bundle-primary);
    color: var(--bundle-btn-text);
  }
  & .bundle__atc-btn.is-ready:hover:not(:disabled) {
    opacity: 0.85;
  }
  & .bundle__atc-btn.is-loading {
    cursor: progress;
    opacity: 0.85;
  }
  & .bundle__atc-btn.is-loading::before {
    content: "";
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: bundle-spin-denise-s-black-friday-bebe-bundle-54795 0.9s linear infinite;
  }

  /* Why add to cart is blocked */
  & .bundle__validation {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    color: #b3261e;
  }
  & .bundle__validation[hidden] { display: none; }

  /* Note under the button: gift icon sits right before the text, both centred as one line (screenshot 5) */
  & .bundle__note {
    display: block;
    margin-top: 20px;
    font-size: 17px;
    line-height: 1.5;
    text-align: center;
    color: var(--bundle-text);
    overflow-wrap: break-word;
    text-wrap: balance;
  }
  & .bundle__note[hidden] { display: none; }
  /* Gift icon: flows inline with the first word, fixed size */
  & .bundle__note-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: -3px;
    line-height: 1;
    font-size: 18px;
    overflow: hidden;
  }
  /* Note text: wraps naturally after the icon */
  & .bundle__note-text {
    display: inline;
  }
  & .bundle__note-icon svg {
    display: block;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    min-width: 0;
    max-width: none;
  }

  /* Empty and loading states */
  & .bundle__empty {
    grid-column: 1 / -1;
    padding: 12px 0;
    font-size: 14px;
    color: #888;
  }
  & .bundle__loader,
  & .bundle__sizes-loader {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
  }
  & .bundle__loader { min-height: 120px; }
  & .bundle__loader::before,
  & .bundle__sizes-loader::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: var(--bundle-primary);
    border-radius: 50%;
    animation: bundle-spin-denise-s-black-friday-bebe-bundle-54795 0.9s linear infinite;
  }

  /* Phones */
  @media (max-width: 768px) {
    & .bundle__heading {
      font-size: 13px;
      letter-spacing: 0.25em;
    }
    & .bundle__sizes {
      grid-template-columns: repeat(auto-fit, minmax(min(110px, 100%), 1fr));
    }
    & .bundle__size {
      min-height: 44px;
      font-size: 16px;
    }
    & .bundle__atc-btn {
      min-height: 50px;
      font-size: 14px;
      letter-spacing: 0.22em;
      padding: 8px 12px 8px calc(12px + 0.22em);
    }
    /* Gift note on phones: same inline layout, smaller type, even line breaks */
    & .bundle__note {
      margin-top: 16px;
      font-size: 14px;
      line-height: 1.5;
    }
    & .bundle__note-icon,
    & .bundle__note-icon svg {
      width: 17px;
      height: 17px;
    }
    & .bundle__note-icon {
      margin-right: 7px;
      vertical-align: -3px;
    }
    & .bundle__desc .bundle__desc-heading {
      font-size: 13px;
      letter-spacing: 0.25em;
    }
  }

  /* Very small phones: keep the button text on one line */
  @media (max-width: 400px) {
    & .bundle__atc-btn {
      font-size: 13px;
      letter-spacing: 0.14em;
      padding: 8px 10px 8px calc(10px + 0.14em);
    }
    & .bundle__heading,
    & .bundle__desc .bundle__desc-heading {
      letter-spacing: 0.2em;
    }
  }
}

/* Spinner */
@keyframes bundle-spin-denise-s-black-friday-bebe-bundle-54795 {
  to { transform: rotate(360deg); }
}