/* Guild & Gryphon gift cards. Uses only the theme's variables, so it follows Daylight and walnut.
   The card art keeps fixed colors per design, like a printed card. */

.ggc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ggc-small { font-size: 17px; line-height: 24px; }
.ggc-btn-46 { min-height: 46px; }
.ggc-msg { margin: 0; min-height: 1px; }
.ggc-msg.is-error { color: var(--garnet); }
.ggc-msg.is-ok { color: var(--emerald); font-weight: 700; }
.ggc-msg:empty { display: none; }

/* choices built from radio labels: checked state without the script too */
.gs-size:has(> .ggc-sr:checked), .gs-opt:has(> .ggc-sr:checked) { border: 2px solid var(--brass); }
.gs-opt:has(> .ggc-sr:checked) { padding: 11px 15px; }
.gs-opt:has(> .ggc-sr:checked) .gs-dot { border-color: var(--brass); }
.gs-opt:has(> .ggc-sr:checked) .gs-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brass); }
.gs-size:has(> .ggc-sr:checked) { padding: 7px 11px; }
.gs-size:has(> .ggc-sr:focus-visible), .gs-opt:has(> .ggc-sr:focus-visible), .ggc-style:has(> .ggc-sr:focus-visible) { outline: var(--border-frame) solid var(--brass); outline-offset: 3px; }
label.gs-size, label.gs-opt { position: relative; }

