/* Balance and Payments (js/pages_balance.js), Sam Peer's approved demo of
   15 Nov 2026: "black pay card with the wordmark, Veyora Brand font, #EC5B1F
   accents only, white Pay button. No other fonts or colors."

   THE WHOLE DESIGN IS HERE, in one file, and its colours and type in the
   tokens just below: matching the demo again later means editing this file
   only. Black, white, the greys between them and the one accent; the brand
   font everywhere (--brand-font, store.css). */
:root{
  --bp-black:#000;
  --bp-white:#fff;
  --bp-accent:#EC5B1F;              /* Sam's demo: overdue days, the only accent */
  --bp-ink:#111;
  --bp-muted:#6f6f6f;
  --bp-soft:#9a9a9a;
  --bp-line:#ececec;
  --bp-panel:#fff;
  --bp-page:#fafafa;
  --bp-card-line:#2a2a2a;           /* the black card's own rules and borders */
  --bp-card-muted:#a3a3a3;
  --bp-font:var(--brand-font);
  --bp-radius:14px;
  --bp-radius-sm:10px;
}

.bp{font-family:var(--bp-font);color:var(--bp-ink);max-width:1120px;margin:0 auto;padding:8px 0 24px}
.bp-loading{padding:40px 0;color:var(--bp-muted)}
.bp-grid{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:28px;align-items:start}
.bp-main{min-width:0}
.bp-side{display:flex;flex-direction:column;gap:14px;position:sticky;top:16px}

/* heading: eyebrow, title, billing contacts */
.bp-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin:8px 0 18px}
.bp-eyebrow{font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--bp-soft);margin-bottom:6px;overflow-wrap:anywhere}
.bp-title{font-family:var(--bp-font);font-weight:400;font-size:32px;line-height:1.1;margin:0;letter-spacing:-.01em}
.bp-head-links{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--bp-muted);flex-wrap:wrap}

/* links and small buttons */
.bp-link{background:none;border:0;padding:4px 0;font:inherit;font-size:12.5px;color:var(--bp-ink);text-decoration:underline;text-underline-offset:3px;cursor:pointer;min-height:32px}
.bp-link.is-quiet{text-decoration:none;color:var(--bp-muted)}
.bp-link:disabled{opacity:.5;cursor:default}
.bp-btn-dark{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 22px;border-radius:999px;border:0;background:var(--bp-black);color:var(--bp-white);font:inherit;font-weight:600;font-size:14px;cursor:pointer;text-align:center}
.bp-btn-dark:disabled{opacity:.45;cursor:default}
.bp-btn-line{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 16px;border-radius:999px;border:1px solid var(--bp-line);background:var(--bp-white);color:var(--bp-ink);font:inherit;font-size:13px;font-weight:600;cursor:pointer;text-align:left}
.bp-badge{display:inline-block;font-size:9.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;padding:3px 7px;border-radius:999px;background:var(--bp-black);color:var(--bp-white);white-space:nowrap}
.bp-badge.is-light{background:var(--bp-white);color:var(--bp-black)}
.bp-badge.is-quiet{background:var(--bp-line);color:var(--bp-ink)}
.bp-tag{display:inline-block;margin-left:0;margin-right:6px;font-size:10.5px;color:var(--bp-muted);border:1px solid var(--bp-line);border-radius:6px;padding:1px 6px;white-space:nowrap}
.bp-sub{display:block;font-size:12px;color:var(--bp-muted);margin-top:2px;overflow-wrap:anywhere}
.bp-fine{font-size:11.5px;color:var(--bp-muted);line-height:1.5;margin:10px 0 0}
.bp-empty{color:var(--bp-muted);font-size:13.5px;padding:18px 4px;margin:0}
.bp-notice{border:1px solid var(--bp-line);border-radius:var(--bp-radius-sm);padding:12px 16px;margin:0 0 16px;font-size:13.5px;background:var(--bp-white)}
.bp-notice.is-good{border-color:var(--bp-black)}

/* tabs */
.bp-tabs-row{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--bp-line);margin-bottom:12px;flex-wrap:wrap}
.bp-tabs{display:flex;gap:22px;overflow-x:auto;scrollbar-width:none}
.bp-tabs::-webkit-scrollbar{display:none}
.bp-tab{background:none;border:0;border-bottom:2px solid transparent;padding:10px 0 9px;font:inherit;font-size:13px;color:var(--bp-muted);cursor:pointer;white-space:nowrap;min-height:40px}
.bp-tab.is-on{color:var(--bp-ink);border-bottom-color:var(--bp-black)}
.bp-count{color:var(--bp-soft);margin-left:2px}
.bp-dl{white-space:nowrap}

