/* Gift cards: /admin/gift-cards (generator, card page, list) and the public
   /gift and /gift/{code}. Loaded as pageCss by AdminGiftCardController and
   GiftController only. */

/* ------------------------------------------------------------------ admin */
.gift-kind[hidden] { display: none; }
.gift-picks .toggle-chip { font-weight: 600; }
.gift-picks .toggle-chip .muted { font-weight: 500; }
.gift-pick.is-on { background: var(--navy-900); border-color: var(--navy-900); color: var(--lime); }
.gift-pick.is-on .muted { color: var(--cream); }
[data-paid-field][hidden] { display: none; }

details.gift-more > summary { cursor: pointer; list-style: none; }
details.gift-more > summary::-webkit-details-marker { display: none; }
details.gift-more > summary h2::after { content: "+"; margin-left: 8px; color: var(--muted); font-weight: 500; }
details.gift-more[open] > summary h2::after { content: "-"; }
details.gift-more:not([open]) > summary { border-bottom: 0; }

.gift-mini {
  background: var(--navy-900); color: #fff; border-radius: 14px; padding: 18px 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 2px, transparent 2px 60px);
}
.gift-mini-tag {
  align-self: flex-start; background: var(--lime); color: var(--navy-900); border-radius: 100px;
  font: 700 .66rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; padding: 6px 10px; margin-bottom: 4px;
}
.gift-mini-head { font: 700 1.08rem/1.25 var(--display); color: #B9E52A; }
.gift-mini-details { font-size: .84rem; color: #C9D6E3; line-height: 1.45; }

.gift-price-list { list-style: none; margin: 0; padding: 0; }
.gift-price-list li {
  display: flex; justify-content: space-between; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid var(--line); font-size: .9rem;
}
.gift-price-list li:last-child { border-bottom: 0; }
.gift-price-list b { color: var(--ink); white-space: nowrap; }

.gift-set { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.gift-set-card.is-current { border-color: var(--lime-600); box-shadow: 0 0 0 2px var(--lime-100); }
.gift-set-card .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gift-shot { display: block; border-radius: 12px; overflow: hidden; background: var(--navy-900); aspect-ratio: 16 / 10; }
.gift-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gift-code { font-family: var(--display); font-weight: 700; letter-spacing: .06em; color: var(--ink); white-space: nowrap; }
.gift-link { min-width: 0; overflow-wrap: anywhere; font-size: .85rem; }
.gift-sms {
  white-space: pre-wrap; overflow-wrap: anywhere; font: .86rem/1.55 var(--sans); color: var(--body);
  background: var(--cream-50); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 6px 0 12px;
}
.gift-sends { list-style: none; margin: 6px 0 0; padding: 0; font-size: .86rem; }
.gift-sends li { padding: 4px 0; }
.btn.gift-danger { color: var(--bad); border-color: #EBC1BE; }
.btn.gift-danger:hover { background: var(--bad-bg); }
.table-scroll { overflow-x: auto; }
.gift-table td { vertical-align: top; }

/* ----------------------------------------------------------------- public */
.gift-public .h3 { font-size: 1.15rem; margin: 0 0 8px; }
.gift-public .err { color: var(--bad); font-size: .86rem; font-weight: 500; margin: 8px 0 0; }

.gift-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.gift-option { display: flex; flex-direction: column; padding: 22px; }
.gift-option p { margin: 0 0 6px; }
.gift-option-icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--lime-50); color: var(--lime-700);
  display: grid; place-items: center; margin-bottom: 12px;
}
.gift-option-icon svg { width: 22px; height: 22px; }
.gift-option-price { font: 700 1.6rem/1.1 var(--display); color: var(--ink); margin-top: auto !important; padding-top: 8px; }

.gift-how { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; margin: 56px 0 40px; align-items: start; }
.gift-how h2 { margin: 0 0 16px; }
.gift-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.gift-steps li { line-height: 1.6; color: var(--body); }
.gift-steps b { color: var(--ink); }
.gift-facts { padding: 24px; }

.gift-lookup { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center; padding: 22px 24px; }
.gift-lookup p { margin: 0; }
.gift-lookup-row { display: flex; gap: 10px; }
.gift-lookup-row input {
  width: 190px; font: 600 1rem var(--display); letter-spacing: .06em; text-transform: uppercase;
  padding: 11px 14px; border: 1px solid var(--control-line); border-radius: 10px;
}
.gift-lookup .err { grid-column: 1 / -1; }

.gift-page-head { max-width: 760px; margin-bottom: 28px; }
.gift-page-head h1 { margin: 10px 0 8px; }
.gift-figure { margin: 0 0 28px; max-width: 900px; }
.gift-figure img {
  display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow-lg);
}
.gift-page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 900px; }
.gift-page-grid .card { padding: 24px; }
.gift-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; font-size: .95rem; }
.gift-dl dt { color: var(--muted); }
.gift-dl dd { margin: 0; color: var(--ink); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.gift-use .gift-steps { margin-bottom: 18px; }
.gift-download { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; font-size: .9rem; }
.gift-download svg { width: 16px; height: 16px; }

/* ------------------------------------------------- the order form (/gift) */
.gift-order-head { margin-bottom: 28px; }
.gift-order-alert { max-width: 760px; margin: 0 auto 20px; }
.gift-order fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.gift-choice { position: relative; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.gift-choice:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.gift-choice > input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.gift-choice:has(> input:checked) { border-color: var(--lime-600); box-shadow: 0 0 0 2px var(--lime), var(--shadow); }
.gift-choice:has(> input:focus-visible) { outline: 3px solid var(--navy-500); outline-offset: 3px; }
.gift-choice-tick {
  position: absolute; top: 16px; right: 16px; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line-2); background: var(--white); display: grid; place-items: center; color: transparent;
}
.gift-choice-tick svg { width: 15px; height: 15px; }
.gift-choice:has(> input:checked) .gift-choice-tick { background: var(--lime); border-color: var(--lime); color: var(--navy-900); }
.gift-option-title { display: block; margin: 0 0 6px; padding-right: 30px; font: 600 1.08rem/1.3 var(--display); color: var(--ink); }
.gift-option-text { display: block; margin-bottom: 6px; }
.gift-choice .tiny { display: block; }
.gift-choices.has-error > .err, .gift-choices > .err { grid-column: 1 / -1; color: var(--bad); font-weight: 500; }

.gift-amount { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; }
.gift-amount-sign { font: 700 1.6rem/1 var(--display); color: var(--ink); }
.gift-amount input {
  width: 100%; min-width: 0; font: 700 1.4rem/1.1 var(--display); color: var(--ink);
  border: 1.5px solid var(--control-line); border-radius: var(--radius-sm); padding: 7px 10px; background: var(--white);
}
.gift-amount input::placeholder { color: var(--muted); font-weight: 500; opacity: .55; }
.gift-amount.has-error input { border-color: var(--bad); }
.gift-choice .err { display: block; color: var(--bad); font-size: .82rem; margin-top: 4px; }

.gift-order-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.gift-order-fields, .gift-summary { padding: 26px; }
.gift-summary { position: sticky; top: calc(var(--header-h) + 16px); }
.gift-order-step { display: flex; align-items: center; gap: 10px; font-size: 1.08rem; margin: 0 0 16px; }
.gift-order-step span {
  width: 28px; height: 28px; border-radius: 50%; background: var(--navy-900); color: var(--lime);
  display: grid; place-items: center; font: 700 .85rem/1 var(--display); flex: none;
}
.gift-order-fields .gift-order-step:not(:first-child) { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.gift-order .opt { font-weight: 400; color: var(--muted); font-size: .8rem; }
.gift-order .field textarea { min-height: 76px; }
.gift-summary .gift-dl { margin-bottom: 8px; }
.gift-sum-total { font: 700 1.5rem/1.1 var(--display); }
.gift-sum-note { min-height: 1em; margin: 0 0 14px; }
.gift-summary .btn-block { margin-top: 6px; }
.gift-thanks { padding: 46px 30px; max-width: 760px; margin: 0 auto; }
.gift-thanks h2 { text-wrap: balance; margin: 0 0 10px; }
.gift-thanks .lede { font-weight: 600; color: var(--ink); margin: 0 0 10px; text-wrap: balance; }
.gift-thanks p.muted { margin-bottom: 24px; }
.gift-public .mb-0 { margin-bottom: 0; }

@media (max-width: 820px) {
  .gift-how, .gift-page-grid { grid-template-columns: 1fr; }
  .gift-lookup { grid-template-columns: 1fr; }
  .gift-order-grid { grid-template-columns: 1fr; }
  .gift-summary { position: static; }
}
/* Phones: nine tall cards were ~1,800px of scrolling, so each gift
   becomes a compact row: tick on the left, title and price on one line. */
@media (max-width: 620px) {
  .gift-options.gift-choices { gap: 10px; }
  .gift-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: baseline;
    padding: 14px 16px 14px 50px; }
  .gift-choice .gift-option-icon { display: none; }
  .gift-choice-tick { top: 14px; left: 14px; right: auto; }
  .gift-choice > * { grid-column: 1 / -1; }
  .gift-choice > .gift-choice-tick, .gift-choice > input[type=radio] { grid-column: auto; } /* abspos: padding box, not a grid area */
  .gift-choice .gift-option-title { grid-column: 1; grid-row: 1; padding-right: 0; margin-bottom: 2px; }
  .gift-choice .gift-option-price { grid-column: 2; grid-row: 1; font-size: 1.2rem; padding-top: 0; margin-top: 0 !important; }
  .gift-choice .gift-option-text { margin-bottom: 2px; font-size: .84rem; }
  .gift-choice .gift-amount { padding-top: 6px; }
}
@media (max-width: 420px) {
  .gift-lookup-row { flex-direction: column; }
  .gift-lookup-row input { width: 100%; }
  .gift-figure img { border-radius: 12px; }
}
