/* billing-plan-cards.css — the subscription cards on settings-billing.
   Borrows app-shell.css tokens (--accent, --text, --border) like every other
   in-app surface, and sits inside billing-settings.css's .bill-card frame so
   it matches the cards already on this screen rather than introducing a
   second card language. */

.bpc-card {
  border: 1px solid var(--border, #e5e7f0);
  border-radius: 12px;
  padding: 18px;
  margin-top: 14px;
  background: var(--surface, #fff);
}
.bpc-card.bpc-offer { background: var(--surface-2, #faf9fc); }

.bpc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.bpc-name { font-size: 17px; font-weight: 700; color: var(--text, #1e1b4b); }
.bpc-includes { font-size: 13.5px; color: var(--text-3, #6b7280); margin-top: 3px; }

.bpc-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--text, #1e1b4b);
  white-space: nowrap;
}
.bpc-per { font-size: 13.5px; font-weight: 500; color: var(--text-3, #6b7280); }

.bpc-status {
  margin-top: 14px;
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
}

.bpc-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* 48px targets, no exceptions — the same standard the upgrade sheet is held
   to. A cancel button too small to hit accurately is a support ticket. */
.bpc-btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--border-strong, #d6d5e4);
  background: var(--surface, #fff);
  color: var(--text, #1e1b4b);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.bpc-btn:hover { background: var(--surface-2, #f5f4f9); }
.bpc-btn-primary {
  background: var(--accent, #6c4cf1);
  border-color: var(--accent, #6c4cf1);
  color: #fff;
}
/* Keeps its colour on hover: `.bpc-btn:hover` is more specific than `.bpc-btn-primary`,
   and painted the light hover background behind white text, a blank button. */
.bpc-btn-primary:hover { background: var(--accent, #6c4cf1); filter: brightness(1.06); }
.bpc-btn[disabled] { opacity: .6; cursor: default; }

.bpc-sep {
  margin-top: 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-4, #9d9db5);
}

/* The cancel dialog. z-index above the app chrome but below nothing that
   matters — and the floating widgets are hidden the same way the upgrade
   sheet hides them (body.ups-open) is NOT reused here on purpose: this dialog
   is small and centred, and the widgets sit clear of it. */
.bpc-modal {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(20, 18, 40, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  overflow-y: auto;
}
.bpc-modal-box {
  background: var(--surface, #fff);
  border-radius: 14px;
  padding: 22px;
  width: 100%;
  max-width: 440px;
  margin-top: auto; margin-bottom: auto; /* Tall content scrolls instead of falling off-screen. */
}
.bpc-modal-p { font-size: 14px; line-height: 1.55; color: var(--text-2, #4b5563); margin: 10px 0 16px; }
.bpc-modal-l { display: block; font-size: 13px; font-weight: 600; color: var(--text-2, #4b5563); margin-bottom: 6px; }
.bpc-select {
  width: 100%; min-height: 48px;
  border: 1px solid var(--border-strong, #d6d5e4);
  border-radius: 10px; padding: 0 12px;
  font-size: 15px; background: var(--surface, #fff); color: var(--text, #1e1b4b);
}
.bpc-err {
  margin-top: 12px; padding: 10px 13px; border-radius: 9px;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  font-size: 13.5px;
}

@media (max-width: 560px) {
  .bpc-price { font-size: 21px; }
  .bpc-actions .bpc-btn { flex: 1 1 100%; }
}

/* ── The founding rate (2026-09-12) ────────────────────────────────────
   Alex: "the dashboard highlights the fact that they've got a special rate:
   they keep the hugely discounted rate for as long as the subscription is
   running. That should be showing on the billing so they also have a second
   thought before they actually cancel."

   Rendered only when the server sends `held_discount`, which it only does
   when Stripe reports a discount actually applied to that subscription. */
.bpc-price-cut { color: var(--text, #1e1b4b); }
.bpc-was {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-3, #6b7280);
  text-decoration: line-through;
  /* Reads as "was", not as a second price on offer. */
  text-decoration-thickness: 1.5px;
  margin-right: 2px;
}

.bpc-locked {
  margin-top: 12px;
  padding: 10px 13px;
  border-radius: 9px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #5b21b6;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.5;
}
.bpc-locked i { margin-right: 5px; }
.bpc-locked-sub {
  display: block;
  margin-top: 3px;
  font-weight: 500;
  color: var(--text-2, #4b5563);
}

/* In the cancel dialog the same block has to read as a consequence rather
   than a reassurance, so it carries the warning palette instead. */
.bpc-locked-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
  margin-top: 4px;
}

@media (max-width: 560px) {
  .bpc-was { font-size: 14px; }
}

/* ── The stay offer (stay-offers.js, Alex 2026-10-09) ──────────────────
   One offer between Cancel and the cancel screen. The founder box is amber
   because it is a loss; the offer box carries the accent because it is the
   choice. Same 48px buttons as everything else on this screen. */
.bpc-stay-box { display: flex; flex-direction: column; gap: 12px; }
.bpc-stay-box .bpc-modal-p { margin: 0; }
.bpc-stay {
  border: 2px solid var(--accent, #6c4cf1); background: var(--accent-soft, #f1edfe);
  border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.bpc-stay-h { font-size: 16px; font-weight: 700; color: var(--text, #1e1b4b); }
.bpc-stay-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: var(--text, #1e1b4b); }
.bpc-stay-list li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; }
.bpc-stay-list li::before { content: "\2713"; color: #15803d; font-weight: 700; }
.bpc-stay-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-3, #6b7280); }
.bpc-stay-price b { font-size: 26px; color: var(--text, #1e1b4b); font-variant-numeric: tabular-nums; }
.bpc-actions .bpc-btn-wide { flex: 1 1 100%; }
.bpc-stay-box .bpc-actions { margin-top: 0; }
.bpc-actions-tight { margin-top: -2px; }
.bpc-stay-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.bpc-stay-done .bpc-modal-p { margin: 0; }
.bpc-stay-done .bpc-actions { width: 100%; }
.bpc-tick {
  width: 52px; height: 52px; border-radius: 50%; background: #15803d; color: #fff;
  display: grid; place-items: center; font-size: 22px;
}

/* ── The stay offer, v2 (Alex 2026-10-09: "much less text… more visual") ──
   One gift said in a glance: the Studio plan's four parts unlock, $97 is struck
   and FREE lands. Everything else waits behind "The full details". */
.bpc-stay-v2 { text-align: center; gap: 14px; }
.bpc-kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent, #6c4cf1); }
.bpc-head { font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--text, #1e1b4b); text-wrap: balance; }
.bpc-gift {
  position: relative; overflow: hidden; border-radius: 18px; padding: 18px 16px 16px; color: #fff;
  background: linear-gradient(140deg, #5b3df0, #8b6cff 60%, #b38cff);
}
.bpc-gift-t { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.bpc-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.bpc-tile {
  position: relative; background: rgba(255,255,255,.16); border-radius: 12px; padding: 10px 4px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
}
.bpc-tile > svg { width: 24px; height: 24px; }
.bpc-lk {
  position: absolute; top: 5px; right: 5px; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(0,0,0,.25); display: grid; place-items: center; transition: background .3s;
}
.bpc-lk svg { width: 10px; height: 10px; }
.bpc-tile.bpc-open .bpc-lk { background: #22c55e; }
.bpc-gift-p { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; min-height: 44px; }
.bpc-gift-was { position: relative; font-size: 22px; font-weight: 700; color: #fff; }
.bpc-gift-was::after {
  content: ""; position: absolute; left: -4px; right: -4px; top: 52%; height: 3px; background: #fff; border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .45s ease;
}
.bpc-gift.bpc-strike .bpc-gift-was::after { transform: scaleX(1); }
.bpc-stamp {
  font-size: 30px; font-weight: 800; letter-spacing: .04em; color: #1e1b4b; background: #fde047; border-radius: 10px;
  padding: 2px 12px; transform: rotate(-8deg) scale(0); transition: transform .35s cubic-bezier(.2,1.6,.4,1);
}
.bpc-gift.bpc-stamped .bpc-stamp { transform: rotate(-8deg) scale(1); }
.bpc-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.bpc-chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 12px;
  font-size: 13px; font-weight: 600; background: var(--surface-2, #f5f4f9); color: var(--text, #1e1b4b);
}
.bpc-chip svg { width: 14px; height: 14px; }
.bpc-more { border-radius: 12px; background: var(--surface-2, #f5f4f9); text-align: left; }
.bpc-more summary {
  list-style: none; cursor: pointer; min-height: 44px; padding: 10px 14px; display: flex; align-items: center;
  justify-content: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--accent, #6c4cf1);
}
.bpc-more summary::-webkit-details-marker { display: none; }
.bpc-chev { display: inline-block; transition: transform .2s; }
.bpc-more[open] .bpc-chev { transform: rotate(180deg); }
.bpc-deal { padding: 2px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.bpc-line {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline;
  background: var(--surface, #fff); border-radius: 10px; padding: 10px 12px;
}
.bpc-what { font-size: 14px; font-weight: 700; color: var(--text, #1e1b4b); }
.bpc-val { font-size: 15px; font-weight: 800; color: var(--text, #1e1b4b); text-align: right; white-space: nowrap; }
.bpc-val s { font-weight: 600; color: var(--text-3, #6b7280); margin-right: 6px; }
.bpc-val.bpc-free { color: #15803d; }
.bpc-sub { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-3, #6b7280); }
.bpc-badge {
  display: inline-block; margin-left: 6px; vertical-align: 2px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; background: #fde047; color: #1e1b4b; border-radius: 6px; padding: 1px 6px;
}
.bpc-plus { text-align: center; font-weight: 800; color: var(--accent, #6c4cf1); line-height: 1; }
.bpc-why { margin: 4px 0 0; text-align: center; font-size: 13.5px; color: var(--text-2, #4b5563); }
.bpc-nolink {
  min-height: 44px; border: 0; background: none; cursor: pointer; text-decoration: underline;
  color: var(--text-3, #6b7280); font-size: 14px; font-weight: 600;
}
.bpc-mini { display: flex; gap: 8px; justify-content: center; }
.bpc-mini span {
  width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2, #f5f4f9); color: var(--accent, #6c4cf1);
  display: grid; place-items: center;
}
.bpc-mini svg { width: 20px; height: 20px; }
.bpc-tick svg { width: 30px; height: 30px; }
@media (prefers-reduced-motion: reduce) {
  .bpc-gift-was::after, .bpc-stamp, .bpc-lk, .bpc-chev { transition: none; }
}

/* The "are you sure" screens (Alex 2026-10-09): the same gift, greyed, locks shut, GONE. */
.bpc-kicker-warn { color: #b45309; }
.bpc-gift.bpc-gone { background: linear-gradient(140deg, #4b4a5c, #6b6880 60%, #8a86a0); }
.bpc-gift.bpc-gone .bpc-lk { background: rgba(0,0,0,.35); }
.bpc-stamp.bpc-stamp-gone {
  background: transparent; color: #fff; border: 3px solid #fff; font-size: 22px; padding: 0 10px;
}
.bpc-loss { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.bpc-loss li {
  display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 10px; border-radius: 10px;
  padding: 10px 12px; background: var(--surface-2, #f5f4f9); font-size: 14.5px; font-weight: 600; color: var(--text, #1e1b4b);
}
.bpc-loss small { display: block; font-weight: 500; font-size: 12.5px; color: var(--text-3, #6b7280); }
.bpc-x { width: 26px; height: 26px; border-radius: 50%; background: #fee2e2; color: #b91c1c; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.bpc-left { text-align: left; margin-bottom: -6px; }
.bpc-small { font-size: 12.5px; margin: 0; }

/* Overdue: the balance first on the stay offer (stay-offers.js, 12 Oct 2026). */
.bpc-owed { margin: 14px 0 4px; padding: 12px 14px; border-radius: 12px; background: #fff7ed; border: 1px solid #fed7aa; text-align: left; }
.bpc-owed-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bpc-owed-row b { display: block; font-size: 14px; color: #7c2d12; }
.bpc-owed-row small { display: block; margin-top: 2px; font-size: 13px; color: #9a3412; line-height: 1.45; }
.bpc-owed-amt { font-size: 20px; font-weight: 800; color: #7c2d12; white-space: nowrap; }
.bpc-owed-card { margin-top: 8px; font-size: 13px; color: #9a3412; }
