/* Shared checkout page styles — all 5 plan pages.
 * Design: coral #E8614D, sand #FAF6F1, ocean #1B3A4B, Fraunces headings, Satoshi body. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #FAF6F1; --surface: #FFFFFF; --surface-2: #F5EFE8;
  --border: rgba(27,58,75,0.10); --text: #1B3A4B; --text-muted: #6B6560;
  --text-light: #9B9590; --coral: #E8614D; --coral-light: #FF7A68;
  --coral-glow: rgba(232,97,77,0.12); --ocean: #1B3A4B; --ocean-mid: #3D7A91;
  --mint: #5CBFB0; --error-red: #D32F2F; --success-green: #27AE60;
}
body { font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }

/* ── Nav ────────────────────────────────────────────────── */
nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 40px; height: 64px; display: flex; align-items: center; position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1100px; margin: 0 auto; width: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 700; color: var(--ocean); text-decoration: none; }
.nav-logo em { color: var(--coral); font-style: italic; }
.nav-back { font-size: 0.85rem; color: var(--text-muted); text-decoration: none; display: flex; align-items: center; gap: 4px; }
.nav-back:hover { color: var(--text); }

/* ── Layout ─────────────────────────────────────────────── */
.checkout-page { max-width: 520px; margin: 0 auto; padding: 40px 20px 80px; }

/* ── Plan header ────────────────────────────────────────── */
.plan-header { text-align: center; margin-bottom: 32px; }
.checkout-plan-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; background: var(--coral-glow); color: var(--coral); padding: 5px 14px; border-radius: 20px; margin-bottom: 14px; }
.checkout-plan-badge.popular { background: linear-gradient(135deg, var(--coral-glow), rgba(92,191,176,0.12)); border: 1px solid var(--coral); }
.checkout-plan-badge.premium { background: linear-gradient(135deg, #e8a03d, #f0c060); color: #6B4F0E; }
.checkout-headline { font-family: 'Fraunces', serif; font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 700; color: var(--ocean); letter-spacing: -1px; line-height: 1.15; margin-bottom: 8px; }

/* ── Price hero ─────────────────────────────────────────── */
.price-hero { text-align: center; margin-bottom: 28px; }
.price-amount { font-family: 'Fraunces', serif; font-size: 2.8rem; font-weight: 900; color: var(--ocean); line-height: 1; }
.price-period { font-size: 1rem; font-weight: 500; color: var(--text-muted); margin-left: 2px; }
.price-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }

/* ── Features card (always visible) ─────────────────────── */
.features-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; padding: 24px; margin-bottom: 24px; box-shadow: 0 2px 12px rgba(27,58,75,0.06); }
.features-card-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }
.features-list { display: flex; flex-direction: column; gap: 10px; }
.feature-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; color: var(--text); line-height: 1.4; }
.feature-check { flex-shrink: 0; width: 20px; height: 20px; background: rgba(92,191,176,0.15); color: var(--mint); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; margin-top: 1px; }
.feature-highlight { font-weight: 600; }
.features-divider { border: none; border-top: 1px dashed var(--border); margin: 14px 0; }
.features-includes { font-size: 0.78rem; color: var(--text-muted); font-style: italic; margin-bottom: 10px; }

/* ── Checkout card (login/business/payment) ─────────────── */
.checkout-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 16px; box-shadow: 0 2px 12px rgba(27,58,75,0.06); }
.checkout-card-body { padding: 20px 24px; }
.checkout-section-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }

