/* Subscription Signup Page Styles */

.subscription-signup-page {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Header */
.signup-header {
  text-align: center;
  margin-bottom: 3rem;
}

.signup-header-content h1 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 2.5rem;
  font-weight: 700;
}

.signup-header-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Billing Cycle Toggle */
.billing-cycle-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.cycle-toggle-container {
  display: flex;
  background: var(--background-secondary);
  border-radius: 12px;
  padding: 6px;
  gap: 4px;
  border: 1px solid var(--border-light);
}

.cycle-toggle-btn {
  position: relative;
  padding: 12px 24px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cycle-toggle-btn:hover {
  color: var(--text-primary);
}

.cycle-toggle-btn.active {
  background: var(--card-background);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.savings-badge {
  background: var(--success-color);
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* Plans Grid */
.subscription-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.loading-plans {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.error-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.error-state h3 {
  color: var(--error-color);
  margin: 1rem 0;
}

/* Plan Cards */
.subscription-plan-card {
  position: relative;
  background: var(--card-background);
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.subscription-plan-card.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.subscription-plan-card.popular {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Plan Header */
.plan-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

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

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 0.5rem;
}

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

.price-period {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.price-savings {
  color: var(--success-color);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.plan-description {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

/* Plan Limits */
.plan-limits {
  margin-bottom: 2rem;
}

.limit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: var(--text-primary);
}

.limit-item i {
  width: 20px;
  text-align: center;
  color: var(--primary-color);
}

/* Plan Features */
.plan-features {
  margin-bottom: 2rem;
}

.plan-features h4 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

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

.plan-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: var(--text-primary);
}

.plan-features i {
  color: var(--success-color);
  font-size: 0.9rem;
}

/* Plan Actions */
.plan-actions {
  margin-bottom: 1rem;
}

.plan-select-btn {
  width: 100%;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s;
}

.trial-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

.trial-info i {
  color: var(--info-color);
}

/* Features Comparison */
.plan-features-comparison {
  margin-top: 4rem;
  background: var(--card-background);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-light);
}

.plan-features-comparison h3 {
  text-align: center;
  margin: 0 0 2rem 0;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
}

.features-table-container {
  overflow-x: auto;
}

.features-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.features-table th,
.features-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.features-table th {
  background: var(--background-secondary);
  color: var(--text-primary);
  font-weight: 600;
  text-align: center;
}

.features-table th:first-child {
  text-align: left;
}

.features-table td {
  color: var(--text-primary);
  text-align: center;
}

.features-table td:first-child {
  text-align: left;
  font-weight: 500;
}

.features-table tbody tr:hover {
  background: var(--hover-background);
}

/* Subscription Signup Modal */
.subscription-modal.modal-content {
  max-width: 800px;
  width: 90vw;
}

.signup-plan-summary {
  margin-bottom: 2rem;
}

.plan-summary-card {
  background: var(--background-secondary);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.summary-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
}

.summary-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.summary-price .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.summary-price .period {
  color: var(--text-secondary);
  font-weight: 500;
}

.summary-details {
  display: flex;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.trial-info {
  color: var(--success-color);
  font-weight: 500;
}

/* Company Info Form */
.company-info-section {
  background: var(--card-background);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  margin-bottom: 2rem;
}

.company-info-section h3 {
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

/* Button States */
.button-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .subscription-signup-page {
    padding: 1rem;
  }

  .signup-header-content h1 {
    font-size: 2rem;
  }

  .signup-header-content p {
    font-size: 1rem;
  }

  .subscription-plans-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cycle-toggle-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .price-amount {
    font-size: 2.5rem;
  }

  .plan-features-comparison {
    padding: 1rem;
  }

  .features-table th,
  .features-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
  }

  .subscription-modal.modal-content {
    margin: 1rem;
    width: calc(100vw - 2rem);
  }
}

@media (max-width: 480px) {
  .cycle-toggle-container {
    flex-direction: column;
    align-items: stretch;
  }

  .cycle-toggle-btn {
    text-align: center;
  }

  .summary-header {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .summary-details {
    justify-content: center;
  }
}

/* Dark Mode Support */
.dark-mode .subscription-plan-card {
  background: var(--card-background-dark);
  border-color: var(--border-dark);
}

.dark-mode .subscription-plan-card:hover,
.dark-mode .subscription-plan-card.selected {
  border-color: var(--primary-color-dark);
}

.dark-mode .cycle-toggle-container {
  background: var(--background-secondary-dark);
  border-color: var(--border-dark);
}

.dark-mode .cycle-toggle-btn.active {
  background: var(--card-background-dark);
  color: var(--primary-color-dark);
}

.dark-mode .plan-features-comparison {
  background: var(--card-background-dark);
  border-color: var(--border-dark);
}

.dark-mode .features-table th {
  background: var(--background-secondary-dark);
}

.dark-mode .features-table tbody tr:hover {
  background: var(--hover-background-dark);
}

.dark-mode .plan-summary-card {
  background: var(--background-secondary-dark);
  border-color: var(--border-dark);
}

.dark-mode .company-info-section {
  background: var(--card-background-dark);
  border-color: var(--border-dark);
}

/* Animation Effects */
.subscription-plan-card {
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading Animation */
.loading-plans i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Modal base styles for subscription signup and shared use */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  padding: 1.5rem;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-content {
  background: var(--card-background);
  color: var(--text-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-xl, 0 10px 30px rgba(0,0,0,0.2));
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow: auto;
}

.modal-header,
.modal-footer {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-footer {
  border-top: 1px solid var(--border-light);
  border-bottom: none;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.modal-body {
  padding: 1rem 1.25rem;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
}

.modal-close:hover {
  color: var(--text-primary);
}

/* Specific sizing for subscription modal content element */
.subscription-modal.modal-content {
  max-width: 800px;
  width: 90vw;
}

/* Dark mode */
.dark-mode .modal-content {
  background: var(--card-background-dark);
  color: var(--text-primary);
  border-color: var(--border-dark);
}

@media (max-width: 768px) {
  .subscription-modal.modal-content {
    margin: 1rem;
    width: calc(100vw - 2rem);
  }
}