/* ---------- the card ---------- */
.ggc-card { --ggc-bg: var(--label-cream, #F8F2E6); --ggc-ink: #2A1D13; --ggc-rule: #A67C2E; --ggc-accent: #7A5A1E;
  position: relative; box-sizing: border-box; width: 100%; aspect-ratio: 1.586 / 1; border-radius: 14px; overflow: hidden; padding: 7%;
  display: flex; flex-direction: column; justify-content: space-between; background: var(--ggc-bg); color: var(--ggc-ink);
  box-shadow: 0 2px 0 rgba(60,40,20,.2), 0 14px 28px rgba(60,40,20,.22); font-family: var(--font-body); container-type: inline-size; }
.ggc-card *, .ggc-card *::before, .ggc-card *::after { box-sizing: border-box; }
.ggc-card::before { content: ""; position: absolute; inset: 4.5%; border: 2px solid var(--ggc-rule); border-radius: 8px; pointer-events: none; }
.ggc-card--walnut { --ggc-bg: #24180F; --ggc-ink: #F1E6CF; --ggc-rule: var(--label-gold, #C9A055); --ggc-accent: var(--label-gold, #C9A055); }
.ggc-card--garnet { --ggc-bg: #7A2430; --ggc-ink: #FFF4E6; --ggc-rule: var(--label-gold-light, #E4C67E); --ggc-accent: var(--label-gold-light, #E4C67E); }
.ggc-card__top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 4%; }
.ggc-card__brand { display: flex; align-items: center; gap: 4cqw; }
.ggc-card__brand img { display: block; max-width: none; }
.ggc-card__mark { width: 14cqw; height: 14cqw; }
.ggc-card__wm { height: 3.6cqw; width: auto; }
.ggc-card__on-dark { display: none !important; }
.ggc-card--walnut .ggc-card__on-light, .ggc-card--garnet .ggc-card__on-light { display: none !important; }
.ggc-card--walnut .ggc-card__on-dark, .ggc-card--garnet .ggc-card__on-dark { display: block !important; }
.ggc-card__kind { padding-top: 1cqw; font: 700 3.4cqw/1 var(--font-label); letter-spacing: .2em; text-transform: uppercase; color: var(--ggc-accent); }
.ggc-card__mid { position: relative; display: flex; flex-direction: column; gap: 1.5cqw; }
.ggc-card__amt { font: 700 15cqw/1 var(--font-display); letter-spacing: .02em; }
.ggc-card__rule { display: flex; align-items: center; gap: 2cqw; width: 44cqw; }
.ggc-card__rule::before, .ggc-card__rule::after { content: ""; flex: 1; height: 2px; background: var(--ggc-rule); }
.ggc-card__rule i { width: 2cqw; height: 2cqw; background: var(--ggc-rule); transform: rotate(45deg); }
.ggc-card__bot { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 4%; font-size: 3.6cqw; line-height: 1.3; }
.ggc-card__to { opacity: .85; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ggc-card__code { font: 700 3.6cqw/1 var(--font-label); letter-spacing: .14em; white-space: nowrap; }
.ggc-card__seal.gg-wax { position: absolute; right: 6%; top: 30%; width: 22cqw; opacity: .95; }
/* the card is the product: same colors in light and dark mode */
.ggc-card--daylight .ggc-card__seal { --gg-line: #982E39; }
.ggc-card .ggc-card__seal::after { background: #F8F2E6; }
.ggc-card--walnut .ggc-card__seal, .ggc-card--garnet .ggc-card__seal { --gg-line: var(--label-gold, #C9A055); }

/* ---------- product page ---------- */
.ggc-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.ggc-preview { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ggc-stage { position: relative; padding: 72px 64px 48px; }
.ggc-buy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.ggc-head { display: flex; flex-direction: column; gap: 12px; }
.ggc-buy .gs-lede p { margin: 0; }
.ggc-fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ggc-fieldset > legend { margin-bottom: 10px; padding: 0; }
.ggc-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ggc-style { position: relative; display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--ground-raised); color: var(--ink); cursor: pointer; }
.ggc-style:hover { border-color: var(--brass); }
.ggc-style.is-on, .ggc-style:has(> .ggc-sr:checked) { border: 2px solid var(--brass); padding: 9px; }
.ggc-style__label { font: 700 16px/1 var(--font-label); letter-spacing: .08em; }
.ggc-swatch { display: block; width: 100%; aspect-ratio: 1.586 / 1; border-radius: 6px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.15); }
.ggc-swatch--daylight { background: #F8F2E6; border: 2px solid #A67C2E; }
.ggc-swatch--walnut { background: #24180F; border: 2px solid #C9A055; }
.ggc-swatch--garnet { background: #7A2430; border: 2px solid #E4C67E; }
.ggc-amts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ggc-amts .gs-size { min-width: 0; }
.ggc-other, .ggc-date { max-width: 260px; }
.ggc-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ggc-gift { display: flex; flex-direction: column; gap: 14px; }
.ggc-gift[hidden], .ggc-other[hidden], .ggc-date[hidden] { display: none; }
.ggc-count { display: block; font-size: 16px; text-align: right; }
.ggc-add { width: 100%; }
.ggc-added { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 2px solid var(--brass);
  border-radius: var(--radius-sm); background: var(--ground-raised); }
.ggc-added__text { display: flex; align-items: center; gap: 12px; }
.ggc-added__seal.gg-wax { width: 40px; }
.ggc-facts { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 17px; line-height: 24px; }
.ggc-desc { margin-top: var(--space-5); max-width: 760px; }
.ggc-how-wrap { padding-bottom: 32px; display: flex; flex-direction: column; gap: 20px; }
.ggc-how { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: ggc; }
.ggc-how li { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--line); border-top: 3px solid var(--brass);
  border-radius: var(--radius-sm); background: var(--ground-raised); }
.ggc-how li::before { counter-increment: ggc; content: counter(ggc); display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--brass);
  border-radius: 50%; font: 700 17px/1 var(--font-display); color: var(--brass); }
.ggc-how__title { font-family: var(--font-label); letter-spacing: .06em; }

/* ---------- balance check, apply rows ---------- */
.ggc-balance { max-width: 760px; }
.ggc-balance__in { padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.ggc-apply { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.ggc-apply .gg-btn--ghost > span { min-height: 42px; }

/* ---------- cart and checkout box ---------- */
.ggc-box { display: flex; flex-direction: column; gap: 14px; margin: 0 0 var(--space-4); padding: 20px 0; border-top: 1px solid var(--line); }
.ggc-box--checkout { margin-bottom: var(--space-3); }
.ggc-applied { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px solid var(--brass); border-radius: var(--radius-sm); background: var(--ground-raised); }
.ggc-chip { display: grid; place-items: center; flex: none; width: 52px; height: 34px; border-radius: 5px; background: var(--label-cream, #F8F2E6); border: 2px solid var(--gilt); }
.ggc-chip img { width: 22px; height: 22px; }
.ggc-applied__text { flex: 1; display: flex; flex-direction: column; line-height: 22px; min-width: 0; }
.ggc-saved { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px dashed var(--gilt); border-radius: var(--radius-sm); }
.ggc-total-row .ggc-credit { color: var(--emerald); font-weight: 700; }
.ggc-total-row .ggc-remove { margin-left: 10px; font-size: 17px; }

/* ---------- my account ---------- */
.ggc-account { display: flex; flex-direction: column; gap: 28px; }
.ggc-hero { position: relative; padding: 32px 36px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.ggc-hero__card { width: 260px; flex: none; }
.ggc-hero__text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; }
.ggc-panel { padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.ggc-list { display: flex; flex-direction: column; gap: 12px; }
.ggc-list__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ggc-code { font-family: var(--font-label); letter-spacing: .08em; }
.ggc-history-row td { padding-top: 0; }
.ggc-history > summary, .ggc-edit > summary { display: inline; cursor: pointer; list-style: none; }
.ggc-history > summary::-webkit-details-marker, .ggc-edit > summary::-webkit-details-marker { display: none; }
.ggc-history .gs-events { padding: 14px 0 0; }
.ggc-edit__form { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; min-width: 240px; }
.ggc-bought { margin-top: var(--space-4); display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 960px) {
  .ggc-top { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ggc-how { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .ggc-stage { padding: 44px 20px 32px; }
  .ggc-amts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ggc-row, .ggc-apply { grid-template-columns: minmax(0, 1fr); }
  .ggc-hide-sm { display: none; }
  .ggc-hero { padding: 24px 20px; }
  .ggc-hero__card { width: 100%; }
  .ggc-added { flex-direction: column; align-items: stretch; }
}
