/* =====================================================
   PLAN.CSS - CLEAN & OPTIMIZED PRODUCTION VERSION

   Content:
    1. VARIABLES & RESET
    2. SECTIONS & CONTAINERS
    3. HEADER & INTRO BADGES
    4. PROMO BANNER SECTION
    5. BILLING SWITCH / TOGGLE
    6. PRICING CARDS & JS RENDERED COMPONENTS
    7. COMPARISON TABLE
    8. FAQ SECTION
    9. CTA SECTION
    10. MEDIA QUERIES

   ===================================================== */

/* ==================== 1. VARIABLES & RESET ==================== */
:root {
  --plans-purple: #8b5cf6;
  --plans-orange: #f97316;
  --plans-green: #10b981;
  --plans-dark: #0f172a;
  --plans-gray: #64748b;
  --plans-gray-light: #e2e8f0;
}

/* ==================== 2. SECTIONS & CONTAINERS ==================== */
.pricing-section {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: 60px 0;
  color: #1a1a1a;
}

.pricing-header {
  text-align: center;
  margin-bottom: 50px;
}

.faq-section {
  padding: 70px 20px 0;
}

.faq-container,
.cta-container {
  max-width: 950px;
  margin: 0 auto;
}

.cta-container {
  max-width: 800px;
}

.compare-section {
  padding: 10px 20px 0;
}

.compare-header {
  text-align: center;
  margin-bottom: 40px;
}

.disclaimer-section {
  padding: 30px 0;
  margin: 40px 0;
  border-top: 1px solid var(--theme-text-10);
  border-bottom: 1px solid var(--theme-text-10);
}

/* ==================== 3. HEADER & INTRO BADGES ==================== */
.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--theme-color-a5);
  border: 1px solid var(--theme-color-a30);
  color: var(--theme-color);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.profile-badge svg {
  --defined-color: var(--theme-color);
}

.main-title {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--theme-text-100);
}

.text-theme-color {
  color: var(--theme-color);
}

.subtitle {
  color: var(--theme-text-300);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* ==================== 4. PROMO BANNER SECTION ==================== */
.promo-banner-wrapper {
  max-width: 950px;
  margin: 0 auto 40px;
  padding: 0 15px;
}

.promo-banner {
  background: var(--theme-bg-450);
  border: 1px solid var(--theme-color-a30);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.08);
  overflow: hidden;
}

.promo-left {
  padding: 14px;
  flex: 1.3;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.promo-badge-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--theme-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.promo-headline {
  font-size: 18px;
  font-weight: 600;
  color: var(--theme-text-100);
  margin: 0 0 16px;
  line-height: 1.4;
}

.promo-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.promo-price {
  font-size: 12px;
  font-weight: 600;
  --defined-color: var(--theme-color);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--theme-color-a6);
  border: 1px solid var(--theme-color-a30);
  padding: 8px 12px;
  border-radius: 100px;
}

.promo-right {
  padding: 14px;
  flex: 1;
  border-top: 1px solid var(--theme-color-a30);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.promo-info-icon {
  color: var(--theme-color);
  flex-shrink: 0;
  margin-top: 2px;
}

.promo-text {
  font-size: 12px;
  color: var(--theme-text-100);
  line-height: 1.6;
  margin: 0;
}

.promo-link {
  color: var(--theme-color);
  text-decoration: underline;
  font-weight: 600;
  margin-left: 4px;
}

@media (min-width: 768px) {
  .promo-banner {
    flex-direction: row;
    align-items: stretch;
  }

  .promo-right {
    border-top: none;
    border-left: 1px solid var(--theme-color-a30);
  }
}

/* ==================== 5. BILLING SWITCH / TOGGLE ==================== */
.billing-switch-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 30px auto 45px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.switch-container {
  background: var(--theme-bg-550);
  padding: 6px;
  border-radius: 99px;
  display: flex;
  position: relative;
  border: 1px solid var(--theme-color-a30);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
  width: 100%;
  max-width: 360px;
}

.switch-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--theme-text-100);
  padding: 10px 0;
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.switch-input {
  display: none;
}

.switch-slider {
  position: absolute;
  top: 6px;
  left: 6px;
  bottom: 6px;
  width: calc(50% - 6px);
  background: var(--theme-bg-400);
  border-radius: 99px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.08);
  z-index: 1;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#monthly:checked ~ .switch-slider {
  transform: translateX(0);
}

#yearly:checked ~ .switch-slider {
  transform: translateX(100%);
}

#monthly:checked ~ label[for="monthly"],
#yearly:checked ~ label[for="yearly"] {
  color: var(--theme-text-100);
}

.savings-tag {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.25);
}

