/* ==========================================================
   Billing pages — auto-renewal (debit) and refund status
   Builds on style.css + style-sections.css + style-more.css + style-pages.css + style-commerce.css
   ========================================================== */

.bwrap { max-width: 880px; margin: 0 auto; }
.bwrap.wide { max-width: 1040px; }

/* ---------- page heading ---------- */
.b-h { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.02em; margin-top: 4px; }
.b-lead { margin-top: 12px; color: var(--muted); font-size: 15.5px; line-height: 1.7; max-width: 640px; }

/* ---------- status headline ---------- */
.mnd-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mnd-head .dot { width: 12px; height: 12px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 6px rgba(52,211,153,.14); flex: none; }
.mnd-head .dot.off { background: #8b93a7; box-shadow: 0 0 0 6px rgba(139,147,167,.14); }
.mnd-head .dot.pend { background: #fbbf24; box-shadow: 0 0 0 6px rgba(251,191,36,.14); }
.mnd-head h2 { font-size: 21px; margin: 0; }
.mnd-head .sub { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- fact grid ---------- */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; margin-top: 22px; }
.facts > div { padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--muted); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; }
.facts dd { margin: 0; font-size: 15.5px; color: var(--ink); line-height: 1.5; }
.facts dd b { font-weight: 600; }
.facts dd small { color: var(--muted); font-size: 13px; }
@media (max-width: 620px) { .facts { grid-template-columns: 1fr; gap: 0; } }

/* ---------- agreement box ---------- */
.agree { margin-top: 18px; padding: 18px 20px; max-height: 220px; overflow: auto; border: 1px solid var(--rule); border-radius: 14px; background: var(--bg3); color: #c3c8da; font-size: 13.5px; line-height: 1.75; }
.agree h4 { color: var(--ink); font-size: 14px; margin: 0 0 8px; }
.agree p { margin: 0 0 10px; }
.agree p:last-child { margin-bottom: 0; }
.agree::-webkit-scrollbar { width: 8px; }
.agree::-webkit-scrollbar-thumb { background: #2b3148; border-radius: 4px; }

/* ---------- plan chip ---------- */
.plan-chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border: 1px solid var(--rule); border-radius: 999px; background: var(--bg3); font-size: 13.5px; }
.plan-chip b { padding: 3px 10px; border-radius: 999px; background: rgba(34,211,238,.14); color: var(--accent2); font-weight: 600; }
.plan-chip span { color: var(--muted); }

/* ---------- actions ---------- */
.b-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; align-items: center; }
.b-actions .btn { min-width: 140px; }
.b-actions .linkbtn { margin-left: 4px; }

/* ---------- danger / cancel ---------- */
.danger { margin-top: 18px; padding: 18px 20px; border: 1px solid rgba(248,113,113,.32); border-radius: 14px; background: rgba(248,113,113,.06); }
.danger h3 { font-size: 15px; margin: 0 0 6px; color: #fca5a5; }
.danger p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.danger .b-actions { margin-top: 14px; }
.btn-danger { background: linear-gradient(135deg, #f87171, #ef4444); border: 0; color: #fff; }
.btn-danger:hover { filter: brightness(1.06); }

/* ---------- timeline (refund progress) ---------- */
.timeline { margin: 26px 0 0; padding: 0; list-style: none; position: relative; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--rule); }
.timeline li { position: relative; padding: 0 0 24px 40px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg2); border: 2px solid var(--rule); }
.timeline li.done::before { background: #34d399; border-color: #34d399; }
.timeline li.now::before { background: #fbbf24; border-color: #fbbf24; box-shadow: 0 0 0 5px rgba(251,191,36,.16); }
.timeline li.bad::before { background: #f87171; border-color: #f87171; }
.timeline b { display: block; font-size: 15px; }
.timeline span { display: block; margin-top: 4px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.timeline time { display: block; margin-top: 4px; color: #6b7280; font-size: 12.5px; font-family: var(--mono); }

/* ---------- amount banner ---------- */
.banner { margin-top: 20px; padding: 20px 22px; border-radius: 16px; border: 1px solid var(--rule); background: linear-gradient(180deg, rgba(109,92,255,.10), rgba(34,211,238,.04)); display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.banner big { font-size: 34px; letter-spacing: -.02em; font-weight: 600; }
.banner span { color: var(--muted); font-size: 14px; }

/* ---------- status pill ---------- */
.pill.paid { color: #34d399; border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.10); }
.pill.pending { color: #fbbf24; border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.10); }
.pill.refunded { color: var(--accent2); border-color: rgba(34,211,238,.35); background: rgba(34,211,238,.10); }
.pill.failed, .pill.rejected { color: #f87171; border-color: rgba(248,113,113,.35); background: rgba(248,113,113,.10); }

/* ---------- empty state ---------- */
.empty-state { text-align: center; padding: 34px 20px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.empty-state b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }

/* ---------- inline note under a control ---------- */
.aside-note { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.aside-note a { color: var(--accent2); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- auto-renew opt-in on checkout ---------- */.autorenew { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 12px; background: var(--bg3); }
.autorenew .check { margin: 0; }
.autorenew-sum { margin: 8px 0 0; color: var(--muted); font-size: 12.8px; line-height: 1.6; }
.autorenew-sum:empty { display: none; }
.autorenew-link { display: inline-block; margin-top: 6px; color: var(--accent2); font-size: 12.8px; text-decoration: underline; text-underline-offset: 3px; }
.autorenew.on { border-color: rgba(34,211,238,.4); background: rgba(34,211,238,.06); }

/* ---------- pro-rated refund estimate ---------- */
.partial-box { margin: 16px 0 18px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 14px; background: var(--bg3); }
.pb-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 13.5px; }
.pb-row b { color: var(--ink); font-size: 26px; letter-spacing: -.02em; font-weight: 600; }