/* the invoice table */
.bp-panel{background:var(--bp-panel);border:1px solid var(--bp-line);border-radius:var(--bp-radius);padding:6px 16px 10px}
.bp-table{width:100%;border-collapse:collapse;font-size:13px}
.bp-table th{font-size:10px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--bp-soft);text-align:left;padding:14px 8px 10px;border-bottom:1px solid var(--bp-line)}
.bp-table td{padding:13px 8px;border-bottom:1px solid var(--bp-line);vertical-align:middle;overflow-wrap:anywhere}
.bp-table tr:last-child td{border-bottom:0}
.bp-num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.bp-c-check{width:28px;padding-right:0!important}
.bp-check{width:18px;height:18px;accent-color:var(--bp-black);cursor:pointer;margin:0;vertical-align:middle}
/* A thumb-sized target around each box. */
.bp-check-hit{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;margin:-11px -8px -11px -12px;cursor:pointer}
.bp-inv{background:none;border:0;padding:0;font:inherit;font-weight:600;color:var(--bp-ink);cursor:pointer;text-align:left}
.bp-inv:hover{text-decoration:underline;text-underline-offset:3px}
.bp-inv-text{font-weight:600}
.bp-late{color:var(--bp-accent)}
.bp-muted{color:var(--bp-muted)}
.bp-credit td{color:var(--bp-muted)}
.bp-credit .bp-num{color:var(--bp-ink)}
.bp-credit-kind{font-size:12px;color:var(--bp-muted);margin-left:6px}
.bp-issued-phone{display:none}
.bp-more{font-size:12px;color:var(--bp-muted);margin:10px 4px 2px}
.bp-subhead{font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--bp-soft);margin:18px 0 6px}
.bp-click{cursor:pointer}
.bp-plan-head{padding:14px 8px 4px}
.bp-plan-acts{margin:8px}

