/* Gift cards: the counter page, the lists, the page of a card, and the customer's pages (buy, order, card, look-up).
   Mobile first. The rules every system shares (lists, the frame of the customer's pages, «Link and QR») are in kit.css. */

/* the code box: on the overview and on the counter page */
.codebox .card-h { display: flex; align-items: center; gap: .5rem; }
.coderow { display: grid; gap: .6rem; align-items: end; margin-bottom: .7rem; }
.coderow input { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; } .coderow input::placeholder { letter-spacing: .04em; }   /* the base's darker sample text (4.5:1 and more) */
.codebox > p { margin: 0; }

/* lists of cards: the name on top, the amount, the state and the action under it on a phone */
.crow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem .75rem; align-items: center; }
.crow .row-main { grid-column: 1 / -1; } .crow .pill { justify-self: start; } .crow form, .crow > .btn { justify-self: end; grid-column: 2; }
.crow .row-main > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cleft { display: flex; align-items: baseline; gap: .35rem; font-variant-numeric: tabular-nums; grid-column: 1 / -1; } .cleft b { color: var(--ink); font-size: 1.05rem; } .cleft small { color: var(--muted); font-size: .8125rem; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .75rem; align-items: center; } .mrow .row-main { grid-column: 1 / -1; } .mrow .mamt { justify-items: start; }
.mrow.off .mamt b { text-decoration: line-through; color: var(--muted); }
.mamt { display: grid; justify-items: end; font-variant-numeric: tabular-nums; } .mamt b { color: var(--ink); } .mamt small { color: var(--muted); font-size: .8125rem; }

