/* The 1, 2 and 3 box cards (BurbleGiftBundle.cardsHtml in components/gift-bundle.js), shared by
   the gift page and the per-box page. Colors fall back to the gift page's tokens. */
.g-bundles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 14px; row-gap: 0; margin-top: 20px; }
/* Each card's five lines (head, stages, price, a box's share, savings) sit on the grid's shared
   rows, so the prices line up across cards when one card's stages wrap to two lines. */
.g-bundle-card {
  position: relative; display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; align-content: start; text-align: left;
  background: var(--white, #FFFFFF); border: 1.5px solid var(--border, #EAE0D8); border-radius: 16px;
  padding: 18px 18px 16px; font: inherit; color: var(--text-dark, #1A1208); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.g-bundle-card:hover { border-color: var(--coral-btn, #E8795C); }
/* The phone row's groups and radio (see the 640px rules); on the card each line takes its row. */
.g-bundle-main, .g-bundle-cost { display: contents; }
.g-bundle-radio, .g-bundle-stages-months { display: none; }
/* Best value: green, like the savings lines (dark green on light green, 5.7:1). */
.g-bundle-badge.is-value { background: #CFE5C6; color: var(--sage-dk, #2A5E34); }
.g-bundle-head { grid-row: 1; }
.g-bundle-stages { grid-row: 2; }
.g-bundle-price { grid-row: 3; }
.g-bundle-each { grid-row: 4; }
.g-bundle-save, .g-bundle-reason { grid-row: 5; }
.g-bundle-card:focus-visible { outline: 2px solid var(--coral-btn, #E8795C); outline-offset: 2px; }
/* Picked: a rust outline on a light tint, on desktop and phones alike. */
.g-bundle-card.is-selected { background: var(--coral-lt, #FDEEE8); border-color: var(--coral-deep, #A9431F); }
.g-bundle-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: #E2A84A; color: var(--text-dark, #1A1208); font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 3px 10px;
}
.g-bundle-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 8px; }
.g-bundle-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 21px; white-space: nowrap; }
.g-bundle-months { font-size: 13px; color: var(--text-mid, #6B5D54); white-space: nowrap; }
.g-bundle-stages {
  font-size: 14px; color: var(--text-mid, #6B5D54); margin-top: 10px; padding-bottom: 18px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border, #EAE0D8);
}
.g-bundle-price strong { font-size: 19px; font-weight: 700; }
.g-bundle-price s { font-size: 13px; color: var(--text-mid, #6B5D54); margin-left: 4px; }
.g-bundle-each { font-size: 13px; color: var(--text-mid, #6B5D54); margin-top: 2px; }
.g-bundle-save { font-size: 13px; font-weight: 700; color: var(--sage-dk, #2A5E34); margin-top: 4px; }
.g-bundle-reason { font-size: 13px; font-weight: 600; color: var(--text-mid, #6B5D54); margin-top: 6px; }
.g-bundle-card.is-selected .g-bundle-stages { border-bottom-color: #F1D3C6; }
/* More boxes than stages left for their age: greyed out, with the reason. */
.g-bundle-card.is-disabled { background: var(--cream, #FBF7F3); border-color: var(--border, #EAE0D8); border-style: dashed; color: var(--text-light, #A8998F); cursor: not-allowed; }
.g-bundle-card.is-disabled .g-bundle-months,
.g-bundle-card.is-disabled .g-bundle-stages,
.g-bundle-card.is-disabled .g-bundle-price s,
.g-bundle-card.is-disabled .g-bundle-each { color: var(--text-light, #A8998F); }
.g-bundle-card.is-disabled .g-bundle-reason { color: var(--text-mid, #6B5D54); }

/* The line under the cards, with an info icon. */
.g-bundle-note { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--text-mid, #6B5D54); margin: 16px 0 18px; }
.g-bundle-note svg { flex-shrink: 0; margin-top: 2px; }

@media (max-width: 640px) {
  /* The box cards become rows: a radio, the name, stages and savings, and the price on the right. */
  .g-bundles { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 16px; }
  .g-bundle-card {
    grid-row: auto; grid-template-rows: none; grid-template-columns: 22px minmax(0, 1fr) auto;
    column-gap: 12px; align-items: start; padding: 14px 14px 14px 14px; border-radius: 14px;
  }
  .g-bundle-main, .g-bundle-cost { display: flex; flex-direction: column; min-width: 0; }
  .g-bundle-cost { align-items: flex-end; text-align: right; }
  .g-bundle-head, .g-bundle-stages, .g-bundle-price, .g-bundle-each, .g-bundle-save, .g-bundle-reason { grid-row: auto; }
  .g-bundle-radio {
    display: block; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
    border: 1.5px solid var(--text-light, #A8998F); background: var(--white, #FFFFFF); position: relative;
  }
  .g-bundle-head { justify-content: flex-start; align-items: center; gap: 8px; }
  .g-bundle-name { font-size: 17px; }
  .g-bundle-months { display: none; }
  .g-bundle-badge { position: static; transform: none; font-size: 11px; padding: 2px 8px; }
  .g-bundle-stages { font-size: 13px; margin: 2px 0 0; padding: 0; border: 0; }
  .g-bundle-stages-months { display: inline; }
  /* Keeps an empty stages row's height on desktop; on a phone the months fill the line. */
  .g-bundle-stages-pad { display: none; }
  .g-bundle-save, .g-bundle-reason { font-size: 12px; margin-top: 3px; }
  .g-bundle-price { display: flex; flex-direction: column; align-items: flex-end; }
  .g-bundle-price strong { font-size: 18px; }
  .g-bundle-price s { font-size: 12px; margin: 0; }
  .g-bundle-each { font-size: 12px; margin-top: 1px; }
  .g-bundle-card.is-selected .g-bundle-radio { border-color: var(--coral-deep, #A9431F); }
  .g-bundle-card.is-selected .g-bundle-radio::after { content: ''; position: absolute; inset: 3.5px; border-radius: 50%; background: var(--coral-deep, #A9431F); }
  .g-bundle-card.is-disabled .g-bundle-radio { border-color: var(--border, #EAE0D8); background: transparent; }
}

