/* Teacher gifts (Nov 2026): /gift/ (buy), /gift/card/ (printable card),
   /gift/redeem/ (the teacher chooses). Loaded after use-shop.css and
   use-pages.css, so the pages sit on the same blue map as the shop pages. */

.gift-page { padding-bottom: 60px; }
.gift-page .hero h1 { color: #fff; }
.gift-page .hero p { color: rgba(255,255,255,.88); }
.gift-panel {
  max-width: 860px; margin: 0 auto 22px; padding: 26px 28px; border-radius: 18px;
  background: #fff; color: #20313a; box-shadow: 0 6px 22px rgba(9,34,68,.16);
}
.gift-panel h2 { margin: 0 0 6px; color: #1A3E6E; font-size: 20px; letter-spacing: -.01em; }  /* white card heading, Website Design Standards §9 */
@media (max-width: 640px) { .gift-panel h2 { font-size: 18px; } }
.gift-panel > p { margin: 0 0 14px; color: #53636b; line-height: 1.5; }
.gift-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; max-width: 860px; margin: 0 auto 22px; padding: 0; list-style: none; counter-reset: s; }
.gift-steps li { counter-increment: s; padding: 18px 18px 16px; border-radius: 14px; background: rgba(16,40,74,.38); border: 1px solid rgba(255,255,255,.22); color: #fff; line-height: 1.45; font-size: .96rem; }
.gift-steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 8px; border-radius: 50%; background: #E59E12; color: #172536; font-weight: 900; }
.gift-steps strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }

/* Gift choices */
.gift-options { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 0; padding: 0; border: 0; }
.gift-options legend { font-weight: 900; color: #183746; margin-bottom: 10px; padding: 0; }
.gift-opt { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border: 2px solid #c8d0d3; border-radius: 12px; cursor: pointer; background: #fff; }
.gift-opt input { position: absolute; opacity: 0; pointer-events: none; }
.gift-opt strong { display: block; color: #183746; font-size: 1.05rem; }
.gift-opt small { display: block; color: #53636b; margin-top: 2px; font-size: .86rem; }
.gift-opt .gift-amt { display: flex; flex-direction: column; align-items: flex-end; font-size: 1.35rem; font-weight: 900; color: #172536; line-height: 1.1; }
.gift-opt .gift-was { font-size: .9rem; font-weight: 700; color: #6a7684; }
/* Thanksgiving gift sale (through Nov 30 2026; shown only while it runs). */
.gift-sale { max-width: 860px; margin: 0 auto 18px; padding: 14px 18px; border-radius: 12px; background: #E59E12; color: #172536; font-size: 1.05rem; text-align: center; }
.gcard-tag { margin: 6px 0 0; font-size: .98rem; color: #8F5E00; font-weight: 800; }
.gift-opt:has(input:checked) { border-color: #E59E12; background: #FFF8EA; box-shadow: 0 0 0 2px #E59E12; }
.gift-opt:has(input:focus-visible) { outline: 3px solid #183746; outline-offset: 2px; }

.gift-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.gift-field { display: flex; flex-direction: column; gap: 5px; font-weight: 800; color: #183746; font-size: .95rem; }
.gift-field.wide { grid-column: 1 / -1; }
.gift-field input, .gift-field textarea {
  font: inherit; font-weight: 400; font-size: 1rem; padding: 10px 12px; border: 1.5px solid #c8d0d3; border-radius: 10px; color: #20313a; background: #fff; width: 100%;
}
.gift-field textarea { min-height: 84px; resize: vertical; }
.gift-field input:focus, .gift-field textarea:focus { outline: 3px solid #E59E12; outline-offset: 1px; border-color: #183746; }
.gift-field .gift-hint { font-weight: 400; font-size: .84rem; color: #6a7684; }

.gift-buy { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.gift-btn {
  display: inline-block; border: 0; border-radius: 999px; padding: 14px 26px; background: #183746; color: #fff;
  font: inherit; font-weight: 900; font-size: 1.05rem; cursor: pointer; text-align: center;
}
.gift-btn:hover { background: #24528F; }
.gift-btn:disabled { opacity: .55; cursor: default; }
.gift-btn:focus-visible { outline: 3px solid #E59E12; outline-offset: 3px; }
.gift-btn.alt { background: #fff; color: #183746; box-shadow: inset 0 0 0 2px #183746; }
.gift-fine { font-size: .86rem; color: #6a7684; line-height: 1.45; margin: 0; }
.gift-error { margin: 12px 0 0; color: #a3261b; font-weight: 800; }
.gift-error:empty { display: none; }
.gift-notice { max-width: 860px; margin: 0 auto 18px; padding: 14px 18px; border-radius: 12px; background: #FFF4DF; color: #183746; font-weight: 800; text-align: center; }

.gift-faq { max-width: 860px; margin: 0 auto; color: #fff; }
.gift-faq h2 { color: #fff; text-align: center; }
.gift-faq dl { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 26px; }
.gift-faq dt { font-weight: 900; }
.gift-faq dd { margin: 4px 0 0; color: rgba(255,255,255,.86); line-height: 1.5; }
.gift-faq a { color: #F6C35E; font-weight: 800; }

/* ---------- The card (preview on /gift/ and the real one on /gift/card/) ---------- */
.gcard {
  position: relative; max-width: 620px; margin: 0 auto; padding: 30px 32px 26px; border-radius: 18px; background: #fff; color: #20313a;
  border: 2px solid #183746; box-shadow: 0 8px 26px rgba(9,34,68,.2); text-align: center; overflow: hidden;
}
.gcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 10px; background: linear-gradient(90deg,#183746 0 50%,#E59E12 50% 100%); }
.gcard-logo { height: 40px; margin: 6px auto 10px; display: block; }
.gcard-for { margin: 0; font-size: .82rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: #8F5E00; }
.gcard-to { margin: 4px 0 0; font-size: clamp(1.6rem, 4vw, 2.2rem); color: #183746; line-height: 1.15; overflow-wrap: anywhere; }
.gcard-what { margin: 8px 0 0; font-size: 1.15rem; font-weight: 800; color: #20313a; }
.gcard-note { margin: 16px auto 0; max-width: 30rem; font-size: 1.08rem; font-style: italic; line-height: 1.5; color: #36434F; overflow-wrap: anywhere; white-space: pre-line; }
.gcard-note:empty { display: none; }
.gcard-from { margin: 8px 0 0; font-weight: 800; color: #183746; overflow-wrap: anywhere; }
.gcard-scan { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 20px auto 0; text-align: left; }
.gcard-qr { width: 132px; height: 132px; flex: none; }
.gcard-qr svg { width: 100%; height: 100%; display: block; }
.gcard-how { max-width: 17rem; font-size: .95rem; line-height: 1.45; color: #36434F; }
.gcard-how strong { color: #183746; }
.gcard-link { display: block; margin-top: 6px; font-weight: 900; color: #183746; word-break: break-all; }
.gcard-code { margin: 14px 0 0; font-size: .82rem; letter-spacing: .08em; color: #6a7684; }
.gcard-sample { position: absolute; top: 16px; right: -34px; transform: rotate(35deg); padding: 3px 40px; background: #E59E12; color: #172536; font-size: .72rem; font-weight: 900; letter-spacing: .1em; }
.gcard-qr-blank { display: grid; place-items: center; border: 2px dashed #c8d0d3; border-radius: 8px; color: #6a7684; font-size: .8rem; }
.gift-preview-label { text-align: center; color: #fff; font-weight: 900; margin: 6px 0 12px; }

.gift-card-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 22px auto 0; }
.gift-card-tip { max-width: 620px; margin: 14px auto 0; text-align: center; color: rgba(255,255,255,.88); line-height: 1.5; font-size: .95rem; }

/* ---------- Teacher: choose items ---------- */
.gift-pick-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.gift-count { font-weight: 900; color: #183746; font-size: 1.05rem; }
.gift-count strong { color: #8F5E00; }
.gift-theme { margin: 18px 0 6px; font-size: .8rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #8F5E00; }
.gift-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gift-item label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid #dfe5e8; border-radius: 10px; cursor: pointer; line-height: 1.35; }
.gift-item input { margin-top: 3px; width: 18px; height: 18px; accent-color: #183746; flex: none; }
.gift-item .gi-id { display: block; font-size: .75rem; font-weight: 900; color: #6a7684; letter-spacing: .06em; }
.gift-item .gi-title { font-weight: 700; color: #183746; }
.gift-item label:has(input:checked) { border-color: #183746; background: #EEF4FA; }
.gift-item label:has(input:disabled) { opacity: .5; cursor: default; }
.gift-item .gi-owned { display: block; font-size: .78rem; color: #8F5E00; font-weight: 800; }
.gift-dock {
  position: sticky; bottom: 12px; z-index: 5; max-width: 860px; margin: 0 auto; padding: 14px 18px; border-radius: 16px;
  background: #183746; color: #fff; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; box-shadow: 0 10px 28px rgba(9,34,68,.35);
}
.gift-dock .gift-count { color: #fff; }
.gift-dock .gift-count strong { color: #F6C35E; }
.gift-dock input { font: inherit; padding: 10px 12px; border-radius: 10px; border: 0; min-width: 0; width: 100%; }
.gift-dock .gift-btn { background: #E59E12; color: #172536; }
.gift-dock .gift-btn:hover { background: #F6C35E; }
.gift-dock .gift-error { grid-column: 1 / -1; margin: 0; color: #FFD1CC; }
.gift-code-form { display: flex; gap: 10px; flex-wrap: wrap; }
.gift-code-form input { flex: 1 1 220px; font: inherit; padding: 12px 14px; border: 1.5px solid #c8d0d3; border-radius: 10px; text-transform: uppercase; }

@media (max-width: 900px) { .gift-options { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 760px) {
  .gift-steps, .gift-faq dl, .gift-list { grid-template-columns: 1fr; }
  .gift-options, .gift-fields { grid-template-columns: 1fr; }
  .gift-panel { padding: 22px 18px; }
  .gcard { padding: 26px 18px 22px; }
  .gcard-scan { flex-direction: column; text-align: center; }
  .gift-dock { grid-template-columns: 1fr; }
}

/* ---------- Sponsor a classroom (Nov 2026): /sponsor/, /sponsor/request/, /sponsor/review/ ---------- */
.gift-other { max-width: 860px; margin: 0 auto 18px; text-align: center; color: rgba(255,255,255,.9); }
.gift-other a { color: #F6C35E; font-weight: 800; }
.sp-count { max-width: 860px; margin: 0 auto 18px; text-align: center; color: #fff; font-size: 1.1rem; }
.sp-count strong { color: #F6C35E; font-size: 1.35rem; }
.sp-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 860px; margin: 0 auto 22px; }
.sp-path { display: block; padding: 20px 22px; border-radius: 16px; background: #fff; color: #20313a; text-decoration: none; box-shadow: 0 6px 22px rgba(9,34,68,.16); border: 2px solid transparent; }
.sp-path strong { display: block; color: #1A3E6E; font-size: 1.1rem; margin-bottom: 4px; }
.sp-path span { color: #53636b; line-height: 1.45; }
.sp-path.is-here { border-color: #E59E12; }
.sp-path:hover, .sp-path:focus-visible { border-color: #183746; }
.gift-field select { font: inherit; font-weight: 400; font-size: 1rem; padding: 10px 12px; border: 1.5px solid #c8d0d3; border-radius: 10px; color: #20313a; background: #fff; width: 100%; }
.gift-field select:focus { outline: 3px solid #E59E12; outline-offset: 1px; border-color: #183746; }
.gift-check { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: #36434F; line-height: 1.45; cursor: pointer; }
.gift-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: #183746; flex: none; }
.sp-waiting { margin: 6px 0 0; color: #8F5E00; font-weight: 800; font-size: .92rem; }
.sp-waiting:empty { display: none; }
.sp-done { text-align: center; }
.sp-done h2 { font-size: 1.4rem; }
/* Rock's review page */
.rv-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 14px; }
.rv-facts dt { font-weight: 900; color: #183746; }
.rv-facts dd { margin: 0; overflow-wrap: anywhere; }
.rv-about { margin: 0 0 6px; padding: 12px 14px; border-radius: 10px; background: #F2F5F8; white-space: pre-line; overflow-wrap: anywhere; }
.rv-gifts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.rv-gifts label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid #dfe5e8; border-radius: 10px; cursor: pointer; line-height: 1.4; }
.rv-gifts label:has(input:checked) { border-color: #183746; background: #EEF4FA; }
.rv-gifts input { margin-top: 3px; width: 18px; height: 18px; accent-color: #183746; flex: none; }
.rv-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #E59E12; color: #172536; font-size: .75rem; font-weight: 900; }
.rv-tag.is-far { background: #dfe5e8; color: #36434F; }
.rv-small { display: block; color: #53636b; font-size: .9rem; overflow-wrap: anywhere; }
@media (max-width: 760px) { .sp-paths { grid-template-columns: 1fr; } .rv-facts { grid-template-columns: 1fr; } .rv-facts dd { margin-bottom: 6px; } }

/* Printing the card: only the card, nothing else on the page. */
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; }
  body * { visibility: hidden; }
  .gcard, .gcard * { visibility: visible; }
  .gcard { position: absolute; left: 0; right: 0; top: 0; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
