/**
 * Pricing Page Styles
 *
 * Styles for the subscription pricing page.
 * Moved from inline styles for CSP compliance.
 */

body {
  background: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-secondary) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.pricing-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

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

.pricing-header h1 {
  font-size: 3em;
  margin-bottom: 10px;
}

.pricing-header p {
  font-size: 1.2em;
  opacity: 0.9;
}

/* Billing period toggle (monthly/yearly) */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.billing-toggle__label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1em;
  font-weight: 500;
  transition: color 0.3s ease;
}

.billing-toggle__label.active,
.billing-toggle__label:first-child {
  color: white;
}

.billing-toggle__badge {
  background: var(--color-brand-accent, #7FE1B0);
  color: #1a1a2e;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: bold;
  margin-left: 4px;
}

.billing-toggle__switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.billing-toggle__switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.billing-toggle__slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.3);
  transition: 0.3s;
  border-radius: 28px;
}

.billing-toggle__slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.billing-toggle__switch input:checked + .billing-toggle__slider {
  background-color: var(--color-brand-accent, #7FE1B0);
}

.billing-toggle__switch input:checked + .billing-toggle__slider::before {
  transform: translateX(24px);
}

.pricing-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.plan-card {
  background: var(--color-bg-base);
  border-radius: var(--radius-md);
  padding: 40px 30px;
  box-shadow: var(--shadow-md);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.plan-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.plan-card.featured {
  border: 3px solid var(--color-brand-primary);
  transform: scale(1.05);
}

.plan-card.featured::before {
  content: '⭐ MOST POPULAR';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-brand-primary);
  color: white;
  padding: 5px 20px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: bold;
}

.plan-header {
  text-align: center;
  margin-bottom: 30px;
  width: 100%;
}

.plan-name {
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--color-text-default);
  width: 100%;
}

.plan-price {
  font-size: 3em;
  font-weight: bold;
  color: var(--color-brand-primary);
  margin-bottom: 5px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.plan-price span {
  font-size: 0.4em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.plan-description {
  color: var(--color-text-muted);
  font-size: 0.9em;
  margin-top: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  width: 100%;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 30px 0;
}

.plan-features li {
  padding: 12px 0 12px 30px;
  border-bottom: 1px solid var(--color-border-default);
  color: var(--color-text-default);
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.6;
}

.plan-features li::before {
  content: '✓';
  color: var(--color-positive);
  font-weight: bold;
  font-size: 1.2em;
  position: absolute;
  left: 0;
  top: 12px;
}

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

.plan-features li.disabled::before {
  content: '✗';
  color: var(--color-text-muted);
}

.plan-button {
  width: 100%;
  padding: 15px 30px;
  background: var(--color-brand-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.plan-button:hover {
  background: var(--button-primary-hover-bg);
}

.plan-button.current {
  background: var(--color-positive);
  cursor: default;
}

.plan-button:disabled {
  background: var(--color-bg-muted);
  cursor: not-allowed;
}

.usage-banner {
  background: var(--color-bg-base);
  border-radius: var(--radius-md);
  padding: 20px 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
}

.usage-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.usage-stat {
  text-align: center;
}

.usage-stat-value {
  font-size: 2em;
  font-weight: bold;
  color: var(--color-brand-primary);
}

.usage-stat-label {
  font-size: 0.9em;
  color: var(--color-text-muted);
  margin-top: 5px;
}

.progress-bar {
  background: var(--color-bg-muted);
  border-radius: 10px;
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, var(--color-brand-primary), var(--color-brand-secondary));
  height: 100%;
  transition: width 0.5s ease;
}

.progress-fill.warning {
  background: linear-gradient(90deg, var(--color-warning), var(--color-brand-highlight));
}

.faq-section {
  background: var(--color-bg-base);
  border-radius: var(--radius-md);
  padding: 40px;
  margin-top: 50px;
  box-shadow: var(--shadow-md);
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--color-text-default);
}

.faq-item {
  margin-bottom: 20px;
}

.faq-question {
  font-weight: bold;
  color: var(--color-brand-primary);
  margin-bottom: 10px;
}

.faq-answer {
  color: var(--color-text-muted);
  line-height: 1.6;
}

.back-link {
  position: fixed;
  top: 20px;
  left: 20px;
  color: white;
  text-decoration: none;
  font-size: 1.1em;
  padding: 10px 20px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  transition: background 0.3s ease;
}

.back-link:hover {
  background: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
  .pricing-header h1 {
    font-size: 2em;
  }

  .pricing-plans {
    grid-template-columns: 1fr;
  }

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

  .plan-card.featured {
    transform: scale(1);
  }

  .plan-price {
    font-size: 2.5em;
  }

  .plan-features li {
    font-size: 0.95em;
    padding: 10px 0 10px 25px;
  }

  .plan-features li::before {
    font-size: 1em;
    top: 10px;
  }

  .back-link {
    position: static;
    display: inline-block;
    margin-bottom: 20px;
  }
}