/* ── Form fields ────────────────────────────────────────── */
.field-group { margin-bottom: 14px; }
.field-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.field-input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 0.95rem; font-family: inherit; color: var(--text); background: white; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.field-input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-glow); }
.field-input.error-state { border-color: var(--error-red); box-shadow: 0 0 0 3px rgba(211,47,47,0.1); }
.field-error { font-size: 0.78rem; color: var(--error-red); margin-top: 5px; display: none; }
.field-error.show { display: block; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary { width: 100%; background: var(--coral); color: white; border: none; border-radius: 12px; padding: 14px 20px; font-family: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: background 0.15s, transform 0.1s; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 16px rgba(232,97,77,0.28); margin-top: 8px; }
.btn-primary:hover:not(:disabled) { background: var(--coral-light); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.login-signup-cta { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: 16px; }
.login-signup-cta a { color: var(--coral); font-weight: 600; text-decoration: none; }
.login-signup-cta a:hover { text-decoration: underline; }

/* ── Business card ──────────────────────────────────────── */
.business-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.business-card-icon { font-size: 1.4rem; }
.business-card-name { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.business-card-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.business-card-badge { margin-left: auto; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.5px; background: var(--ocean); color: white; padding: 3px 10px; border-radius: 12px; text-transform: capitalize; }
.business-switch-note { font-size: 0.8rem; color: var(--text-muted); text-align: center; padding: 0 24px 8px; }
.business-switch-note a { color: var(--coral); text-decoration: none; }

/* ── Mini claim form ────────────────────────────────────── */
.mini-claim-form { padding: 4px 0; }
.mini-claim-note { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 14px; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; }

/* ── Order summary (shown after business selected) ──────── */
.summary-plan-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.summary-plan-name { font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 700; color: var(--ocean); margin-bottom: 8px; }
.summary-price { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.summary-price-note { font-size: 0.8rem; font-family: 'Satoshi', sans-serif; font-weight: 500; color: var(--text-muted); }
.summary-features { display: flex; flex-direction: column; gap: 6px; }
.summary-feature-item { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.summary-feature-item::before { content: '\2713'; color: var(--mint); font-weight: 700; font-size: 0.75rem; flex-shrink: 0; }

/* ── Promo code ─────────────────────────────────────────── */
.promo-row { display: flex; gap: 10px; margin-top: 12px; }
.promo-input { flex: 1; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 0.9rem; font-family: inherit; color: var(--text); background: white; outline: none; letter-spacing: 1px; transition: border-color 0.15s; }
.promo-input:focus { border-color: var(--coral); }
.promo-input:disabled { background: var(--surface-2); cursor: not-allowed; }
.promo-apply-btn { background: var(--ocean); color: white; border: none; border-radius: 10px; padding: 11px 18px; font-size: 0.88rem; font-weight: 700; font-family: inherit; cursor: pointer; white-space: nowrap; transition: background 0.15s; }
.promo-apply-btn:hover:not(:disabled) { background: var(--ocean-mid); }
.promo-apply-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.promo-applied { font-size: 0.85rem; color: var(--success-green); font-weight: 600; margin-top: 8px; }
.promo-invalid { font-size: 0.82rem; color: var(--error-red); margin-top: 6px; }
.promo-applied.show, .promo-invalid.show { display: block; }

/* ── Pay button ─────────────────────────────────────────── */
.checkout-pay-btn { width: 100%; background: var(--coral); color: white; border: none; border-radius: 12px; padding: 16px 20px; font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 4px 20px rgba(232,97,77,0.32); transition: background 0.15s, transform 0.1s; margin-top: 8px; }
.checkout-pay-btn:hover:not(:disabled) { background: var(--coral-light); transform: translateY(-1px); }
.checkout-pay-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.checkout-pay-btn.ocean { background: var(--ocean); box-shadow: 0 4px 20px rgba(27,58,75,0.28); }
.checkout-pay-btn.ocean:hover:not(:disabled) { background: #253d4f; }
.checkout-error { background: #FEF2F2; border: 1px solid #FCA5A5; color: var(--error-red); border-radius: 10px; padding: 12px 16px; font-size: 0.88rem; margin-top: 12px; display: none; }
.checkout-error.show { display: block; }
.checkout-footer-note { font-size: 0.78rem; color: var(--text-light); text-align: center; margin-top: 12px; line-height: 1.5; }

/* ── Success ────────────────────────────────────────────── */
.success-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 20px; padding: 60px 40px; text-align: center; box-shadow: 0 4px 24px rgba(27,58,75,0.08); }
.success-icon { font-size: 3.5rem; margin-bottom: 20px; }
.success-title { font-family: 'Fraunces', serif; font-size: 1.8rem; font-weight: 700; color: var(--ocean); margin-bottom: 8px; }
.success-business { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 32px; }
.success-next-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--coral); color: white; text-decoration: none; font-size: 0.95rem; font-weight: 700; padding: 14px 28px; border-radius: 12px; box-shadow: 0 4px 16px rgba(232,97,77,0.3); transition: background 0.15s, transform 0.1s; margin-bottom: 16px; }
.success-next-btn:hover { background: var(--coral-light); transform: translateY(-1px); }
.success-email-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }

/* ── Trust bar ──────────────────────────────────────────── */
.trust-bar { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 20px; padding: 14px 0; font-size: 0.78rem; color: var(--text-light); }
.trust-bar span { display: flex; align-items: center; gap: 5px; }

/* ── Spinner ────────────────────────────────────────────── */
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  nav { padding: 0 16px; }
  .checkout-page { padding: 28px 16px 60px; }
  .checkout-headline { font-size: 1.5rem; }
  .price-amount { font-size: 2.2rem; }
  .success-card { padding: 40px 20px; }
  .trust-bar { flex-direction: column; gap: 8px; }
}
