/* Scoped HD customer invoice UI; existing payment styles are untouched. */
.modal.hd-invoice-modal{max-height:90dvh;overflow:auto;text-align:left}
.hd-invoice{display:grid;gap:12px;min-width:0;color:inherit}
.hd-invoice h2,.hd-invoice h3,.hd-invoice p{margin:0;line-height:1.5}
.hd-invoice .hd-choice,.hd-invoice .hd-calc,.hd-invoice .hd-address{display:grid;gap:9px;min-width:0}
.hd-invoice input,.hd-invoice select{width:100%;padding:10px;border-radius:8px;color:inherit;background:transparent;border:1px solid #8293a7;font:inherit}
.hd-invoice select option{background:#fff;color:#192638}
.hd-invoice code{display:block;overflow-wrap:anywhere;word-break:break-all;font-size:12px;user-select:all}
.hd-invoice .hd-qr{width:min(196px,100%);margin:auto;padding:4px;background:white;border-radius:6px}
.hd-qr svg{display:block;width:100%;height:auto}
.hd-invoice .hd-small,.hd-invoice small{font-size:12px;overflow-wrap:anywhere}
.hd-event{border:1px solid #8293a766;border-radius:10px;padding:10px;display:grid;gap:5px}
.hd-controls{display:flex;gap:8px;align-items:center;justify-content:space-between}
.hd-controls button{border:1px solid #8293a7;border-radius:8px;padding:8px;color:inherit;background:transparent}
.hd-invoice button:disabled{opacity:.5;cursor:not-allowed}

/* v0.20.1: visual layer only; scoped to HD modal and payment card. */
.modal.deposit-modal.hd-invoice-modal{width:min(580px,100%);max-height:calc(100dvh - 36px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;box-sizing:border-box;padding:24px}
.hd-payment-card .payment-logo{color:#76c9ff;background:rgba(56,189,248,.13);border-color:rgba(56,189,248,.2)}
.hd-invoice{gap:16px;padding-top:4px}
.hd-invoice .deposit-back{justify-self:start;margin:0;padding:4px 0;min-height:32px}
.hd-invoice h2{font-size:clamp(19px,4vw,24px);line-height:1.25;font-weight:800;letter-spacing:-.025em;padding-right:28px}
.hd-invoice h3{font-size:15px;line-height:1.35;font-weight:750}
.hd-invoice>p,.hd-invoice .hd-small{font-size:12px;line-height:1.65;opacity:.86}
.hd-invoice .hd-choice,.hd-invoice .hd-address,.hd-invoice .hd-calc,.hd-invoice .payment-rule{border:1px solid rgba(117,143,175,.22);background:rgba(100,145,185,.045);border-radius:15px;padding:15px;gap:11px}
.hd-invoice label{font-size:12px;font-weight:650;letter-spacing:.015em}
.hd-invoice input,.hd-invoice select{min-width:0;min-height:44px;box-sizing:border-box;background:rgba(100,145,185,.075);border-color:rgba(128,155,186,.42);border-radius:10px}
.hd-invoice input:focus-visible,.hd-invoice select:focus-visible,.hd-invoice button:focus-visible{outline:2px solid #48b8ee;outline-offset:3px}
.hd-invoice button:not(.deposit-back){min-height:42px;min-width:0;white-space:normal}
.hd-invoice .hd-address code,.hd-invoice .hd-event code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:rgba(100,145,185,.08);border-radius:9px;border:1px solid rgba(117,143,175,.15);padding:11px;line-height:1.6}
.hd-invoice .hd-qr{width:min(210px,100%);padding:12px;box-sizing:border-box;border-radius:12px}
.hd-invoice .hd-calc #hdi-calc-result{display:grid;gap:8px;padding:10px 0 0;border-top:1px solid rgba(117,143,175,.18);font-size:13px}
.hd-invoice #hdi-calc-result b{font-size:17px;font-variant-numeric:tabular-nums}
.hd-invoice .payment-rule{display:grid;gap:9px;font-size:12px;line-height:1.65;margin:0}
.hd-invoice .hd-event{padding:14px;gap:9px}
.hd-invoice .hd-event b{font-size:13px;font-variant-numeric:tabular-nums}
.hd-invoice .hd-event small,.hd-invoice .hd-event p{line-height:1.5;font-size:12px}
.hd-invoice .hd-controls{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;gap:10px}
.hd-invoice .hd-controls button{width:100%;border-color:rgba(128,155,186,.35)}
.hd-invoice [role="alert"]{overflow-wrap:anywhere;line-height:1.5}
@media(max-width:480px){.modal.deposit-modal.hd-invoice-modal{padding:16px;max-height:calc(100dvh - 24px);border-radius:16px}.hd-invoice{gap:12px}.hd-invoice .hd-choice,.hd-invoice .hd-address,.hd-invoice .hd-calc,.hd-invoice .payment-rule,.hd-invoice .hd-event{padding:12px}.hd-invoice .hd-qr{width:min(185px,100%)}}

/* v0.20.3: payment action and scoped receipt tracker. */
.hd-invoice .hd-paid,.hd-invoice .hd-copy{font-weight:750;letter-spacing:.005em}
.hd-invoice .hd-copy{color:#1475a5;border-color:rgba(17,117,165,.36);background:rgba(14,165,233,.09)}
html[data-theme="dark"] .hd-invoice .hd-copy{color:#8ddaff}
.hd-invoice .hd-fee-note{border:1px solid rgba(117,143,175,.25);border-radius:12px;padding:13px;display:grid;gap:5px;font-size:13px}
.hd-invoice .hd-fee-note small{opacity:.8;line-height:1.5}
.hd-invoice .hd-tracker{display:grid;gap:10px}
.hd-invoice .hd-reopen{border:1px solid rgba(120,146,175,.28);border-radius:12px;padding:12px}
.hd-invoice .hd-reopen summary{cursor:pointer;font-weight:650;font-size:13px}
.hd-invoice .hd-reopen[open]>*:not(summary){margin-top:10px}
.hd-invoice .hd-progress-event{border:1px solid rgba(120,146,175,.28);border-radius:14px;padding:14px;display:grid;gap:8px;background:rgba(100,145,185,.045)}
.hd-invoice .hd-status-head{display:flex;gap:10px;align-items:center;min-width:0}
.hd-invoice .hd-status-icon{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:50%;background:rgba(14,165,233,.12);font-weight:800;color:#1678aa}
html[data-theme="dark"] .hd-invoice .hd-status-icon{color:#8ddaff}
.hd-invoice .hd-status-head p{font-size:12px;opacity:.85}
.hd-invoice .hd-pulse{animation:hd-flow-pulse 1.6s infinite ease-in-out}
.hd-invoice .hd-success{border-color:rgba(27,151,104,.48);background:rgba(27,151,104,.075)}
.hd-invoice .hd-success .hd-status-icon{background:rgba(27,151,104,.14);color:#11734f;animation:hd-flow-pop .35s ease-out}
html[data-theme="dark"] .hd-invoice .hd-success .hd-status-icon,html[data-theme="dark"] .hd-invoice .hd-credit-amount{color:#75e3b5}
.hd-invoice .hd-credit-amount{font-size:25px;font-weight:850;color:#11734f;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.hd-invoice .hd-review{border-color:rgba(180,130,38,.5)}
.hd-invoice progress{width:100%;height:7px;accent-color:#1595d5}
@keyframes hd-flow-pulse{50%{opacity:.45}}
@keyframes hd-flow-pop{0%{transform:scale(.65)}70%{transform:scale(1.12)}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.hd-invoice .hd-pulse,.hd-invoice .hd-success .hd-status-icon{animation:none}}
