/**
 * BooBoo Gift Cards — customer pages (/gift-card, /gift-card/balance, "Send it again").
 * Approved mockup: docs/macheta/Main.dc.html + Balance.dc.html. Colours / fonts / radii = the theme tokens (--bb-*,
 * warehousechild/assets/css/custom.css) with the same values as fallback, so the pages also work without them.
 * Everything is scoped under .bbg (the theme is not changed).
 */
.bbg {
  --g-ink: var(--bb-ink, #26201f);
  --g-muted: var(--bb-muted, #6e6266);
  --g-line: var(--bb-line, #efe3e6);
  --g-field: #958489;             /* input border: 3.4:1 on white (WCAG 1.4.11); mockup #d9c9ce is too pale */
  --g-bg: var(--bb-bg, #fffaf8);
  --g-surface: var(--bb-surface, #ffffff);
  --g-tint: var(--bb-tint, #fde8ef);
  --g-accent: var(--bb-accent, #c92f66);
  --g-accent-dk: var(--bb-accent-dark, #a8255a);
  --g-cta: var(--bb-cta, #26201f);
  --g-cta-hover: var(--bb-cta-hover, #463b3d);
  --g-r: var(--bb-r, 20px);
  --g-r-sm: var(--bb-r-sm, 12px);
  --g-pill: var(--bb-r-pill, 999px);
  --g-shadow: var(--bb-shadow, 0 18px 40px -24px rgba(38, 32, 31, .35));
  --g-head: var(--bb-brandon, "Montserrat", system-ui, sans-serif);
  --g-body: var(--bb-body, "Montserrat", system-ui, sans-serif);
  color: var(--g-ink);
  font-family: var(--g-body);
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 0;
}
.bbg *, .bbg *::before, .bbg *::after { box-sizing: border-box; }
.bbg p { margin: 0; }
.bbg a { color: var(--g-accent-dk); }
.bbg a:hover { color: var(--g-ink); }
.bbg [hidden] { display: none !important; }
.bbg input, .bbg textarea, .bbg-alert { scroll-margin-top: 110px; }   /* focused field not hidden by the sticky menu */
.bbg-sr {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important;
}
.bbg-muted { color: var(--g-muted); }
.bbg-small { font-size: 12px; line-height: 1.5; }

/* ------------------------------------------------------------------ headings */
.bbg-head { margin: 0 0 4px; }
.bbg .bbg-h1 {
  margin: 0; font-family: var(--g-head); font-size: 34px; line-height: 1.1; font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase; color: var(--g-ink);
}
.bbg .bbg-h1--sm { font-size: 28px; }
.bbg-lead { margin-top: 8px !important; font-size: 15px; line-height: 1.6; color: var(--g-muted); }

/* ------------------------------------------------------------------ layout of the Gift Card page */
.bbg-gc { padding: 4px 0 56px; }
.bbg-gc__grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.bbg-gc__visual { flex: 1 1 480px; min-width: 0; }
.bbg-gc__form { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.bbg-gc__sticky { display: flex; flex-direction: column; gap: 22px; }
@media (min-width: 992px) {
  .bbg-gc__sticky { position: sticky; top: 88px; }   /* below the theme's sticky menu */
}
.bbg-gc__note { font-size: 13px; line-height: 1.5; }

/* ------------------------------------------------------------------ the card (live preview) */
.bbg-card {
  --card-bg: #f9c4d6; --card-ink: #26201f; --card-accent: #a8255a;
  background: var(--card-bg); color: var(--card-ink); border-radius: var(--g-r); aspect-ratio: 1.6; padding: 32px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px; box-shadow: var(--g-shadow);
  transition: background-color .2s ease, color .2s ease;
}
.bbg-card__img { display: block; width: calc(100% + 64px); max-width: none; margin: -32px -32px 0; height: auto; border-radius: var(--g-r) var(--g-r) 0 0; }
.bbg-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.bbg-card__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.bbg-card__title { font-family: var(--g-head); font-size: 38px; font-weight: 700; line-height: 1.05; margin-top: 10px !important; color: var(--card-accent); overflow-wrap: anywhere; }
.bbg-card__cake { flex: 0 0 auto; width: 74px; height: 74px; color: var(--card-accent); }
.bbg-card__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.bbg-card__lines { max-width: 62%; min-width: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.bbg-card__to { font-weight: 700; }
.bbg-card__msg { white-space: pre-line; opacity: .9; margin-top: 4px !important; }
.bbg-card__from { margin-top: 6px !important; font-weight: 600; }
.bbg-card__to + .bbg-card__msg[hidden] + .bbg-card__from { margin-top: 4px !important; }
.bbg-card__amount { font-family: var(--g-head); font-size: 52px; font-weight: 700; line-height: 1; white-space: nowrap; margin-left: auto !important; }

/* ------------------------------------------------------------------ benefits */
.bbg-benefits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bbg-benefits li { background: var(--g-surface); border: 1px solid var(--g-line); border-radius: var(--g-r-sm); padding: 14px; font-size: 13px; line-height: 1.45; }
.bbg-benefits strong { display: block; font-size: 14px; margin-bottom: 2px; }

/* ------------------------------------------------------------------ form */
.bbg-form { display: flex; flex-direction: column; gap: 26px; }
.bbg-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.bbg .bbg-step__title {
  display: block; width: 100%; float: none; margin: 0 0 10px; padding: 0; border: 0;
  font-family: var(--g-body); font-size: 12px; line-height: 1.4; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--g-ink);
}
.bbg-label { display: block; margin: 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--g-ink); }
.bbg-label__hint { font-weight: 400; }
.bbg .bbg-input {
  display: block; width: 100%; height: 44px; margin: 0; border: 1px solid var(--g-field); border-radius: var(--g-r-sm); padding: 0 14px;
  font-family: var(--g-body); font-size: 15px; color: var(--g-ink); background: #fff; box-shadow: none;
}
.bbg .bbg-textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.bbg .bbg-input:focus { outline: 2px solid var(--g-accent); outline-offset: 1px; border-color: var(--g-accent); }
.bbg .bbg-input[aria-invalid="true"] { border-color: var(--g-accent-dk); border-width: 2px; }
.bbg-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bbg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bbg-field--wide { grid-column: 1 / -1; }
.bbg-count { font-size: 12px; text-align: right; margin-top: -2px !important; }
.bbg-err { margin-top: 6px !important; font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--g-accent-dk); }
.bbg-field .bbg-err { margin-top: 0 !important; }

/* designs */
.bbg-designs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bbg-design { position: relative; display: block; margin: 0; cursor: pointer; border-radius: var(--g-r-sm); background-color: var(--d-bg); background-size: cover; background-position: center; }
.bbg-design__face {
  display: flex; align-items: center; justify-content: center; text-align: center; aspect-ratio: 1.6; min-height: 56px; padding: 6px;
  border: 1px solid var(--g-line); border-radius: var(--g-r-sm); color: var(--d-ink); font-size: 11px; font-weight: 700; line-height: 1.2;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.bbg-design:hover .bbg-design__face { border-color: var(--g-accent); }
.bbg-design input:checked + .bbg-design__face { border: 3px solid var(--g-accent); }
.bbg-design input:focus-visible + .bbg-design__face,
.bbg-pill input:focus-visible + span { outline: 2px solid var(--g-accent); outline-offset: 2px; }

/* pills (amount, when) */
.bbg-pills { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bbg-pill { position: relative; margin: 0; cursor: pointer; }
.bbg-pill span {
  display: inline-flex; align-items: center; height: 46px; padding: 0 20px; border: 1.5px solid var(--g-ink); border-radius: var(--g-pill);
  background: #fff; color: var(--g-ink); font-size: 15px; font-weight: 700; white-space: nowrap; transition: background-color .15s ease, color .15s ease;
}
.bbg-pill:hover span { background: var(--g-tint); }
.bbg-pill input:checked + span { background: var(--g-ink); color: #fff; }
.bbg-other { margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bbg-other .bbg-label { font-size: 14px; }
.bbg .bbg-input--amount { width: 120px; }
.bbg .bbg-input--date { width: auto; min-width: 170px; height: 46px; }
.bbg-date { display: inline-block; }
.bbg-step .bbg-small { margin-top: 8px !important; }

/* buy row */
.bbg-buy { border-top: 1px solid var(--g-line); padding-top: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.bbg-buy__total { font-family: var(--g-head); font-size: 30px; font-weight: 700; line-height: 1; }
.bbg .bbg-buy__btn { height: 52px; min-height: 52px; padding: 0 34px; font-size: 14px; letter-spacing: .12em; border-radius: var(--g-pill); }
.bbg .bbg-buy__btn[aria-busy="true"] { opacity: .65; cursor: progress; }
.bbg-buy__after { margin-top: -16px !important; }

/* messages */
.bbg-alert, .bbg-status:not(:empty), .bbg-success {
  border-radius: var(--g-r-sm); padding: 12px 16px; font-size: 14px; line-height: 1.5; font-weight: 600;
}
.bbg-alert { background: var(--g-tint); color: var(--g-accent-dk); border: 1px solid var(--g-accent); }
.bbg-status:not(:empty), .bbg-success { background: #e6f5f6; color: var(--g-ink); border: 1px solid #a0dae0; }
.bbg-status p + p { margin-top: 4px !important; }
.bbg-status .bbg-status__notice { color: var(--g-accent-dk); }

/* ------------------------------------------------------------------ how it works */
.bbg-how { margin-top: 56px; background: var(--g-tint); border-radius: var(--g-r); padding: 32px; }
.bbg-how__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.bbg-how__item { display: flex; flex-direction: column; }
.bbg-how__num { font-family: var(--g-head); font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--g-accent-dk); }
.bbg-how__title { margin-top: 4px; font-weight: 700; }
.bbg-how__text { margin-top: 6px; font-size: 14px; line-height: 1.5; }

/* ------------------------------------------------------------------ balance / send it again */
.bbg-narrow { max-width: 640px; margin: 0 auto; padding: 24px 0 64px; display: flex; flex-direction: column; gap: 24px; }
.bbg-inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.bbg-inline-form__field { flex: 1 1 260px; }
.bbg .bbg-input--code { height: 48px; font-size: 16px; letter-spacing: .1em; text-transform: uppercase; }
.bbg-inline-form .bbg-input { height: 48px; }
.bbg .bbg-inline-form__btn { height: 48px; min-height: 48px; padding: 0 28px; border-radius: var(--g-pill); font-size: 14px; letter-spacing: .12em; }
.bbg-result {
  background: var(--g-surface); border: 1px solid var(--g-line); border-radius: var(--g-r); padding: 24px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px;
}
.bbg-result__label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--g-muted); }
.bbg-result__big { font-family: var(--g-head); font-size: 40px; font-weight: 700; line-height: 1.2; color: var(--g-accent-dk); }
.bbg-result__of { font-size: 13px; }
.bbg-result__date { font-family: var(--g-head); font-size: 22px; font-weight: 700; margin-top: 8px !important; }
.bbg .bbg-result__btn { grid-column: 1 / -1; justify-self: start; border-radius: var(--g-pill); background: var(--g-accent-dk); border-color: var(--g-accent-dk); color: #fff; }
.bbg .bbg-result__btn:hover, .bbg .bbg-result__btn:focus { background: var(--g-ink); border-color: var(--g-ink); color: #fff; }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 767px) {
  .bbg-gc__grid { gap: 32px; }
  .bbg .bbg-h1 { font-size: 28px; }
  .bbg-card { padding: 22px; gap: 12px; }
  .bbg-card__img { width: calc(100% + 44px); margin: -22px -22px 0; }
  .bbg-card__title { font-size: 28px; margin-top: 6px !important; }
  .bbg-card__cake { width: 56px; height: 56px; }
  .bbg-card__amount { font-size: 40px; }
  .bbg-card__lines { font-size: 13px; }
  .bbg-benefits { grid-template-columns: 1fr; }
  .bbg-how { margin-top: 40px; padding: 24px; }
  .bbg-how__list { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 480px) {
  .bbg-fields { grid-template-columns: 1fr; }
  .bbg-designs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bbg-card { padding: 18px; }
  .bbg-card__img { width: calc(100% + 36px); margin: -18px -18px 0; }
  .bbg-card__eyebrow { font-size: 10px; letter-spacing: .14em; }
  .bbg-card__title { font-size: 24px; }
  .bbg-card__cake { width: 48px; height: 48px; }
  .bbg-card__amount { font-size: 34px; }
  .bbg-card__lines { max-width: 66%; }
  .bbg-pill span { padding: 0 16px; }
  .bbg-buy__btn { flex: 1 1 100%; }
  .bbg-result { grid-template-columns: 1fr; }
  .bbg .bbg-inline-form__btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .bbg-card, .bbg-design__face, .bbg-pill span { transition: none; }
}
