/* ==========================================================================
   ParaPrep, Billing page (Brief 15) styles.
   Layered on styles.css (tokens + base) and dashboard.css (app shell). Adds
   only what the current-plan panel, action rows and banners need.
   ========================================================================== */

.billing-main { max-width: 760px; }

/* ---- Current-plan card ---- */
.plan-card-billing { padding: 1.4rem 1.5rem; }
.plan-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.plan-card-head h3 { margin: 0; font-size: 1.25rem; letter-spacing: -.01em; }
.plan-card-head .plan-tagline { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }

.status-pill {
  font-size: .72rem; font-weight: 800; padding: .25rem .65rem; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; flex-shrink: 0;
}
.status-pill.is-paid { background: var(--teal-soft); color: var(--teal-dark); }
.status-pill.is-b2b  { background: #efe7fb; color: #6b46c1; }
.status-pill.is-free { background: #eef2f4; color: var(--muted); }

/* Price line */
.plan-price-line { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; margin: .2rem 0 1rem; }
.plan-price-line .amount { font-size: 2rem; font-weight: 800; color: var(--teal-dark); line-height: 1; }
.plan-price-line .interval { color: var(--muted); font-size: .95rem; }
.tbd-pill {
  font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--amber); background: var(--amber-bg); border: 1px solid #f0e3c4;
  border-radius: 999px; padding: .1rem .45rem; align-self: center;
}

/* Detail rows (interval / renewal) */
.plan-meta { list-style: none; margin: 0 0 1.2rem; padding: 1rem 0 0; border-top: 1px solid var(--line); }
.plan-meta li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .45rem 0; font-size: .92rem; border-top: 1px dashed var(--line);
}
.plan-meta li:first-child { border-top: 0; }
.plan-meta .k { color: var(--muted); }
.plan-meta .v { font-weight: 700; text-align: right; }
.plan-meta .v.muted { font-weight: 500; color: var(--muted); }

/* ---- Action buttons ---- */
.billing-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .3rem; }
.billing-actions .btn { white-space: nowrap; }
.action-note { margin: .9rem 0 0; color: var(--muted); font-size: .82rem; }
.action-note a { color: var(--teal-dark); }

/* What the portal covers (invoices / change / cancel) */
.portal-points { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: .5rem; }
.portal-points li {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: .9rem; color: var(--ink);
}
.portal-points .pp-icon { flex-shrink: 0; }
.portal-points .pp-sub { display: block; color: var(--muted); font-size: .82rem; }

/* ---- Free-plan upsell card ---- */
.free-card { padding: 1.4rem 1.5rem; }
.free-card .icon { font-size: 2rem; line-height: 1; }
.free-card h3 { margin: .5rem 0 .25rem; font-size: 1.2rem; }
.free-card p { margin: 0 0 1rem; color: var(--muted); font-size: .92rem; max-width: 56ch; }

/* ---- Demo-only controls (testable flow without a backend) ---- */
.demo-tools {
  margin-top: 1.4rem; padding: 1rem 1.2rem; border: 1px dashed var(--line);
  border-radius: var(--radius); background: #fbfcfc;
}
.demo-tools h4 {
  margin: 0 0 .3rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted);
}
.demo-tools p { margin: 0 0 .8rem; color: var(--muted); font-size: .82rem; }
.demo-tools .btn { font-size: .82rem; padding: .5rem 1rem; }

/* ---- Banner (stub / demo / error feedback) ---- */
.billing-banner {
  position: relative; border-radius: var(--radius); padding: .9rem 2.4rem .9rem 1.1rem;
  margin-bottom: 1.4rem; font-size: .9rem; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.billing-banner.is-info { background: var(--teal-soft); border-color: #c7e3e1; color: var(--teal-dark); }
.billing-banner.is-success { background: #e6f5ec; border-color: #b9e0c8; color: var(--green); }
.billing-banner.is-error { background: #fbe9e7; border-color: #f3c9c3; color: var(--red); }
.billing-banner button {
  position: absolute; top: .5rem; right: .6rem; border: 0; background: transparent;
  font-size: 1.2rem; line-height: 1; cursor: pointer; color: inherit; opacity: .7;
}
.billing-banner button:hover { opacity: 1; }

/* Keyboard focus visibility (accessibility) */
.btn:focus-visible, .site-footer a:focus-visible, .billing-banner button:focus-visible {
  outline: 2px solid var(--teal-dark); outline-offset: 2px;
}

@media (max-width: 620px) {
  .plan-meta .v { text-align: left; }
  .billing-actions .btn { width: 100%; text-align: center; }
}
