/* Customer-facing pages: pay, invoice, receipt, invitation. Uses the dashboard tokens (dash.css) and adds the merchant's colour. */
body { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.pub-top { display: flex; justify-content: flex-end; gap: 6px; padding: 14px 16px 0; }
.pub { flex: 1; width: 100%; max-width: 460px; margin: 0 auto; padding: 16px 16px 40px; }
.pub.wide { max-width: 720px; }
.pub-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-pop); overflow: hidden; }
.pub-head { padding: 22px 22px 18px; border-bottom: 1px solid var(--line); }
.pub-merchant { display: flex; align-items: center; gap: 12px; }
.pub-logo { width: 42px; height: 42px; border-radius: 11px; background: var(--brand, var(--terra-btn)); color: var(--brand-ink, #fff); display: grid; place-items: center; font-weight: 700; overflow: hidden; flex-shrink: 0; }
.pub-logo img { width: 100%; height: 100%; object-fit: cover; }
.pub-merchant b { display: block; font-size: 15px; }
.pub-merchant span { color: var(--muted); font-size: 12.5px; }
.pub-title { margin-top: 18px; color: var(--muted); }
.pub-amount { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; margin-top: 2px; }
.pub-amount small { font-size: 15px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.pub-body { padding: 20px 22px 22px; }
.pub-body .form { gap: 14px; }
.ops { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ops label { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1.5px solid var(--line-strong); border-radius: 12px; cursor: pointer; font-weight: 600; }
.ops label:has(input:checked) { border-color: var(--brand, var(--terra-btn)); background: color-mix(in srgb, var(--brand, var(--terra)) 8%, transparent); }
.ops input { accent-color: var(--brand, var(--terra)); }
.ops i { min-width: 26px; height: 26px; padding: 0 3px; border-radius: 7px; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 800; }
.ops i.mtn { background: var(--mtn); color: #1B1B1B; } .ops i.orange { background: var(--orange); color: #1B1B1B; }
/* --brand-ink: white, or dark when the business colour is too light for white text (set in public.js) */
.pay-btn { width: 100%; height: 50px; border: 0; background: var(--brand, var(--terra-btn)); color: var(--brand-ink, #fff); font-weight: 650; font-size: 15.5px; cursor: pointer; border-radius: var(--btn-r, 12px); }
.pay-btn:hover { filter: brightness(.94); }
.pay-btn[disabled] { opacity: .6; cursor: progress; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--faint); font-size: 12px; margin-top: 14px; }
.state { text-align: center; padding: 34px 22px; }
.state .big { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; }
.state .big.ok { background: var(--ok-soft); color: var(--ok); } .state .big.bad { background: var(--bad-soft); color: var(--bad); } .state .big.wait { background: var(--gold-soft); color: var(--gold-ink); }
.state h2, .state h1 { font-size: 20px; margin-bottom: 6px; }
.state p { color: var(--muted); max-width: 34ch; margin: 0 auto; }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .7; } }
.fee-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 2px 0; }
.pub-foot { text-align: center; color: var(--faint); font-size: 12px; padding: 16px; }
.pub-foot a { color: inherit; }
.inv-items { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13.5px; }
.inv-items td, .inv-items th { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; }
.inv-items .r { text-align: right; }
.receipt-row { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); gap: 12px; }
.receipt-row span:first-child { color: var(--muted); }
@media print { .pub-top, .no-print { display: none !important; } .pub-card { box-shadow: none; } }

/* Test mode: a banner nobody can miss on hosted pages, and a faint "TEST" watermark on test receipts. */
.pub-test { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; background: var(--warn-soft); color: var(--ink); border-bottom: 2px solid var(--warn); font-size: 13px; line-height: 1.4; }
.pub-test svg { color: var(--warn); flex-shrink: 0; margin-top: 1px; }
.pub-test b { display: block; font-size: 13.5px; font-weight: 700; color: var(--warn); }
.pub-test span { display: block; margin-top: 2px; color: var(--ink); }
.pub-card-test { position: relative; }
.pub-watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 0; overflow: hidden;
  font-size: 120px; font-weight: 800; letter-spacing: .12em; color: var(--warn); opacity: .08; transform: rotate(-30deg); user-select: none; }
.pub-card-test > :not(.pub-watermark) { position: relative; z-index: 1; }
@media print { .pub-test { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .pub-watermark { opacity: .12; } }

/* 0.9.13: the payer's number and name on the "check your phone" screen */
.pay-to { display: inline-flex; flex-direction: column; gap: 2px; margin: 14px auto 0; padding: 10px 16px; border-radius: 12px; background: var(--sunken); text-align: center; }
.pay-to b { font-size: 14px; }
.pay-to span { color: var(--muted); font-size: 13px; }
.pub-h1 { font-size: inherit; font-weight: inherit; letter-spacing: inherit; margin: 0; }
.pub-top .icon-btn { width: 40px; height: 40px; }
@media (max-width: 600px) { .pub-body .btn-sm { min-height: 40px; } }
