/* css/sub.css – Subscription page with country-specific pricing */

:root {
  --sub-accent: #009688;
  --sub-accent-soft: rgba(0, 150, 136, 0.08);
  --sub-surface: #ffffff;
  --sub-bg: #f5f7f9;
  --sub-border: #e8ecf1;
  --sub-text: #1f2933;
  --sub-text-secondary: #6b7280;
  --sub-radius: 1.25rem;
  --sub-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --sub-shadow-lg: 0 20px 40px -12px rgba(0,0,0,0.08), 0 8px 20px -8px rgba(0,0,0,0.04);
}

[data-theme="dark"] {
  --sub-accent: #14b8a6;
  --sub-accent-soft: rgba(20, 184, 166, 0.12);
  --sub-surface: #1a252c;
  --sub-bg: #0f181e;
  --sub-border: #263238;
  --sub-text: #e2e8f0;
  --sub-text-secondary: #8899a6;
}

/* ===== Layout ===== */
.sub-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ===== Location Indicator ===== */
.location-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--sub-surface);
  border: 1px solid var(--sub-border);
  border-radius: 2rem;
  max-width: fit-content;
  margin: 0 auto 1.5rem;
  font-size: 0.85rem;
  color: var(--sub-text-secondary);
}

.location-flag {
  font-size: 1.2rem;
}

/* ===== Header ===== */
.sub-header {
  text-align: center;
  margin-bottom: 1rem;
}

.sub-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--sub-text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.sub-header-desc {
  color: var(--sub-text-secondary);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ===== Currency Notice ===== */
.currency-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.6rem 1rem;
  background: var(--sub-accent-soft);
  border-radius: 0.75rem;
  max-width: fit-content;
  margin: 0 auto 1.5rem;
  font-size: 0.82rem;
  color: var(--sub-accent);
}

/* ===== Billing Toggle ===== */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--sub-text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.toggle-label.active {
  color: var(--sub-accent);
  font-weight: 600;
}

.toggle-switch-wrapper {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch-wrapper input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--sub-border);
  border-radius: 26px;
  transition: all 0.3s ease;
}

.toggle-slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

input:checked + .toggle-slider {
  background: var(--sub-accent);
}

input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.save-badge {
  background: #10b981;
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ===== Plans Grid ===== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto 3rem;
}

@media (max-width: 1100px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr); max-width: 700px; }
}

@media (max-width: 900px) {
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
  }
}

/* ===== Plan Card ===== */
.plan-card[hidden] { display: none !important; }
.plan-card {
  background: var(--sub-surface);
  border: 2px solid var(--sub-border);
  border-radius: var(--sub-radius);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sub-shadow-lg);
  border-color: var(--sub-accent);
}

.plan-card.popular {
  border-color: var(--sub-accent);
  box-shadow: 0 8px 32px rgba(0, 150, 136, 0.15);
  transform: scale(1.03);
}

.plan-card.popular:hover {
  transform: scale(1.03) translateY(-4px);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sub-accent);
  color: white;
  padding: 0.3rem 1.2rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}

.plan-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.plan-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.plan-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--sub-text);
}

.plan-desc {
  font-size: 0.85rem;
  color: var(--sub-text-secondary);
  margin-top: 0.25rem;
}

.plan-price {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--sub-border);
}

.plan-price .currency {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--sub-text-secondary);
  vertical-align: top;
}

