/* ========================================================================
   DNSai Pricing Page Styles — v2 (scroll-snap, no clipping)
   ======================================================================== */

.pricing-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

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

.pricing-header h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px;
}

.pricing-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* --- Billing Toggle --- */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.billing-toggle span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.billing-toggle span.active {
  color: var(--text-primary);
  font-weight: 600;
}

.billing-toggle-track {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--border-default);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.billing-toggle-track.yearly {
  background: var(--brand-cyan);
}

.billing-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.billing-toggle-track.yearly .billing-toggle-thumb {
  transform: translateX(22px);
}

/* --- Plan Cards — horizontal scroll-snap --- */
.plans-container {
  position: relative;
  margin-bottom: 48px;
}

.plans-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 16px 4px 8px;
  /* hide scrollbar but keep scroll */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.plans-scroll::-webkit-scrollbar {
  display: none;
}

.plan-card {
  flex: 0 0 calc((100% - 64px) / 5);
  min-width: 190px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.plan-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-hover-glow, 0 8px 24px rgba(0, 0, 0, 0.3));
}

.plan-card.featured {
  border-color: var(--brand-cyan);
  box-shadow: 0 0 0 1px var(--brand-cyan);
}

.plan-popular {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 14px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ffffff;
  background: var(--brand-gradient);
  white-space: nowrap;
  z-index: 1;
}

.plan-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.plan-price {
  margin: 0 0 2px;
}

.plan-price .amount {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.plan-price .period {
  font-size: 13px;
  color: var(--text-muted);
}

.plan-yearly-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 16px;
  min-height: 18px;
}

.plan-divider {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: 0 0 16px;
}

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

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 3px 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.plan-features li .check {
  color: var(--color-success);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.plan-features li .cross {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 1px;
}

.plan-features li.disabled {
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.5;
}

.plan-cta {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: none;
}

.plan-cta-primary {
  color: #ffffff;
  background: var(--brand-gradient);
}

.plan-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 84, 255, 0.4);
}

.plan-cta-outline {
  color: var(--btn-outline-text, var(--brand-cyan));
  background: transparent;
  border: 2px solid var(--btn-outline-border, var(--brand-cyan));
  padding: 8px 0;
}

.plan-cta-outline:hover {
  background: var(--btn-outline-hover-bg, rgba(38, 196, 255, 0.1));
}

/* Scroll arrows */
.plans-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, opacity 0.3s;
  opacity: 0.85;
}

.plans-arrow:hover {
  background: var(--bg-surface);
  border-color: var(--brand-cyan);
  opacity: 1;
}

.plans-arrow-left {
  left: -18px;
}

.plans-arrow-right {
  right: -18px;
}

.plans-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

/* --- Feature comparison table --- */
.compare-section {
  margin-bottom: 64px;
}

.compare-section .section-header h2 {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 24px;
}

.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-default);
  border-radius: 10px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.compare-table th:first-child,
.compare-table td:first-child {
  width: 28%;
}

.compare-table th:not(:first-child),
.compare-table td:not(:first-child) {
  width: 14.4%;
}

.compare-table th,
.compare-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-table td:first-child,
.compare-table th:first-child {
  white-space: normal;
  overflow: visible;
}

.compare-table thead tr:first-child th:first-child {
  border-radius: 10px 0 0 0;
}

.compare-table thead tr:first-child th:last-child {
  border-radius: 0 10px 0 0;
}

.compare-table tbody tr:last-child td:first-child {
  border-radius: 0 0 0 10px;
}

.compare-table tbody tr:last-child td:last-child {
  border-radius: 0 0 10px 0;
}

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

.compare-table th {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: var(--bg-surface);
}

.compare-table td {
  color: var(--text-secondary);
}

.compare-table td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

.compare-table td:not(:first-child),
.compare-table th:not(:first-child) {
  text-align: center;
}

.compare-table tbody tr:hover td {
  background: var(--bg-surface);
}

.compare-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

.compare-table tbody tr:nth-child(even):hover td {
  background: var(--bg-surface);
}

.compare-check {
  color: var(--color-success);
  font-weight: 700;
  font-size: 15px;
}

.compare-cross {
  color: var(--text-muted);
  font-size: 13px;
}

/* --- Current plan badge & disabled CTA --- */
.plan-current-badge {
  position: absolute;
  top: -11px;
  right: 12px;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ffffff;
  background: var(--color-success);
  z-index: 1;
}

.plan-cta-current,
.plan-cta:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none !important;
  box-shadow: none !important;
}

/* --- Logged-in banner --- */
.pricing-status-banner {
  text-align: center;
  padding: 16px 24px;
  margin-bottom: 32px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-status-banner strong {
  color: var(--brand-cyan);
}

.pricing-status-banner a {
  color: var(--link);
  text-decoration: none;
}

.pricing-status-banner a:hover {
  text-decoration: underline;
}

/* --- Enterprise contact section (unused but kept) --- */
.enterprise-contact {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-section);
  border-radius: 12px;
  margin-bottom: 64px;
}

.enterprise-contact h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.enterprise-contact p {
  color: var(--text-secondary);
  margin: 0 0 24px;
}

/* ======== Responsive ======== */

/* Large tablets / small desktop — show 3 cards comfortably */
@media (max-width: 1100px) {
  .plan-card {
    flex: 0 0 calc((100% - 48px) / 4);
  }
}

@media (max-width: 900px) {
  .plan-card {
    flex: 0 0 calc((100% - 32px) / 3);
  }
}

@media (max-width: 768px) {
  .pricing-page {
    padding: 80px 16px 40px;
  }
  .plan-card {
    flex: 0 0 calc((100% - 16px) / 2);
    min-width: 170px;
  }
  .plans-arrow-left { left: -8px; }
  .plans-arrow-right { right: -8px; }
  .plans-arrow {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  .compare-table {
    font-size: 11px;
  }
  .compare-table th:first-child,
  .compare-table td:first-child {
    width: 24%;
  }
  .compare-table th,
  .compare-table td {
    padding: 8px 4px;
  }
  .compare-table th {
    font-size: 9px;
    letter-spacing: 0.1px;
  }
  .compare-check {
    font-size: 13px;
  }
  .compare-cross {
    font-size: 11px;
  }
}

@media (max-width: 540px) {
  .plans-scroll {
    gap: 12px;
  }
  .plan-card {
    flex: 0 0 75vw;
    min-width: 0;
  }
  .plans-container {
    margin-left: -16px;
    margin-right: -16px;
  }
  .plans-scroll {
    padding-left: 16px;
    padding-right: 16px;
  }
  .plans-arrow { display: none; }
  .plan-features li {
    font-size: 11px;
  }
  .compare-table {
    font-size: 10px;
  }
  .compare-table th:first-child,
  .compare-table td:first-child {
    width: 22%;
    min-width: 70px;
  }
  .compare-table th,
  .compare-table td {
    padding: 6px 2px;
  }
  .compare-table th {
    font-size: 8px;
    letter-spacing: 0;
  }
  .compare-check {
    font-size: 12px;
  }
  .compare-cross {
    font-size: 10px;
  }
}