/* ==================== 6. PRICING CARDS & JS RENDERED COMPONENTS ==================== */
.pricing-card {
  background: var(--theme-bg-450);
  border-radius: 16px;
  padding: 32px 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

/* Variants */
.card-primer { border: 1px solid var(--color-green-60); }
.card-enhanced { border: 2px solid var(--plans-orange); }
.card-expert { border: 1px solid var(--theme-color-a60); }

.best-value-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--plans-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.plan-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}

.icon-primer { color: #3b82f6; }
.icon-enhanced { color: var(--plans-orange); }
.icon-expert { color: var(--plans-purple); }

.plan-desc {
  font-size: 13px;
  --defined-color: var(--theme-text-100);
  margin: 0 0 24px;
  min-height: 40px;
}

.pricing-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.price-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.strikethrough-price {
  font-size: 13px;
  color: var(--theme-text-70);
  text-decoration: line-through;
}

.hero-price-container,
.price-block {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.hero-amount,
.price {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--theme-text-100);
}

.hero-period,
.period {
  font-size: 14px;
  color: var(--theme-text-70);
  font-weight: 500;
}

.annual-billed-subtext {
  font-size: 12px;
  color: var(--theme-text-70);
  margin: 4px 0 0;
}

.proration-text {
  font-size: 13px;
  margin-top: 10px;
  color: var(--theme-text-100);
}

.checkout-summary-card {
  background: var(--theme-bg-500);
  border: 1px dashed var(--theme-color-a30);
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 12px;
}

.due-today-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 13px;
}

.credit-note {
  font-size: 11px;
  color: var(--theme-text-70);
  margin: 4px 0 0;
}

.card-footer {
  margin-top: auto;
  padding-top: 20px;
}

/* ==================== 7. COMPARISON TABLE ==================== */
.compare-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--theme-text-100);
  margin: 0;
}

.table-container {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--theme-bg-400);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  overflow-x: auto; 
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 750px; 
}

.compare-table th, 
.compare-table td {
  padding: 24px 20px;
  text-align: center;
  vertical-align: middle;
}

.compare-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.compare-table tbody tr:last-child {
  border-bottom: none;
}

.compare-table th {
  font-size: 15px;
  font-weight: 800;
  border-bottom: 1px solid #f1f5f9;
}

.col-feature { text-align: left !important; color: #111827; }
.col-primer { color: #111827; }
.col-enhanced { color: #ea580c; }
.col-expert { color: #8b5cf6; }

.compare-table th:first-child, 
.compare-table td:first-child {
  position: sticky;
  left: 0;
  background: #ffffff;
  z-index: 2;
  text-align: left;
}

.feature-name {
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
}

.font-bold { font-weight: 700; color: #374151; }
.text-gray { color: #6b7280; font-size: 14px; }
.text-enhanced { color: #ea580c; font-size: 14px; }
.text-expert { color: #8b5cf6; font-size: 14px; }

.icon-dash { color: #cbd5e1; font-weight: bold; }

.icon-check {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ==================== 8. FAQ SECTION ==================== */
.faq-title {
  text-align: center;
  font-size: 36px;
  font-weight: 800;
  color: var(--theme-text-100);
  margin: 0 0 48px;
  letter-spacing: -0.5px;
}

.faq-card {
  background-color: var(--theme-bg-400);
  border: 1px solid var(--theme-color-a30);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.faq-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  transform: translateY(-2px);
}

.faq-question {
  font-size: 18px;
  font-weight: 700;
  color: var(--theme-text-100);
  margin: 0 0 12px;
}

.faq-answer {
  font-size: 15px;
  color: var(--theme-text-70);
  line-height: 1.6;
  margin: 0;
}

/* ==================== 9. CTA SECTION ==================== */
.cta-section {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(90deg, #a855f7 0%, #6366f1 100%);
  padding: 80px 20px;
  text-align: center;
  width: 100%;
}

.cta-title {
  color: #ffffff;
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}

.cta-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  margin: 0 0 40px;
}

.cta-button {
  background-color: #ffffff;
  color: #6366f1;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 40px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

/* ==================== 10. MEDIA QUERIES ==================== */
@media (max-width: 768px) {
  .faq-section { padding: 60px 16px; }
  .faq-title { font-size: 28px; margin-bottom: 32px; }
  .faq-card { padding: 24px; margin-bottom: 16px; }
  .faq-question { font-size: 16px; }
  .faq-answer { font-size: 14px; }

  .cta-section { padding: 60px 20px; }
  .cta-title { font-size: 28px; }
  .cta-subtitle { font-size: 16px; margin-bottom: 32px; }
  .cta-button { padding: 14px 32px; font-size: 15px; width: 100%; max-width: 300px; }

  .compare-table th, 
  .compare-table td { padding: 16px 12px; }
}

@media (max-width: 480px) {
  .switch-container { max-width: 310px; }
  .switch-label { font-size: 13px; gap: 4px; }
  .savings-tag { font-size: 10px; padding: 2px 6px; }
}