/* billing-page.css — Settings > Billing, as Alex approved it on 3 Dec 2026.

   THE SPEC IS THE ARTEFACT: docs/projects/ai-video-clips/billing-redesign/Main.dc.html
   (FIX-LIST item 7). Header, Your plan, Video credit, Card beside Auto top-up, Receipts,
   then the quiet sections (Expertise.tv, who may spend the credit).

   The look is the free-community upgrade's (css/plan-checkout.css, the `ock-` tokens):
   cream and ink, a warm line, violet for "carry on", pink only for a button that takes
   money, Fraunces for the one headline, Inter for everything else, JetBrains Mono for
   the small caps. Every class here starts `bp-`. The plan rows keep their `bpc-` names
   (js/billing-plan-cards.js, which tests read), styled here only inside `.bp-row`, so
   the cancel and stay-offer dialogs (css/billing-plan-cards.css) are untouched.

   Phone: one column, 16px from the screen edge, no card inside a card. */

.bp {
  --bp-cream: #faf6ec;
  --bp-cream2: #f3ecdb;
  --bp-ink: #2a2030;
  --bp-ink2: #5a4d62;
  --bp-ink3: #6f6377;
  --bp-line: #ebe1c9;
  --bp-linestrong: #d8cdaf;
  --bp-accent: #6a4cf1;
  --bp-accentsoft: #ece6ff;
  --bp-accentdeep: #4a32b8;
  --bp-buy: #ec1075;
  --bp-buydeep: #c50c60;
  --bp-good: #4f7c54;
  --bp-goodsoft: #e4ecdc;
  --bp-warn: #8a5a00;
  --bp-warnsoft: #faf0d8;
  --bp-bad: #b4232a;
  --bp-badsoft: #fbe9ea;
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 0 64px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: Inter, -apple-system, "Segoe UI", sans-serif;
  color: var(--bp-ink);
  box-sizing: border-box;
}
.bp *, .bp *::before, .bp *::after { box-sizing: border-box; }
.bp [hidden] { display: none !important; }
/* A slot in the page's frame (billing-settings.js _shellHtml) adds no box of its own, so an
   empty one takes no room and no gap in the column. */
.bp-slot { display: contents; }

/* ── Header ───────────────────────────────────────────────────────── */
.bp-head { display: flex; flex-direction: column; gap: 6px; }
.bp-caps {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bp-ink3);
}
.bp-title {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--bp-ink);
}
.bp-lede { margin: 0; font-size: 15px; color: var(--bp-ink2); line-height: 1.5; }

