/* Collection screens follow docs/design/split-payments-prototype.html. */
html:has(body[data-route="paymentScreen"]){height:100%;overflow:hidden;overscroll-behavior:none}
body[data-route="paymentScreen"]{position:fixed;inset:0;height:var(--billing-height,100dvh);min-height:0;overflow:hidden;overscroll-behavior:none;padding:0;display:block}
body[data-route="paymentScreen"]>.site-header,body[data-route="paymentScreen"]>#appNav,body[data-route="paymentScreen"]>#publicFooter{display:none!important}
body[data-route="paymentScreen"]>#main{min-height:0;height:100%;overflow:hidden;margin:0;padding:0;max-width:none}
body[data-route="paymentScreen"]>#storageNotice{position:fixed;top:0;left:0;right:0;z-index:30;font-size:11px;padding:5px 12px}
#paymentScreen.app-page{height:100%;min-height:0;max-height:100%;overflow:hidden;display:flex;flex-direction:column;padding:0;max-width:none;margin:0;background:var(--paper)}
.collection-icons{position:absolute;pointer-events:none}
#paymentScreen .collection-header{flex:none;display:grid;grid-template-columns:44px minmax(0,1fr) 66px;align-items:center;gap:4px;min-height:65px;padding:calc(9px + env(safe-area-inset-top,0px)) 15px 10px;border-bottom:1px solid var(--line);width:100%;max-width:430px;margin:0 auto}
.collection-back{display:grid;place-items:center;width:44px;min-height:44px;background:none;border:0;border-radius:8px;color:var(--ink);cursor:pointer}
.collection-back svg{width:19px;height:19px}
#paymentScreen .collection-shop{min-width:0}
#paymentScreen .collection-shop h1{font-size:14px;line-height:1.3;font-weight:600;letter-spacing:-.25px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}
.collection-shop p{font-size:10px;line-height:1.4;color:var(--muted);margin:4px 0 0}
#paymentLanguage{width:66px;border:0;background:transparent;color:var(--ink);min-height:44px;padding:4px;font-size:12px}
#paymentScreen .collection-screen{flex:1;min-height:0;display:flex;flex-direction:column;width:100%;max-width:390px;margin:0 auto;padding:24px 24px calc(18px + env(safe-area-inset-bottom,0px));overflow:hidden}
#paymentScreen .collection-payment{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;overflow:hidden}
#paymentScreen .payment-heading{flex:none;text-align:center;width:100%}
#paymentScreen .screen-title{font-size:15px;line-height:1.3;font-weight:550;letter-spacing:-.2px;margin:0;color:var(--ink)}
#paymentScreen #payAmount{font-size:49px;line-height:1.13;letter-spacing:-.055em;font-weight:550;margin:8px 0 0;white-space:nowrap;font-variant-numeric:tabular-nums}
#paymentScreen #payAmount.collection-long-amount{font-size:clamp(28px,8vw,38px)}
#paymentScreen #splitContext{font-size:12px;line-height:1.5;color:var(--muted);margin:7px 0 0}
#paymentScreen .split-progress{flex:none;display:flex;align-items:center;gap:10px;width:100%;margin:0 0 25px;color:var(--muted)}
#paymentScreen .progress-step{display:flex;gap:7px;align-items:center;font-size:11px;line-height:1.3;white-space:nowrap}
#paymentScreen .step-dot{display:grid;place-items:center;flex:none;width:23px;height:23px;border:1px solid #c9d3c4;border-radius:50%;font-size:10px}
#paymentScreen .progress-line{height:1px;background:#cbd5c6;flex:1;min-width:8px}
#paymentScreen .progress-step[aria-current="step"]{color:var(--accent);font-weight:600}
#paymentScreen .progress-step[aria-current="step"] .step-dot{border-color:var(--accent);background:var(--accent-soft)}
#paymentScreen .progress-step.complete .step-dot{background:var(--accent);border-color:var(--accent);color:white}
#paymentScreen .step-dot svg{width:12px;height:12px}
#paymentScreen .collection-qr{flex:1 1 238px;min-height:0;max-height:238px;width:100%;max-width:238px;margin:21px auto 8px;display:flex;justify-content:center;align-items:center}
#paymentScreen #qr{display:block;flex:none;width:auto;height:100%;max-width:100%;max-height:100%;aspect-ratio:1;object-fit:contain;background:white;border:1px solid #e1e6dd;border-radius:12px;padding:15px;margin:0;box-sizing:border-box}
#paymentScreen .qr-caption{flex:none;display:block;max-width:100%;min-height:18px;text-align:center;color:var(--muted);font-size:10px;line-height:1.5;border:0;background:none;padding:0;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#paymentScreen #payVpa{font:inherit;color:inherit;margin:0}
#paymentScreen .split-first-mark{flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;border-bottom:1px solid var(--line);padding:0 0 12px;margin:21px 0 0;font-size:12px;line-height:1.4;text-align:left}
#paymentScreen .split-first-mark>span{display:flex;align-items:center;gap:7px;color:var(--accent)}
#paymentScreen .split-first-mark svg{width:14px;height:14px;flex:none}
#paymentScreen .split-first-mark strong{font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
#paymentScreen .collection-actions{flex:none;min-height:0;margin:0;padding:17px 0 0;border:0;background:transparent}
#paymentScreen .payment-actions{position:static;display:block;inset:auto;margin:0;padding:0;border:0;background:transparent}
#paymentScreen .collection-check-note{display:flex;gap:10px;align-items:center;margin:20px 0 14px;padding:12px;background:var(--accent-soft);border-radius:9px}
#paymentScreen .collection-check-note svg{width:20px;height:20px;flex:none;color:var(--accent)}
#paymentScreen .collection-check-note p{font-size:12px;line-height:1.5;color:#405647;margin:0}
#paymentScreen .primary,#paymentScreen .secondary,.split-dialog>.primary,.split-dialog>.secondary{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;border:1px solid var(--ink);border-radius:10px;padding:12px;font-size:13px;font-weight:600;line-height:1.4;background:var(--ink);color:white;margin:0;cursor:pointer}
#paymentScreen .primary svg,#paymentScreen .secondary svg{height:17px;width:17px;flex:none}
#paymentScreen .payment-actions>.primary{min-height:52px}
#paymentScreen .secondary{background:none;color:var(--accent);border-color:#cbd5c6;margin-top:9px}
#paymentScreen .primary:disabled,#paymentScreen .secondary:disabled{opacity:.45;cursor:default}
#paymentScreen .textbutton{display:block;width:100%;min-height:44px;border:0;background:none;color:var(--accent);padding:10px 5px;font-size:12px;line-height:1.4;text-align:center;margin:0}
#paymentScreen .collection-action-note{font-size:10px;color:var(--muted);text-align:center;line-height:1.5;margin:10px 0 0}
#paymentScreen .split-utility{display:flex;justify-content:center;gap:13px;margin-top:7px}
#paymentScreen .split-utility #splitUndo{width:auto;font-size:11px;padding-inline:0}
#paymentScreen .split-summary{flex:1;min-height:0;display:flex;flex-direction:column;max-width:390px;width:100%;margin:0 auto;padding:24px 24px calc(18px + env(safe-area-inset-bottom,0px));background:var(--paper);overflow:hidden}
#paymentScreen .split-status-icon{display:grid;place-items:center;flex:none;width:58px;height:58px;margin:16px auto 22px;border-radius:50%;background:var(--accent-soft);color:var(--accent)}
#paymentScreen .split-status-icon svg{width:28px;height:28px}
#paymentScreen .collection-status-heading{text-align:center;flex:none}
#paymentScreen .collection-status-heading h2{font-size:25px;line-height:1.18;letter-spacing:-.7px;font-weight:550;margin:0}
#paymentScreen .split-summary-amount{font-size:41px;line-height:1.13;letter-spacing:-.055em;font-weight:550;white-space:nowrap;font-variant-numeric:tabular-nums;margin:15px 0 0}
#paymentScreen .collection-status-heading p:not(.split-summary-amount){font-size:12px;line-height:1.6;color:var(--muted);margin:11px auto 0;max-width:28ch}
.split-tag{display:inline-block;background:#f3eadb;color:#79511e;border-radius:5px;padding:5px 9px;font-size:10px;margin-top:14px}
#paymentScreen .split-receipt-rows{flex:none;margin:30px 0 0;text-align:left}
.split-receipt-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:17px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.4}
.split-receipt-row small{display:block;font-size:10px;color:var(--muted);margin-top:5px}
.split-receipt-row strong{font-size:15px;font-weight:550;white-space:nowrap;font-variant-numeric:tabular-nums}
.split-receipt-row:last-child{font-weight:600;border-bottom:0}
.received-tag{display:inline-flex;gap:5px;align-items:center;color:var(--accent);font-size:10px}
.received-tag svg{width:12px;height:12px}
#paymentScreen .summary-actions{margin-top:auto;padding-top:17px;flex:none}
#paymentScreen .split-error{flex:none;color:var(--danger);font-size:12px;line-height:1.4;margin:8px auto 0;max-width:390px;padding:10px;background:#f6eae6;border-radius:8px}
.split-dialog{margin:auto auto 0;border:1px solid var(--line);border-radius:20px 20px 0 0;padding:21px 24px calc(25px + env(safe-area-inset-bottom,0px));max-width:430px;width:100%;max-height:var(--billing-height,100dvh);overflow:hidden;background:var(--paper);color:var(--ink);box-shadow:var(--shadow)}
.split-dialog::backdrop{background:#20292352}
.collection-grabber{width:34px;height:4px;background:#cad3c4;border-radius:3px;margin:0 auto 20px}
.split-dialog h2{font-size:23px;line-height:1.2;letter-spacing:-.7px;font-weight:600;margin:0}
.split-dialog>.helper{font-size:13px;line-height:1.65;color:var(--muted);margin:13px 0 0}
.split-dialog-amounts{display:flex;gap:10px;margin:21px 0}
.split-dialog-amounts .split-receipt-row{flex:1;min-width:0;display:block;background:var(--accent-soft);padding:15px 13px;border:0;border-radius:9px;font-size:11px;color:var(--muted);font-weight:400}
.split-dialog-amounts strong{display:block;font-size:23px;font-weight:550;letter-spacing:-.7px;margin-top:8px;color:var(--ink)}
.split-dialog-amounts:empty{display:none}
.split-dialog-warning{display:flex;gap:9px;padding:12px;border-radius:9px;background:#f3eadb;color:#79511e;margin:18px 0}
.split-dialog-warning svg{height:19px;width:19px;flex:none}
.split-dialog-warning p{font-size:12px;line-height:1.6;margin:0}
.split-dialog>.primary{margin-top:22px}
.split-dialog>.textbutton{display:block;width:100%;min-height:44px;border:0;background:none;color:var(--accent);padding:10px 5px;font-size:12px;margin-top:4px}
#paymentOptionsDialog #customerBreakdown{margin:12px 0 0}
#paymentOptionsDialog>.secondary{display:flex;justify-content:center;width:100%;min-height:48px;margin-top:12px}
.split-pending-history{margin:0 0 30px;padding:22px;background:var(--accent-tint);border:1px solid var(--line);border-radius:12px}
.split-pending-history h2{font-size:19px;letter-spacing:-.02em;margin-bottom:8px}
.split-pending-item{display:grid;grid-template-columns:1fr auto;column-gap:15px;row-gap:7px;padding:17px 0;border-top:1px solid var(--line)}
.split-pending-item strong{font-size:17px;grid-column:1;font-variant-numeric:tabular-nums}
.split-pending-item p{font-size:12px;color:var(--muted);grid-column:1}
.split-pending-item button{grid-column:2;grid-row:1/3;min-height:44px;align-self:center;padding:8px 12px;border:1px solid #cbd5c6;border-radius:10px;background:none;color:var(--accent);font-size:12px}
@media(max-height:700px){
 #paymentScreen .collection-header{min-height:55px;padding-top:env(safe-area-inset-top,0px);padding-bottom:0}
 #paymentScreen .collection-screen,#paymentScreen .split-summary{padding-top:14px;padding-bottom:10px}
 #paymentScreen #payAmount{font-size:42px;margin-top:5px}
 #paymentScreen #splitContext{font-size:11px;margin-top:5px}
 #paymentScreen .split-progress{margin-bottom:10px}
 #paymentScreen .collection-qr{margin-top:10px;margin-bottom:4px}
 #paymentScreen #qr{padding:8px}
 #paymentScreen .collection-actions{padding-top:8px}
 #paymentScreen .collection-check-note{margin:8px 0;padding:8px}
 #paymentScreen .primary,#paymentScreen .secondary,#paymentScreen .payment-actions>.primary{min-height:44px;padding:9px;font-size:12px}
 #paymentScreen .collection-action-note{font-size:9px;margin-top:5px}
 #paymentScreen .split-first-mark{margin-top:8px;padding-bottom:8px;font-size:11px}
 #paymentScreen .split-status-icon{margin-top:4px;margin-bottom:15px}
 #paymentScreen .split-receipt-rows{margin-top:20px}
 #paymentScreen .split-receipt-row{padding:12px 0}
}
@media(max-height:600px){
 #paymentScreen .collection-header{min-height:55px;padding-top:env(safe-area-inset-top,0px);padding-bottom:0}
 #paymentScreen .collection-screen,#paymentScreen .split-summary{padding-top:10px;padding-bottom:8px}
 #paymentScreen #payAmount{font-size:42px;margin-top:5px}
 #paymentScreen .split-progress{margin-bottom:10px}
 #paymentScreen .collection-qr{margin-top:10px;margin-bottom:4px}
 #paymentScreen .collection-actions{padding-top:6px}
 #paymentScreen .collection-check-note{margin:8px 0;padding:8px}
 #paymentScreen .primary,#paymentScreen .secondary,#paymentScreen .payment-actions>.primary{min-height:44px;padding:9px;font-size:12px}
 #paymentScreen .collection-action-note{font-size:9px;margin-top:5px}
 #paymentScreen .split-status-icon{width:46px;height:46px;margin:0 auto 10px}
 #paymentScreen .split-status-icon svg{width:24px;height:24px}
 #paymentScreen .collection-status-heading h2{font-size:23px}
 #paymentScreen .split-summary-amount{font-size:37px;margin-top:10px}
 #paymentScreen .collection-status-heading p:not(.split-summary-amount){margin-top:6px;font-size:11px}
 #paymentScreen .split-receipt-rows{margin-top:12px}
 #paymentScreen .split-receipt-row{padding:9px 0}
 #paymentScreen .summary-actions{padding-top:10px}
 .split-dialog{padding:15px 20px}
 .collection-grabber{margin-bottom:14px}
 .split-dialog-amounts{margin:15px 0}
 .split-dialog-warning{margin:12px 0}
 .split-dialog>.primary{margin-top:15px;min-height:44px}
}
@media(max-width:380px){
 #paymentScreen .collection-screen,#paymentScreen .split-summary{padding-inline:20px}
 #paymentScreen #payAmount{font-size:clamp(38px,12vw,45px)}
 #paymentScreen .primary{font-size:12px}
 .split-dialog-amounts strong{font-size:21px}
}
@media(max-height:500px) and (min-width:600px){
 #paymentScreen .collection-header{max-width:800px}
 #paymentScreen .collection-screen{max-width:800px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;padding:10px 24px}
 #paymentScreen .collection-actions{align-self:center;padding:0}
 #paymentScreen .collection-check-note{margin-top:0}
 #paymentScreen .split-summary{max-width:760px;display:grid;grid-template-columns:1fr 1fr;column-gap:30px;align-content:center}
 #paymentScreen .split-status-icon{grid-column:1;grid-row:1}
 #paymentScreen .collection-status-heading{grid-column:1;grid-row:2}
 #paymentScreen .split-receipt-rows{grid-column:2;grid-row:1/3;margin:0}
 #paymentScreen .summary-actions{grid-column:1/-1}
}
@media(prefers-reduced-motion:no-preference){#paymentScreen .collection-payment>*{animation:collection-appear .16s ease-out}@keyframes collection-appear{from{opacity:.6}to{opacity:1}}}
