/* ==========================================================================
   Accounted — Pricing Page Styles
   Pricing Grid, Toggle Switch, Comparison Table, FAQ
   ========================================================================== */

/* ==========================================================================
   1. Pricing Header
   ========================================================================== */

.pricing-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-8);
}

.pricing-header__title {
  margin-bottom: var(--space-4);
}

.pricing-header__text {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}


/* ==========================================================================
   2. Billing Toggle (Monthly / Yearly)
   ========================================================================== */

.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.billing-toggle__label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--duration-fast) ease;
  user-select: none;
}

.billing-toggle__label.is-active {
  color: var(--color-text);
  font-weight: 600;
}

/* Toggle switch */
.billing-toggle__switch {
  position: relative;
  width: 52px;
  height: 28px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--duration-fast) ease;
  flex-shrink: 0;
}

.billing-toggle__switch.is-yearly {
  background: var(--color-accent);
}

.billing-toggle__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #FFFFFF;
  border-radius: var(--radius-full);
  transition: transform var(--duration-normal) var(--ease-spring);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.billing-toggle__switch.is-yearly::after {
  transform: translateX(24px);
}

/* Keyboard accessibility */
.billing-toggle__switch:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Save badge */
.billing-toggle__save {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-success);
  background: rgba(34, 197, 94, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}


/* ==========================================================================
   3. Pricing Grid
   ========================================================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

/* Pricing amount transition for monthly/yearly switch */
.pricing-card__price {
  transition: opacity var(--duration-fast) ease;
}

.pricing-card__price.is-switching {
  opacity: 0;
}

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

  /* Keep featured card prominent */
  .pricing-grid .pricing-card--featured {
    order: -1;
    grid-column: span 2;
    max-width: 400px;
    justify-self: center;
  }
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .pricing-grid .pricing-card--featured {
    grid-column: span 1;
    max-width: none;
  }
}


/* ==========================================================================
   4. Comparison Table
   ========================================================================== */

.comparison-section {
  margin-top: var(--space-24);
}

.comparison-section__title {
  text-align: center;
  margin-bottom: var(--space-8);
}

.comparison-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  max-width: 100%;
}

.comparison-table {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

/* Header row */
.comparison-table thead th {
  padding: var(--space-4) var(--space-4);
  text-align: center;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-surface-elevated);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1;
}

.comparison-table thead th:first-child {
  text-align: left;
  min-width: 200px;
}

/* Featured column header */
.comparison-table thead th.is-featured {
  background: var(--color-accent-glow);
  color: var(--color-accent);
}

/* Category rows */
.comparison-table .category-row td {
  padding: var(--space-3) var(--space-4);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-surface-elevated);
  border-bottom: 1px solid var(--color-border);
}

/* Feature rows */
.comparison-table tbody td {
  padding: var(--space-3) var(--space-4);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.comparison-table tbody td:first-child {
  text-align: left;
  color: var(--color-text);
}

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

.comparison-table tbody tr:hover td {
  background: var(--color-surface-elevated);
}

/* Featured column cells */
.comparison-table tbody td.is-featured {
  background: rgba(139, 92, 246, 0.04);
}

@media (prefers-color-scheme: dark) {
  .comparison-table tbody td.is-featured {
    background: rgba(167, 139, 250, 0.06);
  }
}

/* Check/cross icons in table */
.comparison-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.comparison-check svg {
  width: 18px;
  height: 18px;
}

.comparison-check--yes svg {
  color: var(--color-success);
  stroke-dasharray: 24;
  stroke-dashoffset: 0;
}

.comparison-check--no svg {
  color: var(--color-text-muted);
  opacity: 0.3;
}

/* Animated checkmarks — triggered on scroll */
.comparison-check--animated svg {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}

.comparison-check--animated.is-visible svg {
  animation: draw-check 0.6s var(--ease-out-expo) forwards;
}

/* Scroll hint on mobile */
.comparison-scroll-hint {
  display: none;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}

@media (max-width: 768px) {
  .comparison-scroll-hint {
    display: block;
  }
}


/* ==========================================================================
   5. FAQ Section (Pricing Page)
   ========================================================================== */

.pricing-faq {
  max-width: 720px;
  margin: 0 auto;
}

.pricing-faq__title {
  text-align: center;
  margin-bottom: var(--space-8);
}


/* ==========================================================================
   6. Money-Back Guarantee
   ========================================================================== */

.guarantee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-6);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.guarantee__icon {
  width: 48px;
  height: 48px;
  color: var(--color-success);
  flex-shrink: 0;
}

.guarantee__icon svg {
  width: 100%;
  height: 100%;
}

.guarantee__text {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  text-align: left;
}

.guarantee__text strong {
  color: var(--color-text);
}
