/* GradeView Max gift pages: /gift, /gift/thanks, /gift/card, /gift/manage, /redeem.
   Builds on /style.css (header, footer, type). Card themes match the gift email (api/gifts.py). */

.gift-main { padding-top: 36px; padding-bottom: 64px; }
.gift-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .gift-grid { grid-template-columns: 1.05fr 1fr; align-items: start; } }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.panel h2 { margin-top: 0; font-size: 22px; }
.field { display: block; margin: 0 0 16px; }
.field > span { display: block; color: var(--text-2); font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.field small { color: var(--muted-2); font-weight: 400; }
.field input[type=text], .field input[type=email], .field textarea, .field select {
  width: 100%; padding: 12px 13px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--bg-2); color: var(--text); font: inherit; font-size: 16px;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.code-input { font-family: var(--mono); letter-spacing: 2px; text-transform: uppercase; }

.plans { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
.plan { position: relative; display: block; cursor: pointer; border: 1px solid var(--border-2); border-radius: 12px;
  padding: 14px; background: var(--bg-2); }
.plan input { position: absolute; opacity: 0; }
.plan .pname { display: block; color: var(--text); font-weight: 700; }
.plan .pprice { display: block; font-family: var(--mono); font-size: 24px; color: var(--text); margin-top: 4px; }
.plan .pnote { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.plan:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.renew { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border-2); border-radius: 12px;
  padding: 14px; margin: 4px 0 18px; background: var(--bg-2); }
.renew input { margin-top: 5px; width: 20px; height: 20px; flex: none; }
.renew .rtitle { color: var(--text); font-weight: 600; display: block; }
.renew .rterms { font-size: 14px; color: var(--muted); display: block; margin-top: 4px; }

.btn-main { display: inline-block; width: 100%; padding: 15px 18px; border: 0; border-radius: 12px; cursor: pointer;
  background: #ffffff; color: var(--bg); font: inherit; font-weight: 700; font-size: 17px; text-align: center;
  text-decoration: none; }
.btn-main:hover, .btn-main:focus { background: #e6e9ff; color: var(--bg); }
.btn-main[disabled] { opacity: .6; cursor: wait; }
.btn-ghost { display: inline-block; padding: 11px 16px; border-radius: 10px; border: 1px solid var(--border-2);
  background: transparent; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-ghost:hover, .btn-ghost:focus { border-color: var(--accent); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.fine { font-size: 14px; color: var(--muted-2); margin-top: 14px; }
.fine li { margin: 4px 0 4px 18px; }
.err { color: #ff8a8a; font-size: 15px; margin: 8px 0 0; min-height: 1em; }
.ok { color: var(--ga); }
.note { border-left: 3px solid var(--gc); padding: 10px 14px; background: var(--panel-2); border-radius: 0 10px 10px 0;
  margin: 14px 0; font-size: 15px; }
.includes li { margin: 6px 0 6px 20px; }
.howto { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 10px 0 18px; }
.howto figure { margin: 0; }
.howto video { display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; background: #000; border: 1px solid var(--border-2); }
.howto figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The card, also used for printing. */
.gcard { --cbg: #12121a; --cacc: #6c8fff; --cink: #ffffff; position: relative; overflow: hidden;
  background: var(--cbg); color: var(--cink); border-radius: 18px; border-top: 10px solid var(--cacc);
  padding: 28px 26px; max-width: 560px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.gcard[data-o=christmas] { --cbg: #14301f; --cacc: #d6453d; --cink: #fdf6e7; }
.gcard[data-o=birthday] { --cbg: #2a1640; --cacc: #f5b83d; --cink: #fff7ea; }
.gcard[data-o=graduation] { --cbg: #101a33; --cacc: #e2b84b; --cink: #f6f3ea; }
.gcard[data-o=semester] { --cbg: #0f2a33; --cacc: #5fc4a8; --cink: #f2fbf8; }
.gcard .ribbon { position: absolute; top: 0; right: 34px; width: 22px; bottom: 0; background: var(--cacc); opacity: .9; }
.gcard .bow { position: absolute; top: 12px; right: -3px; width: 96px; height: 88px; color: var(--cacc); pointer-events: none; }
.gcard .bow .knot { filter: brightness(.82); }
.gcard .occ { color: var(--cacc); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700;
  margin: 0; padding-right: 70px; filter: brightness(1.25); }
.gcard .gtitle { font-size: 28px; font-weight: 800; line-height: 1.1; margin: 10px 0 0; padding-right: 70px; color: var(--cink); }
.gcard .tofrom { font-size: 16px; margin: 8px 0 0; opacity: .92; }
.gcard .gmsg { font-size: 16px; line-height: 1.5; margin: 14px 0 0; white-space: pre-wrap; padding-right: 70px; }
.gcard .glabel { font-size: 12px; letter-spacing: 1.5px; opacity: .8; margin: 22px 0 4px; }
.gcard .gcode { font-family: var(--mono); font-size: 25px; font-weight: 700; letter-spacing: 2px; margin: 0; }
.gcard .ghow { font-size: 14px; opacity: .88; margin: 16px 0 0; padding-right: 70px; }
.gcard .gtag { font-size: 13px; opacity: .75; margin: 6px 0 0; padding-right: 70px; }

.card-page { padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.card-page .steps { max-width: 560px; color: var(--muted); font-size: 15px; }

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .card-page { padding: 0; }
  .gcard { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; margin: 0 auto; }
  .card-page .steps { color: #222; }
}
