/* =============================================================
   pages/pricing.css — PRICING PAGE
   ============================================================= */

.pricing-shell {
  --flow-lift: 100px;
  padding: calc(var(--nav-height) + var(--space-xl) - var(--flow-lift)) var(--page-pad-x) var(--space-xl);
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ── Hero ── */
.pricing-hero {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.pricing-hero h1 { margin-bottom: var(--space-md); }

/* ── Billing toggle ── */
.billing-toggle {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.billing-opt {
  padding: 7px 20px;
  border-radius: var(--radius-pill);
  font-size: var(--size-sm);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border: none;
  background: none;
  font-family: var(--font);
}

.billing-opt.active {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

/* ── Plans section ── */
.pricing-section-title {
  font-size: var(--size-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-md);
}

/* ── Grid ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

/* ── Card ── */
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color var(--transition), background var(--transition),
              transform var(--transition);
}

.pricing-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.pricing-card.featured {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

/* ── Card head ── */
.plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.plan-name {
  font-size: var(--size-md);
  font-weight: 600;
  color: var(--text);
}

.plan-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.plan-price {
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

.plan-price span {
  font-size: var(--size-sm);
  font-weight: 400;
  color: var(--text-muted);
}

.plan-desc {
  font-size: var(--size-sm);
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

/* ── Features list ── */
.plan-features {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--size-sm);
  color: var(--text-muted);
  line-height: 1.4;
}

.plan-features li .check {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── CTA button ── */
.plan-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: var(--radius-pill);
  font-size: var(--size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
              background var(--transition);
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg-card-hover);
  color: var(--text);
  font-family: var(--font);
}

.plan-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.plan-cta.primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

.plan-crypto-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: -6px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  font-family: var(--font);
  cursor: pointer;
}

.plan-crypto-cta:hover {
  color: var(--text);
}

/* ── Checkout modal ── */
body.checkout-open {
  overflow: hidden;
}

.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.checkout-modal.is-open {
  display: flex;
}

.checkout-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(14px);
}

.checkout-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
}

.checkout-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card-hover);
  color: var(--text-muted);
  cursor: pointer;
}

.checkout-close:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.checkout-copy {
  padding-right: 38px;
  margin-bottom: 18px;
}

.checkout-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checkout-copy h2 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.2;
  color: var(--text);
}

.checkout-copy p,
.checkout-note {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--size-sm);
  line-height: 1.55;
}

.checkout-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.checkout-summary div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card-hover);
}

.checkout-summary span,
.wallet-line span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.checkout-summary strong,
.wallet-line strong {
  display: block;
  color: var(--text);
  font-size: var(--size-sm);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.checkout-form {
  display: grid;
  gap: 12px;
}

.checkout-form label {
  display: grid;
  gap: 7px;
  color: var(--text-muted);
  font-size: var(--size-sm);
}

.checkout-form input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.checkout-form input:focus {
  outline: none;
  border-color: var(--border-hover);
}

.checkout-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkout-submit,
.wallet-connect {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--btn-primary-bg);
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-family: var(--font);
  font-size: var(--size-sm);
  font-weight: 600;
  cursor: pointer;
}

.checkout-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.crypto-checkout {
  display: grid;
  gap: 12px;
}

.wallet-line {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card-hover);
}

.wallet-line i {
  color: var(--accent);
  font-size: 18px;
  text-align: center;
}

.wallet-connect {
  border-color: var(--border);
  background: var(--bg-card-hover);
  color: var(--text);
}

.wallet-connect.is-connected {
  border-color: var(--accent);
  color: var(--accent);
}

.checkout-note {
  margin-top: 14px;
}

.checkout-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: var(--size-sm);
  line-height: 1.45;
}

.checkout-status.is-success {
  color: var(--accent);
}

.checkout-status.is-error {
  color: #ff6b6b;
}

.checkout-modal .is-hidden {
  display: none !important;
}

html[data-theme="light"] .checkout-backdrop {
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(10px);
}

html[data-theme="light"] .checkout-dialog {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

html[data-theme="light"] .checkout-summary div,
html[data-theme="light"] .wallet-line,
html[data-theme="light"] .wallet-connect,
html[data-theme="light"] .checkout-close {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .checkout-form input {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.16);
}

/* ── Responsive ── */
@media (max-width: 1023px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-shell {
    padding-top: calc(var(--nav-height) + var(--space-lg) - var(--flow-lift));
  }

  .checkout-dialog {
    padding: 24px 18px;
  }

  .checkout-summary {
    grid-template-columns: 1fr;
  }

  .checkout-field-row {
    grid-template-columns: 1fr;
  }
}