/* the account figures under the tabs */
.bp-account{margin-top:18px}
.bp-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin:0}
.bp-facts div{border:1px solid var(--bp-line);border-radius:var(--bp-radius-sm);padding:12px 14px;background:var(--bp-white)}
.bp-facts dt{font-size:11px;color:var(--bp-muted);margin-bottom:4px}
.bp-facts dd{margin:0;font-size:15px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.bp-instructions{font-size:13px;color:var(--bp-muted);white-space:pre-line;overflow-wrap:anywhere;margin:0}

/* the black pay card */
.bp-card{background:var(--bp-black);color:var(--bp-white);border-radius:var(--bp-radius);padding:22px 18px 16px}
.bp-card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
.bp-wordmark{height:12px;width:auto;display:block}
.bp-eyebrow-dark{font-size:9.5px;letter-spacing:.2em;text-transform:uppercase;color:var(--bp-card-muted)}
.bp-big{font-family:var(--bp-font);font-weight:300;font-size:40px;line-height:1.05;letter-spacing:-.02em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.bp-big-sub{font-size:11.5px;color:var(--bp-card-muted);margin:6px 0 16px;overflow-wrap:anywhere}
.bp-opts{display:flex;flex-direction:column;gap:7px;border-top:1px solid var(--bp-card-line);padding-top:12px}
.bp-opt,.bp-pm{display:flex;align-items:center;gap:10px;border:1px solid var(--bp-card-line);border-radius:var(--bp-radius-sm);padding:10px 12px;cursor:pointer;min-height:48px}
.bp-opt.is-on,.bp-pm.is-on{border-color:var(--bp-white)}
.bp-opt.is-off{opacity:.45;cursor:default}
.bp-opt input[type=radio],.bp-pm input[type=radio]{appearance:none;-webkit-appearance:none;width:14px;height:14px;border:1px solid var(--bp-card-muted);border-radius:50%;margin:0;flex:0 0 auto;display:grid;place-items:center;cursor:pointer}
.bp-opt input[type=radio]:checked,.bp-pm input[type=radio]:checked{border-color:var(--bp-white);background:radial-gradient(circle,var(--bp-white) 0 3px,transparent 3.5px)}
.bp-opt input[type=radio]:focus-visible,.bp-pm input[type=radio]:focus-visible{outline:2px solid var(--bp-white);outline-offset:2px}
.bp-opt-text,.bp-pm-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.bp-opt-text b,.bp-pm-text b{font-weight:500;font-size:12.5px}
.bp-opt-text span,.bp-pm-text span{font-size:10.5px;color:var(--bp-card-muted)}
.bp-opt-amt{font-size:12.5px;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--bp-white)}
.bp-opt:not(.is-on) .bp-opt-amt{color:var(--bp-card-muted)}
.bp-amount-in{width:110px;max-width:42vw;background:transparent;border:0;border-bottom:1px solid var(--bp-card-muted);color:var(--bp-white);font:inherit;font-size:16px;text-align:right;padding:2px 0}
.bp-amount-in:focus{outline:none;border-bottom-color:var(--bp-white)}
.bp-amount-in::placeholder{color:var(--bp-card-muted)}
.bp-paywith-h{font-size:9.5px;letter-spacing:.2em;text-transform:uppercase;color:var(--bp-card-muted);margin:16px 0 8px}
.bp-paywith{display:flex;flex-direction:column;gap:7px}
.bp-pm-kind{font-size:10.5px;color:var(--bp-card-muted)}
.bp-save{display:flex;align-items:center;gap:8px;font-size:12px;margin-top:10px;cursor:pointer}
.bp-card .bp-save{color:var(--bp-card-muted)}
.bp-save input{accent-color:var(--bp-black);width:15px;height:15px}
.bp-card .bp-save input{accent-color:var(--bp-white)}
.bp-pay{display:block;width:100%;min-height:46px;margin-top:14px;border:0;border-radius:999px;background:var(--bp-white);color:var(--bp-black);font:inherit;font-weight:600;font-size:14px;cursor:pointer;text-align:center;padding:6px 16px}
.bp-pay:disabled{opacity:.4;cursor:default}
/* Apple's own button where Safari draws it; a black pill elsewhere. */
.bp-apple{display:block;width:100%;min-height:46px;margin-top:8px;border:1px solid var(--bp-card-line);border-radius:999px;background:var(--bp-black);color:var(--bp-white);font:inherit;font-weight:600;font-size:14px;cursor:pointer}
@supports (-webkit-appearance:-apple-pay-button){
  .bp-apple{-webkit-appearance:-apple-pay-button;-apple-pay-button-type:plain;-apple-pay-button-style:black;font-size:0}
}
.bp-apple:disabled{opacity:.4;cursor:default}
.bp-pci{display:flex;align-items:center;justify-content:center;gap:6px;font-size:10.5px;color:var(--bp-card-muted);margin:12px 0 0;text-align:center}
.bp-pci.is-light{color:var(--bp-muted)}
.bp-card-note{font-size:13px;color:var(--bp-card-muted);border-top:1px solid var(--bp-card-line);padding-top:14px;margin:0}

/* the white cards beside it: AutoPay, payment methods */
.bp-side-card{background:var(--bp-white);border:1px solid var(--bp-line);border-radius:var(--bp-radius);padding:14px 16px}
.bp-side-h{font-size:13px;font-weight:600;margin-bottom:8px}
.bp-switch-row{display:flex;align-items:center;justify-content:space-between;gap:14px;cursor:pointer}
.bp-switch-text{display:flex;flex-direction:column;gap:3px;font-size:13px}
.bp-switch-text span{font-size:11.5px;color:var(--bp-muted)}
.bp-switch{appearance:none;-webkit-appearance:none;width:42px;height:24px;border-radius:999px;background:var(--bp-line);position:relative;flex:0 0 auto;cursor:pointer;margin:0;transition:background .15s}
.bp-switch::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:var(--bp-white);box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .15s}
.bp-switch:checked{background:var(--bp-black)}
.bp-switch:checked::after{transform:translateX(18px)}
.bp-switch:disabled{opacity:.45;cursor:default}
.bp-switch:focus-visible{outline:2px solid var(--bp-black);outline-offset:2px}
.bp-methods{list-style:none;margin:0;padding:0}
.bp-methods li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--bp-line);font-size:13px}
.bp-methods li:last-child{border-bottom:0}
.bp-method-name{min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.bp-method-name .bp-sub{flex-basis:100%;margin:0}
.bp-method-acts{display:flex;gap:12px;flex:0 0 auto}
.bp-method-add{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}

/* the payment plan dialog ("Spread your balance") and billing contacts */
.bp-plan,.bp-contacts{font-family:var(--bp-font);max-width:420px}
.modal:has(.bp-plan),.modal:has(.bp-contacts){border-radius:20px;padding:26px 28px 22px;max-width:440px}
.bp-plan-title{font-family:var(--bp-font);font-weight:400;font-size:26px;line-height:1.15;margin:0 0 16px;letter-spacing:-.01em;padding-right:44px}
.bp-seg{display:grid;grid-template-columns:repeat(auto-fit,minmax(62px,1fr));gap:6px;margin-bottom:12px}
.bp-seg-btn{min-height:40px;border:1px solid var(--bp-line);border-radius:var(--bp-radius-sm);background:var(--bp-white);font:inherit;font-size:12.5px;color:var(--bp-ink);cursor:pointer;padding:4px 2px}
.bp-seg-btn.is-on{background:var(--bp-black);border-color:var(--bp-black);color:var(--bp-white)}
.bp-sched{width:100%;border-collapse:collapse;font-size:13px;margin-bottom:12px}
.bp-sched td{padding:10px 0;border-top:1px solid var(--bp-line)}
.bp-sched tfoot td{border-top:1px solid var(--bp-black);font-weight:600}
.bp-plan-note{font-size:12px;color:var(--bp-muted);line-height:1.5;margin:0 0 14px}
.bp-plan-pm{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--bp-muted);margin-bottom:10px}
.bp-plan-pm select{font:inherit;font-size:16px;padding:8px;border:1px solid var(--bp-line);border-radius:var(--bp-radius-sm)}
.bp-plan-go{width:100%}
.bp-contact-list{list-style:none;margin:12px 0;padding:0}
.bp-contact-list li{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--bp-line);font-size:13px}
.bp-contact-acts{display:flex;gap:12px;flex:0 0 auto}
.bp-contact-form{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.bp-contact-form label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--bp-muted)}
.bp-contact-form label.bp-save{flex-direction:row;color:var(--bp-ink)}
.bp-contact-form input:not([type=checkbox]),.bp-contact-form select{font:inherit;font-size:16px;padding:9px 10px;border:1px solid var(--bp-line);border-radius:var(--bp-radius-sm);color:var(--bp-ink)}

