/* =====================================================================
   Gift certificates (/gift, /gift/thanks, /gift/balance, /gift/terms, /gift/c/...).
   Loaded after allegro-site.css and my-allegro.css; uses their colours and fonts.
   ===================================================================== */

.gift-hero { background: var(--al-cream); }
.gift-hero-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); align-items: center; }
.gift-offer { background: var(--al-wine); color: var(--al-cream); border: 2px solid var(--al-gold); padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 8px; }
.gift-offer .gift-kicker { color: var(--al-gold-light); }
.gift-offer strong.gift-big { font-family: var(--al-heading); font-size: clamp(28px, 3vw, 40px); line-height: 1.1; color: var(--al-white); font-weight: 600; }
.gift-kicker { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--al-gold-deep); font-weight: 700; }
.gift-lead { font-size: clamp(18px, 1.6vw, 20px); }

.gift-layout { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 40px); align-items: flex-start; }
.gift-form { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.gift-aside { flex: 1 1 300px; min-width: 0; background: var(--al-white); border: 1px solid var(--al-line); padding: 26px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px; }
@media (max-width: 900px) { .gift-aside { position: static; } .gift-hero-in { grid-template-columns: 1fr; } }

.gift-step { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gift-step > legend { font-family: var(--al-heading); font-size: clamp(26px, 2.4vw, 30px); color: var(--al-black); font-weight: 600; padding: 0; margin-bottom: 14px; }
.gift-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.gift-tab { min-height: 46px; padding: 10px 18px; border: 1px solid var(--al-grey); background: var(--al-white); color: var(--al-ink); font: inherit; font-weight: 600; cursor: pointer; }
.gift-tab[aria-pressed="true"] { border: 2px solid var(--al-wine); background: #FBF7F0; color: var(--al-wine); }

.gift-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.gift-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 12px; border: 1px solid var(--al-grey); background: var(--al-white); cursor: pointer; font: inherit; color: var(--al-text); text-align: center; }
.gift-choice[aria-pressed="true"] { border: 2px solid var(--al-wine); background: #FBF7F0; }
.gift-choice .gift-face { font-family: var(--al-heading); font-size: 38px; font-weight: 700; color: var(--al-black); line-height: 1; }
.gift-choice .gift-sub { font-size: 15px; }
.gift-save { font-size: 13px; color: #1C6F6B; font-weight: 700; }
.gift-was { text-decoration: line-through; color: var(--al-text); font-weight: 400; margin-right: 4px; }

.gift-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: end; }
@media (max-width: 600px) { .gift-grid2 { grid-template-columns: 1fr; } }
.gift-label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--al-ink); }
.gift-input { font: inherit; font-weight: 400; padding: 12px 14px; border: 1px solid var(--al-grey); background: var(--al-white); color: var(--al-ink); min-height: 48px; box-sizing: border-box; width: 100%; }
.gift-input:focus, .gift-tab:focus-visible, .gift-choice:focus-visible { outline: 2px solid var(--al-gold-deep); outline-offset: 2px; }
.gift-hint { font-weight: 400; font-size: 14px; color: var(--al-text); }
/* Small italic help line under a label, like the Discovery form's */
.gift-context { display: block; font-size: 14px; font-weight: 400; font-style: italic; color: var(--al-text); margin-top: -4px; }
.gift-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.gift-inline .gift-input { width: 170px; }

.gift-radio { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--al-line); background: var(--al-white); }
.gift-radio.on { border: 2px solid var(--al-wine); background: #FBF7F0; }
/* Only the round option button: the email and date boxes inside keep their full width */
.gift-radio > .gift-radio-dot { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--al-wine); flex: none; cursor: pointer; }
.gift-radio-body { display: flex; flex-direction: column; gap: 14px; flex: 1; min-width: 0; }
.gift-radio-body > label[for] { cursor: pointer; }

.gift-line { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; }
.gift-line.teal { color: #1C6F6B; }
.gift-total { border-top: 1px solid var(--al-line); padding-top: 12px; font-size: 20px; color: var(--al-black); }
.gift-pay { display: block; width: 100%; text-align: center; background: var(--al-wine); color: var(--al-white); border: 0; padding: 16px 20px; font: inherit; font-weight: 700; font-size: 17px; cursor: pointer; min-height: 52px; }
.gift-pay:hover { background: var(--al-wine-dark); }
.gift-pay:disabled { background: #8E6A71; cursor: not-allowed; }
.gift-fine { border-top: 1px solid var(--al-line); padding-top: 12px; font-size: 14px; line-height: 1.55; display: flex; flex-direction: column; gap: 6px; }
.gift-err { color: #A23A2C; font-weight: 600; }
.gift-note { background: var(--al-sand); padding: 14px 16px; }
.gift-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.gift-code { font-family: "Courier New", monospace; font-weight: 700; letter-spacing: 0.05em; color: var(--al-black); }
.gift-bar { height: 10px; background: var(--al-white); border: 1px solid var(--al-line); }
.gift-bar > span { display: block; height: 100%; background: var(--al-gold); }

/* The printable certificate (/gift/c/...) */
.cert-page { background: var(--al-cream); min-height: 100vh; padding: 24px 16px 48px; font-family: var(--al-body); color: var(--al-text); }
.cert-tools { max-width: 1000px; margin: 0 auto 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.cert { max-width: 1000px; margin: 0 auto; background: var(--al-white); border: 3px solid var(--al-wine); outline: 1px solid var(--al-gold); outline-offset: -12px; padding: clamp(28px, 5vw, 56px) clamp(24px, 5vw, 64px); display: flex; flex-direction: column; gap: 26px; box-sizing: border-box; }
.cert-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 20px; }
.cert-logo { height: 46px; width: auto; display: block; }
.cert-value { text-align: right; }
.cert-value strong { display: block; font-family: var(--al-heading); font-size: clamp(56px, 8vw, 88px); line-height: 1.1; font-weight: 700; color: var(--al-wine); }
.cert-value span { display: block; margin-top: 8px; }
.cert-for { font-family: var(--al-heading); font-size: clamp(38px, 5vw, 54px); line-height: 1.05; color: var(--al-black); font-weight: 600; margin: 0; }
.cert-msg { font-family: var(--al-heading); font-style: italic; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.35; color: var(--al-ink); white-space: pre-line; margin: 0; }
.cert-bottom { display: flex; flex-wrap: wrap; gap: 28px; align-items: stretch; }
.cert-codebox { background: var(--al-cream); padding: 14px 18px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.cert-codebox .gift-code { font-size: clamp(22px, 3vw, 30px); }
.cert-expires { font-size: 15px; font-weight: 700; color: var(--al-black); text-transform: none; }
.cert-how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; font-size: 15px; line-height: 1.5; }
@media (max-width: 640px) { .cert-how { grid-template-columns: 1fr; } .cert-value { text-align: left; } }
.cert-qr { width: 140px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; text-align: center; }
.cert-qr svg { width: 128px; height: 128px; display: block; }
.cert-small { border-top: 1px solid var(--al-line); padding-top: 12px; font-size: 12px; line-height: 1.5; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.cert-void { background: #FBF1EF; color: #A23A2C; font-weight: 700; padding: 10px 14px; }
@media print {
  @page { size: letter landscape; margin: 0.4in; }
  .cert-page { background: #fff; padding: 0; min-height: 0; }
  .cert-tools { display: none; }
  .cert { max-width: none; border-width: 3px; break-inside: avoid; }
}