/* ── The card ─────────────────────────────────────────────────────── */
.bp-card {
  background: #fff;
  border: 1px solid var(--bp-line);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.bp-card-flush { padding: 0; gap: 0; overflow: hidden; }
.bp-card-h { margin: 0; font-size: 17px; font-weight: 700; color: var(--bp-ink); }
.bp-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--bp-ink2); }
.bp-small { margin: 0; font-size: 13px; line-height: 1.5; color: var(--bp-ink3); }
.bp-loading { color: var(--bp-ink3); font-size: 14px; }
.bp-capsrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bp-capsrow .bp-link { margin: -12px 0; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.bp-pill {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid var(--bp-linestrong);
  background: #fff;
  color: var(--bp-ink);
  font: 600 15px Inter, -apple-system, sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
}
.bp-pill:hover { border-color: var(--bp-ink3); }
.bp-pill-sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.bp-pill-buy { background: var(--bp-buy); border-color: var(--bp-buy); color: #fff; padding: 0 24px; }
.bp-pill-buy:hover { background: var(--bp-buydeep); border-color: var(--bp-buydeep); }
.bp-pill-go { background: var(--bp-accent); border-color: var(--bp-accent); color: #fff; }
.bp-pill-go:hover { background: var(--bp-accentdeep); border-color: var(--bp-accentdeep); }
.bp-pill[disabled] { opacity: .6; cursor: default; }
.bp-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.bp-link {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--bp-accentdeep);
  font: 600 14px Inter, -apple-system, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.bp-link:hover { color: var(--bp-ink); }
/* The way out: a plain underlined line, never a button at the weight of the main one (the
   launch offer's `.ock-bno`). */
.bp-quiet {
  align-self: flex-start;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bp-ink3);
  font: 500 13px Inter, -apple-system, sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.bp-quiet:hover { color: var(--bp-ink); }

/* ── Your plan (rows drawn by js/billing-plan-cards.js) ───────────── */
.bp .bpc-card.bp-row {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  align-items: flex-start;
  justify-content: space-between;
}
.bp .bpc-card.bp-row + .bpc-card.bp-row { border-top: 1px solid var(--bp-line); padding-top: 18px; }
.bp-row-main { display: flex; flex-direction: column; gap: 10px; flex: 1 1 340px; min-width: 0; }
.bp-row-head { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.bp-row .bpc-name { font-size: 22px; font-weight: 700; color: var(--bp-ink); line-height: 1.2; }
.bp-row .bpc-price { font-size: 15px; font-weight: 400; color: var(--bp-ink2); white-space: normal; }
.bp-row .bpc-per { font-size: 15px; font-weight: 400; color: var(--bp-ink2); }
.bp-row .bpc-was { text-decoration: line-through; color: var(--bp-ink3); margin-right: 2px; }
.bp-row .bpc-tierline { font-size: 14px; color: var(--bp-ink2); margin: 0; }
.bp-incl { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--bp-ink2); }
.bp-incl li { display: flex; gap: 8px; line-height: 1.45; }
.bp-incl li::before { content: "\2713"; color: var(--bp-good); font-weight: 700; flex: none; }
.bp-incl b { color: var(--bp-ink); font-weight: 600; }
.bp-row .bpc-locked {
  display: flex; flex-direction: column; gap: 2px;
  margin: 0; padding: 10px 13px; border-radius: 10px;
  background: var(--bp-accentsoft); color: var(--bp-accentdeep); font-size: 13.5px; font-weight: 600;
}
.bp-row .bpc-locked i { margin-right: 6px; }
.bp-row .bpc-locked-sub { display: block; font-weight: 400; font-size: 13px; color: var(--bp-ink2); }
.bp-note { margin: 0; padding: 10px 13px; border-radius: 10px; font-size: 13.5px; line-height: 1.5; font-weight: 500; }
.bp-note-ok { background: var(--bp-goodsoft); color: var(--bp-good); }
.bp-note-ending { background: var(--bp-warnsoft); color: var(--bp-warn); }
.bp-note-attention { background: var(--bp-badsoft); color: var(--bp-bad); }
.bp-row .bpc-actions { margin: 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 0 0 auto; }
.bp-row-quiet { flex-basis: 100%; margin-top: -8px; }
.bp-sep { margin: 4px 0 -2px; padding-top: 18px; border-top: 1px solid var(--bp-line); }
.bp-sep + .bpc-card.bp-row { border-top: 0 !important; padding-top: 0 !important; }

/* ── Video credit ─────────────────────────────────────────────────── */
.bp-credit-top { padding: 24px; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; justify-content: space-between; }
.bp-credit-sum { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bp-big { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--bp-ink); }
.bp-credit-sub { font-size: 14px; color: var(--bp-ink2); }
.bp-held { margin: 0 24px 18px; font-size: 13.5px; line-height: 1.5; color: var(--bp-ink2); }
.bp-parts { border-top: 1px solid var(--bp-line); background: var(--bp-cream); padding: 8px 24px; }
.bp-part { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--bp-line); }
.bp-part:last-of-type { border-bottom: 0; }
.bp-part-l { display: flex; flex-direction: column; gap: 5px; flex: 1 1 auto; min-width: 0; }
.bp-part-name { font-size: 15px; font-weight: 600; color: var(--bp-ink); }
.bp-part-sub { font-size: 13px; line-height: 1.45; color: var(--bp-ink3); }
.bp-part-v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--bp-ink); }
.bp-part-of { font-weight: 400; color: var(--bp-ink3); }
.bp-bar { height: 6px; max-width: 320px; background: var(--bp-cream2); border-radius: 999px; overflow: hidden; }
.bp-bar > span { display: block; height: 100%; background: var(--bp-accent); border-radius: 999px; }
.bp-parts-foot { margin: 4px 0 14px; font-size: 13px; color: var(--bp-ink3); }