.plan-price .amount {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--sub-accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.plan-price .period {
  font-size: 0.85rem;
  color: var(--sub-text-secondary);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex: 1;
}

.plan-features li {
  padding: 0.4rem 0;
  font-size: 0.88rem;
  color: var(--sub-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-features li i.fa-check {
  color: #10b981;
  font-size: 0.75rem;
}

.plan-features li i.fa-times {
  font-size: 0.75rem;
}

.plan-btn {
  width: 100%;
  padding: 0.85rem;
  border-radius: 2.5rem;
  border: 2px solid var(--sub-accent);
  background: transparent;
  color: var(--sub-accent);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.plan-btn:hover {
  background: var(--sub-accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 150, 136, 0.3);
}

.plan-btn.pro-btn {
  background: var(--sub-accent);
  color: white;
}

.plan-btn.pro-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 8px 24px rgba(0, 150, 136, 0.4);
}

.plan-card.max-plan {
  border-color: #7c3aed;
  background: linear-gradient(160deg, var(--sub-surface), rgba(124, 58, 237, 0.06));
}

.plan-btn.max-btn {
  background: #7c3aed;
  color: white;
}

.plan-btn.max-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.plan-btn.current-plan {
  background: var(--sub-accent-soft);
  border-color: var(--sub-border);
  color: var(--sub-text-secondary);
  cursor: default;
}

.plan-btn.current-plan:hover {
  transform: none;
  box-shadow: none;
  background: var(--sub-accent-soft);
  color: var(--sub-text-secondary);
}

/* A tier below the user's current plan (item 4) — shown for context
   instead of hidden, but visually stepped back and not a real choice. */
.plan-card.plan-card-inactive {
  opacity: 0.55;
  filter: grayscale(0.3);
}
.plan-card.plan-card-inactive:hover {
  transform: none;
  box-shadow: none;
}
.plan-card.plan-card-inactive .plan-btn {
  background: var(--sub-surface);
  border: 1px solid var(--sub-border);
  color: var(--sub-text-secondary);
  cursor: not-allowed;
}
.plan-card.plan-card-inactive .plan-btn:hover {
  transform: none;
  box-shadow: none;
}

/* ===== Payment Modal ===== */
.payment-modal-content {
  max-width: 480px !important;
  padding: 2rem !important;
}

.payment-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.payment-plan-badge {
  display: inline-block;
  background: var(--sub-accent-soft);
  color: var(--sub-accent);
  padding: 0.3rem 1rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.payment-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--sub-text);
}

.payment-price-display {
  text-align: center;
  margin-bottom: 0.5rem;
}

.payment-currency {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--sub-text-secondary);
}

.payment-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--sub-accent);
  line-height: 1;
}

.payment-period {
  font-size: 0.9rem;
  color: var(--sub-text-secondary);
}

.payment-billing {
  text-align: center;
  font-size: 0.8rem;
  color: var(--sub-text-secondary);
  margin-bottom: 1.5rem;
}

.payment-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--sub-text-secondary);
  font-size: 0.8rem;
}

.payment-divider::before,
.payment-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--sub-border);
}

.payment-divider span {
  padding: 0 0.75rem;
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.payment-method-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 2px solid var(--sub-border);
  border-radius: 1rem;
  background: var(--sub-surface);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.payment-method-btn:hover {
  border-color: var(--sub-accent);
  background: var(--sub-accent-soft);
  transform: translateX(4px);
}

.payment-method-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  color: white;
}

.payment-method-icon.paystack {
  background: linear-gradient(135deg, #00c3f7, #0090c1);
}

.payment-method-icon.flutterwave {
  background: linear-gradient(135deg, #f5a623, #f7931e);
}

.payment-method-icon.gpay {
  background: #000;
}

.payment-method-info {
  flex: 1;
}

.payment-method-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--sub-text);
}

.payment-method-desc {
  font-size: 0.78rem;
  color: var(--sub-text-secondary);
}

.secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--sub-accent-soft);
  border-radius: 0.75rem;
  font-size: 0.8rem;
  color: var(--sub-accent);
  font-weight: 500;
}

/* ===== FAQ ===== */
.sub-faq {
  max-width: 700px;
  margin: 4rem auto 0;
}

.sub-faq h2 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--sub-text);
}

.faq-item {
  background: var(--sub-surface);
  border: 1px solid var(--sub-border);
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.2rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--sub-text);
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 600;
  transition: transform 0.3s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 1.2rem 1rem;
  margin: 0;
  color: var(--sub-text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sub-header h1 { font-size: 1.8rem; }
  .plan-card { padding: 1.5rem 1.2rem; }
  .plan-price .amount { font-size: 2.2rem; }
  .plan-card.popular { transform: none; }
  .plan-card.popular:hover { transform: translateY(-4px); }
}

@media (max-width: 480px) {
  .sub-main { padding: 1rem 0.8rem 3rem; }
  .billing-toggle { gap: 0.4rem; }
  .toggle-label { font-size: 0.8rem; }
  .save-badge { font-size: 0.65rem; }
}
/* =========================================================================
   Renewal Reminder Banner
   ========================================================================= */
