/* upgrade.css — /upgrade pricing page */

.upgrade-shell {
  max-width: 1080px;
  margin: 48px auto 64px;
  padding: 0 20px;
  text-align: center;
}

.upgrade-header {
  margin-bottom: 36px;
  padding: 26px 28px 22px;
  background: linear-gradient(160deg, #fff 60%, rgba(217, 178, 96, 0.06) 100%);
  border: 1.5px solid rgba(184, 148, 48, 0.12);
  border-radius: 18px;
  box-shadow:
    0 2px 8px rgba(16, 19, 31, 0.04),
    0 8px 28px rgba(16, 19, 31, 0.06);
}

.upgrade-title {
  font-size: 2.4rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.15;
  background: linear-gradient(135deg, #10131f 30%, #96751e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.upgrade-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, #c9a957, #a8842e);
}

.upgrade-subtitle {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 12px auto 0;
  line-height: 1.5;
  max-width: 460px;
}

/* ── Billing toggle ────────────────────────────────────────────────────── */

.billing-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(16, 19, 31, 0.05);
  margin-bottom: 36px;
}

.billing-toggle-btn {
  padding: 8px 22px;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: #6b7280;
  transition: all 0.18s ease;
}

.billing-toggle-btn.is-active {
  background: #fff;
  color: #10131f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.billing-save {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  background: linear-gradient(135deg, #c9a957, #a8842e);
  color: #fff;
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Plan cards grid ───────────────────────────────────────────────────── */

.plan-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}

.plan-card {
  position: relative;
  background: #fff;
  border: 1.5px solid rgba(16, 19, 31, 0.1);
  border-radius: 18px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-shadow:
    0 2px 8px rgba(16, 19, 31, 0.04),
    0 8px 24px rgba(16, 19, 31, 0.06);
}

.plan-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 4px 12px rgba(16, 19, 31, 0.06),
    0 16px 40px rgba(16, 19, 31, 0.1);
}

/* Featured card (Plus) */
.plan-card--featured {
  border-color: rgba(184, 148, 48, 0.4);
  box-shadow:
    0 2px 8px rgba(184, 148, 48, 0.08),
    0 8px 28px rgba(184, 148, 48, 0.12),
    0 16px 40px rgba(16, 19, 31, 0.06);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #c9a957, #a8842e);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 8px;
  white-space: nowrap;
}

.plan-save-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
  display: none;
  animation: fadeSlideIn 0.3s ease both;
}

/* ── Card head ─────────────────────────────────────────────────────────── */

.plan-card-head {
  margin-bottom: 24px;
}

.plan-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(16, 19, 31, 0.05);
  color: #6b7280;
  margin-bottom: 14px;
}

.plan-icon--plus {
  background: linear-gradient(135deg, rgba(217, 178, 96, 0.15), rgba(217, 178, 96, 0.06));
  color: #b8892a;
}

.plan-icon--pro {
  background: linear-gradient(135deg, rgba(184, 148, 48, 0.2), rgba(184, 148, 48, 0.08));
  color: #96751e;
}

.plan-card-head h2 {
  font-size: 1.25rem;
  font-weight: 750;
  color: #10131f;
  margin: 0 0 8px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}

.plan-amount {
  font-size: 1.85rem;
  font-weight: 800;
  color: #10131f;
  letter-spacing: -0.02em;
}

.plan-period {
  font-size: 0.88rem;
  color: #9ca3af;
  font-weight: 500;
}

.plan-desc {
  font-size: 0.85rem;
  color: #9ca3af;
  margin: 0;
  line-height: 1.4;
}