/* ── Card + Auto top-up, side by side ─────────────────────────────── */
.bp-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.bp-cardrow { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--bp-line); border-radius: 12px; padding: 10px 8px 10px 14px; }
.bp-brand {
  width: 38px; height: 26px; border-radius: 5px; flex: none;
  background: var(--bp-ink); color: #fff;
  font-size: 9px; font-weight: 800; letter-spacing: .02em;
  display: flex; align-items: center; justify-content: center;
}
.bp-brand-visa { background: #1a1f71; }
.bp-brand-mastercard { background: #2a2030; }
.bp-brand-amex { background: #1f6fb2; }
.bp-brand-none { background: var(--bp-cream2); color: var(--bp-ink3); }
.bp-cardtxt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bp-cardtxt b { font-size: 14px; font-weight: 600; color: var(--bp-ink); }
.bp-cardtxt span { font-size: 12px; color: var(--bp-ink3); }
.bp-backup { display: flex; align-items: center; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; font-size: 13px; color: var(--bp-ink3); }
.bp-backup .bp-link { font-size: 13px; }

.bp-switchrow { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.bp-switchrow-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bp-switchrow-txt b { font-size: 14px; font-weight: 600; color: var(--bp-ink); }
.bp-switchrow-txt span { font-size: 12px; color: var(--bp-ink3); }
.bp-switch {
  -webkit-appearance: none; appearance: none;
  flex: none; position: relative; margin: 0;
  width: 44px; height: 26px; border-radius: 999px;
  background: var(--bp-linestrong); cursor: pointer; transition: background .15s;
}
.bp-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(42, 32, 48, .25); transition: transform .15s;
}
.bp-switch:checked { background: var(--bp-accent); }
.bp-switch:checked::after { transform: translateX(18px); }
.bp-switch:focus-visible { outline: 3px solid var(--bp-accentsoft); outline-offset: 2px; }
.bp-switch:disabled { opacity: .55; cursor: default; }
.bp-autopick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--bp-ink2); }
.bp-select {
  min-height: 40px; padding: 0 10px; border: 1.5px solid var(--bp-line); border-radius: 10px;
  background: #fff; color: var(--bp-ink); font: 600 14px Inter, -apple-system, sans-serif;
}
.bp-select:focus { outline: none; border-color: var(--bp-accent); box-shadow: 0 0 0 4px var(--bp-accentsoft); }
.bp-status { margin: 0; font-size: 13px; line-height: 1.5; color: var(--bp-ink2); min-height: 0; }
.bp-status:empty { display: none; }

/* ── Receipts ─────────────────────────────────────────────────────── */
.bp-receipts { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px 20px; font-size: 14px; align-items: center; }
.bp-receipts > * { min-width: 0; }
.bp-rc-what { color: var(--bp-ink); overflow-wrap: anywhere; }
.bp-rc-what small { display: block; font-size: 12px; color: var(--bp-ink3); }
.bp-rc-when { color: var(--bp-ink3); white-space: nowrap; }
.bp-rc-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; color: var(--bp-ink); }
.bp-rc-out { color: var(--bp-ink3); }
.bp-rc-in { color: var(--bp-good); }
.bp-rc-open { cursor: pointer; }
.bp-rc-open:hover { color: var(--bp-accentdeep); text-decoration: underline; }

/* ── Who may spend the credit (Team) ──────────────────────────────── */
.bp-spender { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--bp-line); }
.bp-spender-who { min-width: 0; flex: 1 1 180px; }
.bp-spender-who .bp-spender-name { display: block; font-size: 14px; font-weight: 600; color: var(--bp-ink); overflow-wrap: anywhere; }
.bp-spender-who span + span { font-size: 12.5px; color: var(--bp-ink3); }
.bp-spender-ctl { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; font-size: 14px; color: var(--bp-ink2); }
.bp-spender-ctl label { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.bp-limit {
  width: 86px; min-height: 40px; padding: 0 10px; border: 1.5px solid var(--bp-line); border-radius: 10px;
  font: 500 14px Inter, -apple-system, sans-serif; color: var(--bp-ink); background: #fff;
}
.bp-limit:focus { outline: none; border-color: var(--bp-accent); box-shadow: 0 0 0 4px var(--bp-accentsoft); }
.bp-spender .bp-status { flex-basis: 100%; }

/* ── The other plan states (grandfathered, free, beta) ────────────── */
.bp-tier-name { margin: 0; font-size: 22px; font-weight: 700; color: var(--bp-ink); }
.bp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 20px; margin: 0; }
.bp-facts dt { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--bp-ink3); }
.bp-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; color: var(--bp-ink); overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .bp { gap: 16px; padding-top: 4px; }
  .bp-card { padding: 20px 18px; border-radius: 16px; }
  .bp-card-flush { padding: 0; }
  .bp-credit-top { padding: 20px 18px; }
  .bp-held { margin: 0 18px 16px; }
  .bp-parts { padding: 6px 18px; }
  .bp-big { font-size: 40px; }
  .bp-credit-top .bp-btns { width: 100%; }
  .bp-credit-top .bp-btns .bp-pill { flex: 1 1 0; }
  .bp-pair { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .bp-row .bpc-actions { flex-basis: 100%; }
}
/* The app's own gutter is 12px under 400px; four more makes the 16px the design asks for. */
@media (max-width: 400px) {
  .bp { padding-left: 4px; padding-right: 4px; }
}