.renewal-banner {
  max-width: 700px;
  margin: 0 auto 1.2rem;
  padding: 0.8rem 1.2rem;
  border-radius: 0.7rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #b45309;
  font-size: 0.88rem;
  text-align: center;
}
[data-theme="dark"] .renewal-banner {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
}

/* =========================================================================
   Promo (admin.html > Plans & Pricing): banner over the plans, tag over a price
   ========================================================================= */
.promo-banner {
  max-width: 980px; margin: 0 auto 2rem; display: flex; align-items: center; gap: 0.8rem;
  padding: 0.9rem 1.1rem; border-radius: 1rem; color: #fff;
  background: linear-gradient(110deg, #f97316, #db2777 55%, #7c3aed);
  box-shadow: 0 10px 30px rgba(219, 39, 119, 0.25);
}
.promo-banner-icon { font-size: 1.6rem; line-height: 1; }
.promo-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.promo-banner-text strong { font-size: 1rem; }
.promo-banner-text span { font-size: 0.85rem; opacity: 0.92; }
.promo-banner-ends { flex: none; padding: 0.3rem 0.7rem; border-radius: 999px; background: rgba(255, 255, 255, 0.22); font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.promo-tag {
  display: table; margin: 0 auto 0.5rem; padding: 0.15rem 0.6rem; border-radius: 1rem;
  background: linear-gradient(90deg, #f97316, #db2777); color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em;
}

/* =========================================================================
   Loading animation while the plans and prices load
   ========================================================================= */
.plans-grid.plans-loading { display: none !important; }
.plans-loader { max-width: 1100px; margin: 0 auto; }
.plans-loader-head { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin-bottom: 1.5rem; color: var(--text-secondary); font-weight: 500; font-size: 0.92rem; }
.plans-loader-spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(13, 148, 136, 0.18); border-top-color: var(--accent, #0d9488); animation: plansSpin 0.9s linear infinite; }
.plans-loader-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.plans-loader-card { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; padding: 1.6rem 1.2rem; border-radius: 1.25rem; border: 2px solid var(--border-light, #e8ecf1); }
.plans-loader-card > * {
  display: block; border-radius: 0.5rem;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.18) 25%, rgba(148, 163, 184, 0.34) 50%, rgba(148, 163, 184, 0.18) 75%);
  background-size: 300% 100%; animation: plansShimmer 1.3s linear infinite;
}
.plans-loader-card i { width: 44px; height: 44px; border-radius: 50%; }
.plans-loader-card b { width: 40%; height: 16px; }
.plans-loader-card b + b { width: 70%; height: 11px; margin-bottom: 0.6rem; }
.plans-loader-card em { width: 50%; height: 34px; margin-bottom: 0.8rem; }
.plans-loader-card s { width: 90%; height: 11px; }
.plans-loader-card u { width: 100%; height: 44px; margin-top: 0.8rem; border-radius: 2rem; }
@keyframes plansSpin { to { transform: rotate(360deg); } }
@keyframes plansShimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .plans-loader-spin, .plans-loader-card > * { animation-duration: 3s; } }

/* =========================================================================
   Success Celebration Overlay
   ========================================================================= */
.sub-success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sub-success-overlay.show { opacity: 1; }

.sub-success-card {
  background: var(--surface, #fff);
  color: var(--text-primary, #111);
  border-radius: 1.2rem;
  padding: 2.2rem 2rem;
  max-width: 380px;
  width: 90%;
  text-align: center;
  transform: scale(0.85) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.sub-success-overlay.show .sub-success-card { transform: scale(1) translateY(0); }

.sub-success-check { width: 72px; height: 72px; margin: 0 auto 0.8rem; }
.sub-success-check-circle {
  stroke: #22c55e;
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: subCheckCircle 0.5s ease-out forwards;
}
.sub-success-check-mark {
  stroke: #22c55e;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: subCheckMark 0.35s 0.4s ease-out forwards;
}
@keyframes subCheckCircle { to { stroke-dashoffset: 0; } }
@keyframes subCheckMark { to { stroke-dashoffset: 0; } }

.sub-success-icon { font-size: 2.2rem; margin-bottom: 0.4rem; }
.sub-success-card h2 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.sub-success-card p { margin: 0 0 1.2rem; font-size: 0.9rem; opacity: 0.85; }
.sub-success-continue {
  width: 100%;
  padding: 0.7rem;
  border-radius: 0.6rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
}