/* ── Features list ─────────────────────────────────────────────────────── */

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-features li {
  font-size: 0.88rem;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-features li i {
  font-size: 0.7rem;
  color: #22c55e;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.plan-feature--muted {
  color: #9ca3af;
}

.plan-feature--muted i {
  color: #9ca3af !important;
  font-size: 0.72rem;
}

/* ── CTA buttons ───────────────────────────────────────────────────────── */

.plan-cta {
  width: 100%;
  padding: 12px 20px;
  border: 1.5px solid rgba(16, 19, 31, 0.1);
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  background: #fff;
  color: #6b7280;
  transition: all 0.18s ease;
  margin-top: auto;
}

.plan-cta:disabled {
  cursor: default;
  opacity: 0.6;
}

.plan-cta--gold {
  background: linear-gradient(135deg, #c9a957, #a8842e);
  color: #fff;
  border-color: transparent;
}

.plan-cta--gold:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(184, 148, 48, 0.3);
  transform: translateY(-1px);
}

.plan-cta--gold:disabled {
  background: rgba(16, 19, 31, 0.06);
  color: #9ca3af;
  border-color: rgba(16, 19, 31, 0.08);
}

/* Current plan state */
.plan-card.is-current {
  border-color: rgba(34, 197, 94, 0.35);
}

.plan-card.is-current .plan-cta {
  background: rgba(34, 197, 94, 0.08);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.25);
  cursor: default;
}

/* ── Footer note ───────────────────────────────────────────────────────── */

.upgrade-footer-note {
  margin-top: 32px;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* ── Loading state ─────────────────────────────────────────────────────── */

.plan-cta.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

/* ── Canceled query param banner ───────────────────────────────────────── */

.upgrade-canceled-banner {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: #b91c1c;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 24px;
  display: none;
}

.upgrade-canceled-banner.show {
  display: block;
}

/* ── Stripe icon in CTA ───────────────────────────────────────────────── */

.stripe-icon {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  margin-right: 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Lightning section ────────────────────────────────────────────────── */

.lightning-section {
  margin-top: 40px;
  text-align: left;
  animation: fadeSlideIn 0.35s ease both;
}

.lightning-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.lightning-section-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
  color: #f59e0b;
  flex-shrink: 0;
}

.lightning-section-title {
  font-size: 1.1rem;
  font-weight: 750;
  color: #10131f;
  margin: 0 0 2px;
}

.lightning-section-subtitle {
  font-size: 0.82rem;
  color: #9ca3af;
  margin: 0;
  line-height: 1.4;
}

.lightning-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.lightning-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1.5px solid rgba(245, 158, 11, 0.15);
  border-radius: 14px;
  padding: 18px 22px;
  transition: all 0.18s ease;
  box-shadow:
    0 2px 8px rgba(16, 19, 31, 0.04),
    0 8px 24px rgba(16, 19, 31, 0.06);
}

.lightning-card:hover {
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(245, 158, 11, 0.08),
    0 12px 32px rgba(16, 19, 31, 0.08);
}

.lightning-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #10131f;
  margin: 0 0 4px;
}

.lightning-period {
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  margin-left: 4px;
}

.lightning-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.lightning-amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: #10131f;
  letter-spacing: -0.02em;
}

.lightning-was {
  font-size: 0.78rem;
  color: #d1d5db;
  text-decoration: line-through;
}

.lightning-pay-btn {
  padding: 10px 20px;
  border: 1.5px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), transparent);
  color: #92700e;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.lightning-pay-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.04));
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-1px);
}

.lightning-pay-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.lightning-pay-btn i {
  margin-right: 4px;
  color: #f59e0b;
}

/* ── Lightning modal ──────────────────────────────────────────────────── */

.lightning-modal-content {
  width: 420px;
  max-width: 92vw;
  padding: 0;
  background: #0f1119;
  border: 1.5px solid rgba(245, 158, 11, 0.15);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(245, 158, 11, 0.06);
}

.lightning-modal-content .lightning-close {
  color: rgba(255, 255, 255, 0.4);
  z-index: 2;
}

.lightning-modal-content .lightning-close:hover {
  color: rgba(255, 255, 255, 0.8);
}

.ln-state {
  text-align: center;
  padding: 36px 28px;
  position: relative;
}