/* the box where a card is redeemed */
.redeem { border-color: var(--line-2); }
.rd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; margin-bottom: .9rem; }
.rd-who { margin: 0 0 .15rem; color: var(--muted); font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }
.rd-left { margin: 0; } .rd-left .muted { display: block; font-size: .875rem; } .rd-left b { display: block; font-size: 2.1rem; line-height: 1.1; font-weight: 750; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.redeem.st-used .rd-left b, .redeem.st-void .rd-left b, .redeem.st-expired .rd-left b { color: var(--muted); }
.rd-done { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .8rem .9rem; margin-bottom: .9rem; border: 1px solid var(--green-line); background: var(--green-soft); color: var(--green-ink); border-radius: var(--r-s); font-weight: 600; }
.rd-done span { flex: 1 1 200px; } .rd-done form { margin: 0; } .rd-done .btn { background: #fff; }
@media (max-width: 619px) { .rd-done .btn { min-height: var(--btn-m); } }   /* «Undo» at the counter: a 44 px target on a phone */
.rd-form { display: grid; gap: .8rem; } .rd-form label { margin: 0; }
.rd-form input[data-amount] { font-size: 1.5rem; font-weight: 650; height: 60px; font-variant-numeric: tabular-nums; }
.rd-form > p { margin: 0; }
.amts { gap: .45rem; } .amts .chip { min-height: 44px; font-variant-numeric: tabular-nums; }
.redeem > .note { margin: 0; }
.payform { display: grid; gap: .9rem; margin-top: .4rem; } .payform .btn { justify-self: start; }
.rd-more { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; } .rd-more form { margin: 0; }

/* forms: the amounts, «another amount», the pay method */
.amountpicks input[type=radio] + span { min-width: 76px; justify-content: center; font-size: 1rem; font-variant-numeric: tabular-nums; }
.amountpicks .otheramt { display: none; flex: 1 1 100%; margin-top: .35rem; } .amountpicks .otheramt input { max-width: 200px; }
.amountpicks:has(input[value=other]:checked) .otheramt { display: block; }
.costf input { max-width: 200px; }
.voidwhy { display: block; text-align: left; margin-bottom: .6rem; } .voidwhy em { font-style: normal; font-weight: 400; color: var(--muted); font-size: .8125rem; }

/* the page of a card */
.editor { display: grid; gap: 1.1rem; align-items: start; }
.tcode { margin: 0 0 .7rem; } .tcode code { font-size: .95rem; letter-spacing: .05em; white-space: nowrap; }
.tl li.off > span:last-child { color: var(--muted); }
.tl-undo { display: inline-block; margin-left: .5rem; }

/* public pages: what the customer of the business sees (the frame is kit.css) */
.buyform { margin-top: 1.1rem; } .buyform fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; } .buyform fieldset > * + * { margin-top: .9rem; }
.buyform legend { padding: 0; margin-bottom: .7rem; font-size: 1.05rem; font-weight: 650; color: var(--ink); letter-spacing: -.01em; text-transform: none; }
.buyform .form-foot { margin-top: 1.2rem; }
.waynote { margin: .2rem 0 0; }
.have, .sample { margin: 1.2rem 0; } .have a, .sample a { display: inline-block; padding: .65rem 0; font-weight: 600; }
.vform { display: grid; gap: .6rem; align-items: end; } .vform input { font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; } 

/* the card itself: a dark card with what is left on it and the QR code on a white tile */
.gcard { background: var(--ink); color: #fff; border-radius: var(--r-l); padding: 1.15rem 1.15rem 1rem; margin-bottom: 1.2rem; box-shadow: var(--shadow-2); }
.gcard-top { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.gcard-biz { font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcard-kind { flex: none; font-size: .72rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }   /* the business's card, not the store's colour: 9.9:1 on ink, 5:1 on a spent card */
.gcard-mid { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.gcard-mid > div:first-child { min-width: 0; }
.gcard-label { margin: 0; font-size: .8125rem; color: rgba(255, 255, 255, .72); }
.gcard-amount { margin: 0; font-size: 2.6rem; line-height: 1.1; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gcard-of { margin: .1rem 0 0; font-size: .875rem; color: rgba(255, 255, 255, .72); }
.gcard-for { margin: .7rem 0 0; font-size: .95rem; color: rgba(255, 255, 255, .86); overflow-wrap: anywhere; } .gcard-for strong { color: #fff; }
.gcard-qr { flex: none; background: #fff; border-radius: var(--r-s); padding: 6px; line-height: 0; } .gcard-qr svg { display: block; width: 132px; height: 132px; }
.gcard-code { margin: 1rem 0 0; padding-top: .8rem; border-top: 1px solid rgba(255, 255, 255, .16); font: 600 .95rem var(--mono); letter-spacing: .1em; text-align: center; white-space: nowrap; }
.gcard.st-used, .gcard.st-void, .gcard.st-expired { background: var(--card-off); box-shadow: none; }
.howbox { margin-bottom: 1.2rem; } .howbox h2 { font-size: 1rem; margin-bottom: .3rem; } .howbox p { margin: 0; }
.sec-h { font-size: 1rem; margin: 0 0 .5rem; }
.mlist { list-style: none; margin: 0 0 1.3rem; padding: 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.mlist li { display: grid; grid-template-columns: 1fr auto; gap: 0 .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line); } .mlist li span { color: var(--muted); font-size: .875rem; }
.mlist li b { color: var(--ink); } .mlist li small { grid-column: 1 / -1; color: var(--muted); font-size: .8125rem; }
.stafflink { margin: 1.6rem 0 0; text-align: center; font-size: .8125rem; } .stafflink a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }

@media (min-width: 620px) {
  .coderow { grid-template-columns: minmax(0, 1fr) auto; } .vform { grid-template-columns: minmax(0, 1fr) auto; }
  .crow { grid-template-columns: minmax(0, 1fr) 120px auto 150px; } .crow .row-main, .cleft { grid-column: auto; } .cleft { flex-direction: column; align-items: flex-end; gap: 0; } .crow .pill { justify-self: end; } .crow form, .crow > .btn { grid-column: 4; }
  .mrow { grid-template-columns: minmax(0, 1fr) auto 96px; gap: .5rem .75rem; } .mrow .row-main { grid-column: auto; } .mrow .mamt { justify-items: end; } .mrow form { justify-self: end; }
  .gcard { padding: 1.5rem 1.5rem 1.2rem; } .gcard-qr svg { width: 150px; height: 150px; }
}
@media (max-width: 380px) { .gcard-amount { font-size: 2.1rem; } .gcard-qr svg { width: 112px; height: 112px; } .gcard-code { font-size: .85rem; letter-spacing: .06em; } }
@media (min-width: 1000px) { .editor { grid-template-columns: minmax(0, 1fr) 280px; } .sharebox { position: sticky; top: calc(var(--top) + 1rem); } .redeem { max-width: 640px; } }
/* overview: what left without a sale this month; the small lines that say what only an owner does */
.statline { margin: -.45rem 0 1.15rem; } .statline a { white-space: nowrap; }
.rolehint { margin: .45rem 0 0; } .delrow.rolehint { text-align: left; display: flex; gap: .45rem; align-items: flex-start; } .delrow.rolehint .ic { flex: none; margin-top: .15em; }
/* link and QR code of the buy page (the poster itself is kit.css): this page is narrower */
.sharepage { max-width: 640px; } .sharepage .sharebtns .btn { width: 100%; }
@media print { .stafflink, .have { display: none; } .gcard { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* release 1.5: the totals for the accountant; «how was it paid?» in the dialog; the second look before paying; the payment block */
.tothead { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; } .tothead .card-h { margin: 0; }
.tottable .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; } .tottable .totsum td { background: var(--panel); }
.totrange .chips { margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.payways { display: grid; gap: .5rem; margin-top: .4rem; } .payways .btn { width: 100%; min-height: var(--btn-m); justify-content: center; }
.sumline { margin: 0 0 1rem; padding: .85rem 1rem; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.payblock { margin: 1.1rem 0; } .bearer { margin: 0 0 .9rem; }
.rd-short { margin: .9rem 0; padding: .9rem 1rem; border: 1px solid var(--amber-line, var(--line)); border-radius: var(--r); background: var(--amber-soft, var(--panel)); } .rd-short p { margin: 0 0 .7rem; }
.rd-day { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-top: .8rem; } .rd-day label { display: grid; gap: .3rem; }
.order form + .small { margin-top: .75rem; }