/* a Review and pay link that no longer works */
.bp-expired{max-width:460px;padding:32px 16px 0}
.bp-expired .bp-btn-dark{margin:14px 0 4px}
.bp-expired a{color:var(--bp-ink);text-decoration:underline;text-underline-offset:3px;display:inline-block;padding:10px 0}

/* the phone: one column, the balance on top, a bar fixed at the bottom */
.bp-summary-phone,.bp-bar{display:none}
@media(max-width:900px){
  .bp-grid{grid-template-columns:minmax(0,1fr);gap:18px}
  .bp-side{position:static}
  .bp{padding-bottom:0}
  .bp-head{margin-bottom:8px}
  .bp-title{font-size:26px}
  .bp-summary-phone{display:block;text-align:center;padding:6px 0 16px}
  .bp-big-phone{font-weight:300;font-size:34px;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
  .bp-c-issued{display:none}
  .bp-issued-phone{display:block}
  .bp-panel{padding:2px 10px 6px}
  .bp-table td{padding:11px 6px}
  .bp-table th{padding:12px 6px 8px}
  /* Its bottom padding clears the bottom nav's raised Home button. */
  .bp-bar{display:block;position:sticky;bottom:0;z-index:40;background:var(--bp-black);color:var(--bp-white);border-radius:18px 18px 0 0;padding:12px 14px 34px;margin:18px -12px 0}
  .bp-bar.is-hidden{display:none}
  /* Through a Review and pay link (no app shell, no bottom nav): a gutter,
     and the bar fixed to the screen's foot. */
  .bp.is-link{padding:8px 16px 140px}
  .bp.is-link .bp-bar{position:fixed;left:0;right:0;bottom:0;margin:0;padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))}
  .bp-bar-top{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:12px;color:var(--bp-card-muted);margin-bottom:8px}
  .bp-bar-top b{color:var(--bp-white);font-size:16px;font-weight:500;font-variant-numeric:tabular-nums}
  .bp-bar-btns{display:flex;gap:8px}
  .bp-bar-btns .bp-pay,.bp-bar-btns .bp-apple{margin:0;flex:1}
  /* The tabs sit two by two rather than scroll a label out of sight. */
  .bp-tabs-row{flex-direction:column;align-items:stretch;gap:0}
  .bp-tabs{display:grid;grid-template-columns:1fr 1fr;gap:0 16px;overflow:visible}
  .bp-tab{text-align:left}
  .bp-dl{align-self:flex-start}
  /* The floating chat button would sit on the table and the pay bar: the
     header's chat icon stays. */
  body:has(.bp-bar) .shell-wa{display:none}
}

/* the cart hold banner (cart and checkout), as the demo's cart */
.bp-hold{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f4f4f4;border-radius:var(--bp-radius-sm);padding:12px 14px;margin-top:14px;font-family:var(--bp-font)}
.bp-hold-text{display:flex;flex-direction:column;gap:2px;font-size:12.5px;min-width:0}
.bp-hold-text b{font-weight:500;color:var(--bp-ink)}
.bp-hold-text span{color:var(--bp-muted);overflow-wrap:anywhere}
.bp-hold-pay{min-height:40px;padding:0 18px;flex:0 0 auto;font-size:13px}
.is-held{opacity:.45;cursor:not-allowed}
.bp-terms-note{margin:12px 2px 0}