/* Subtle gradient glow at top of modal */
.ln-state::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: radial-gradient(ellipse at 50% 0%, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* Bolt icon */
.ln-bolt-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.06));
  color: #f59e0b;
  margin: 0 auto 16px;
  position: relative;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.15);
}

.ln-bolt-icon--sm {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 1rem;
  margin: 0;
  flex-shrink: 0;
}

.ln-title {
  font-size: 1.2rem;
  font-weight: 750;
  color: #f1f1f4;
  margin: 0 0 4px;
}

/* Invoice header row */
.ln-invoice-header {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
}

.ln-invoice-header .ln-title {
  text-align: left;
}

.ln-plan-label {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0;
  text-align: left;
}

/* QR code */
.ln-qr-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
}

.ln-qr-wrap canvas {
  display: none;
}

.ln-qr-img {
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.12);
  width: 240px;
  height: 240px;
}

/* Sats amount */
.ln-amount {
  font-size: 0.92rem;
  font-weight: 600;
  color: #d1d5db;
  margin: 0 0 16px;
}

.ln-amount-bolt {
  color: #f59e0b;
  font-size: 0.78rem;
  margin-right: 2px;
}

/* BOLT11 copy row */
.ln-bolt11-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.ln-bolt11-field {
  flex: 1;
  padding: 9px 10px;
  border: 1.5px solid rgba(245, 158, 11, 0.12);
  border-radius: 10px;
  font-size: 0.7rem;
  font-family: monospace;
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  text-overflow: ellipsis;
}

.ln-copy-btn {
  padding: 9px 14px;
  border: 1.5px solid rgba(245, 158, 11, 0.12);
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ln-copy-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
}

/* Waiting pulse + text */
.ln-waiting-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.ln-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  animation: ln-pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes ln-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

.ln-waiting {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0;
}

.ln-dots::after {
  content: "";
  animation: ln-dots 1.5s steps(4, end) infinite;
}

@keyframes ln-dots {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%  { content: "..."; }
}

/* Hosted checkout link */
.ln-hosted-fallback {
  font-size: 0.78rem;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.15s ease;
}

.ln-hosted-fallback i { margin-left: 3px; font-size: 0.68rem; }
.ln-hosted-fallback:hover { color: #f59e0b; }

/* Loading spinner */
.ln-spinner {
  width: 32px;
  height: 32px;
  border: 2.5px solid rgba(245, 158, 11, 0.15);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: ln-spin 0.7s linear infinite;
  margin: 8px auto 16px;
}

.ln-loading-text {
  font-size: 0.88rem;
  color: #6b7280;
  margin: 0;
}

@keyframes ln-spin { to { transform: rotate(360deg); } }

/* ── Shared fade animation ────────────────────────────────────────────── */

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Success state */
.ln-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.06));
  color: #22c55e;
  margin: 0 auto 16px;
  box-shadow: 0 0 32px rgba(34, 197, 94, 0.15);
}

.ln-paid-sub {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 8px 0 4px;
}

.ln-redirect-text {
  font-size: 0.78rem;
  color: #4b5563;
  margin: 0;
}

/* Error state */
.ln-error-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.06));
  color: #ef4444;
  margin: 0 auto 16px;
  box-shadow: 0 0 32px rgba(239, 68, 68, 0.1);
}

.ln-error-text {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 8px 0 0;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .plan-cards {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .plan-card--featured {
    order: -1;
  }

  .upgrade-title {
    font-size: 1.8rem;
  }

  .lightning-cards {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .upgrade-shell {
    margin-top: 32px;
    padding: 0 16px;
  }

  .upgrade-title {
    font-size: 1.5rem;
  }

  .upgrade-header {
    padding: 28px 20px 24px;
  }

  .plan-card {
    padding: 24px 20px;
  }

  .plan-amount {
    font-size: 1.5rem;
  }

  .lightning-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .lightning-pay-btn {
    width: 100%;
    text-align: center;
  }
}
