/* Legacy styles for payment forms only */
section {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  width: 400px;
  height: 112px;
  border-radius: 6px;
  justify-content: space-between;
}
/* Legacy p styles - now scoped to payment forms only */
section p {
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.154px;
  color: #242d60;
  height: 100%;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}
#checkout {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 9999 !important;
}

#checkout iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.hidden {
  display: none;
}

/* Design System Variables */
:root {
  /* xclusiv WORLD Brand Colors */
  --brand-primary: #000a66;      /* Dark navy blue */
  --brand-secondary: #38bcff;    /* Bright cyan */
  --brand-light: #f6f4f0;        /* Off-white/cream */

  /* Colors */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --blue-300: #93c5fd;
  --blue-500: #3b82f6;
  --blue-600: var(--brand-primary);    /* Use brand primary */
  --blue-700: #00063d;                 /* Darker variant of brand primary */

  /* Spacing (8px system) */
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */

  /* Typography */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 0.375rem;  /* 6px */
  --radius: 0.5rem;       /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */

  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-family-base: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-heading: 'League Spartan', 'Lato', sans-serif;
}

/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--font-family-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* line-height: 1.5; */
  color: var(--gray-800);
}

body {
  background: #ffffff;
  min-height: 100vh;
}

/* Layout */
.main-wrapper {
  min-height: 100vh;
  padding: var(--space-4) var(--space-4);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--space-4); /* 16px horizontal edge spacing */
}

/* Products Header Section */
.products-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

/* Brand Logo */
.brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* margin-bottom: var(--space-3); */
  padding-top: 0;
}

.logo-image {
  width: 315px;
  height: 165px;
  object-fit: contain;
}

/* Products Typography */
.products-title {
  font-family: var(--font-family-heading);
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--brand-secondary);
  line-height: 1.1;
  margin-bottom: var(--space-4);
}

.products-subtitle {
  font-family: var(--font-family-base);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--brand-primary);
  max-width: 50rem;
  margin: 0 auto var(--space-4);
  line-height: 1.4;
}

.products-description {
  font-family: var(--font-family-base);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--gray-700);
  max-width: 48rem;
  margin: 0 auto;
  line-height: 1.6;
}

.gradient-text {
  color: var(--brand-secondary);
}

/* Pricing Section */
.pricing-section {
  max-width: 64rem;
  margin: 0 auto;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: var(--space-8);
  max-width: 48rem;
  margin: 0 auto;
}

/* Product Cards */
.product-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  position: relative;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 10, 102, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  border-color: var(--brand-secondary);
  box-shadow: 0 8px 25px rgba(56, 188, 255, 0.2);
  transform: translateY(-4px);
}

.product-info {
  margin-bottom: var(--space-8);
  flex: 1;
}

.product-card h3 {
  font-family: var(--font-family-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--brand-secondary);
  margin-bottom: var(--space-4);
  text-align: center;
  letter-spacing: -0.5px;
}

.product-card .price {
  font-family: var(--font-family-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--brand-primary);
  text-align: center;
  margin-bottom: var(--space-4);
  line-height: 1;
}

.product-card .description {
  font-size: var(--text-base);
  color: var(--gray-600);
  text-align: center;
  line-height: 1.5;
  margin-bottom: var(--space-4);
}

.product-promo {
  font-family: var(--font-family-base);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--brand-secondary);
  text-align: center;
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
}

.product-features {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.product-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  color: var(--gray-700);
  font-size: var(--text-base);
  line-height: 1.5;
}

.product-features li i {
  color: var(--brand-secondary);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Checkout Button */
.checkout-button-container {
  width: 100%;
}

.checkout-button {
  width: 100%;
  background: #000a66;
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-family-base);
  cursor: pointer;
  transition: var(--transition);
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 10, 102, 0.4);
}

.checkout-button:hover {
  color: white;
  transform: translateY(-2px); 
  box-shadow: 0 6px 20px rgba(0, 10, 102, 0.6);
}

.checkout-button:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
}

/* Loading */
.loading-modern {
  text-align: center;
  padding: var(--space-12);
  color: var(--gray-600);
  font-family: var(--font-family-base);
}

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--gray-200);
  border-top: 3px solid var(--brand-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-4);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Footer */
.footer-section {
  text-align: center;
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-200);
}

.footer-text {
  color: var(--gray-600);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.footer-text i {
  color: var(--brand-primary);
}

/* Error Messages */
.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  text-align: center;
  margin: var(--space-4) 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-wrapper {
    padding: var(--space-6) var(--space-4);
  }

  .container {
    padding: 0 var(--space-4); /* Maintain 16px on tablet */
  }

  .logo-image {
    width: 280px;
    height: 147px;
  }

  .products-title {
    font-size: var(--text-4xl);
  }

  .products-subtitle {
    font-size: var(--text-xl);
  }

  .products-description {
    font-size: var(--text-base);
  }
  .products-header {
    margin-bottom: var(--space-12);
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .product-card {
    padding: var(--space-6);
  }
}

@media (max-width: 640px) {
  .logo-image {
    width: 240px;
    height: 126px;
  }

  .container {
    padding: 0 var(--space-3); /* Reduce to 12px on small screens */
  }

  .products-title {
    font-size: var(--text-3xl);
  }

  .products-subtitle {
    font-size: var(--text-lg);
  }

  .products-description {
    font-size: var(--text-base);
  }

  .pricing-grid {
    gap: var(--space-4);
  }

  .product-card {
    padding: var(--space-5);
  }
}

/* Styles pour la page de succès */
.success-container {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-2);
}

.success-header {
  margin-bottom: var(--space-6);
}

.success-icon {
  margin-bottom: var(--space-1);
}

.success-icon i {
  width: 56px;
  height: 56px;
  color: var(--brand-secondary);
  stroke: var(--brand-secondary);
}

.success-icon svg {
  width: 56px;
  height: 56px;
  color: var(--brand-secondary);
  stroke: var(--brand-secondary);
}

.success-header h1 {
  font-family: var(--font-family-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--brand-secondary);
  margin-bottom: var(--space-1);
  line-height: 1.1;
}

.success-header p {
  font-family: var(--font-family-base);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--brand-primary);
  line-height: 1.4;
}

.payment-details {
  margin-bottom: var(--space-6);
}

.detail-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  margin-bottom: var(--space-3);
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 10, 102, 0.08);
}

.detail-card h3 {
  font-family: var(--font-family-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: var(--space-3);
  text-align: center;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row .label {
  font-family: var(--font-family-base);
  font-weight: 600;
  color: var(--gray-700);
  font-size: var(--text-base);
}

.detail-row .value {
  font-family: var(--font-family-base);
  color: var(--gray-600);
  font-size: var(--text-base);
}

.success-badge {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-lg);
  font-family: var(--font-family-heading);
  font-size: var(--text-sm);
  font-weight: 700;
}

.confirmation-message {
  background: rgba(56, 188, 255, 0.1);
  border: 2px solid var(--brand-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  color: var(--brand-primary);
}

.confirmation-message p {
  font-family: var(--font-family-base);
  font-size: var(--text-base);
  line-height: 1.6;
  margin-bottom: var(--space-2);
}

.confirmation-message p:last-child {
  margin-bottom: 0;
}

.actions {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* All buttons in actions container - full width */
.actions .checkout-button,
.actions .secondary-button {
  width: 100%;
  max-width: 100%;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

/* Info Card */
.info-card {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  text-align: left;
}

.info-card h4 {
  color: #1e40af;
  margin-bottom: 16px;
  font-size: 16px;
}

.info-text {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Feature List */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: #374151;
  font-size: 14px;
}

.feature-list li i {
  color: #10b981;
  width: 20px;
  height: 20px;
}

/* Secondary Button */
.secondary-button {
  background: white;
  color: var(--brand-primary);
  border: 2px solid var(--brand-primary);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-family-base);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  min-height: 3rem;
}

.secondary-button:hover {
  background: rgba(0, 10, 102, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 10, 102, 0.15);
}

.secondary-button:active {
  transform: translateY(0);
}

.secondary-button i {
  width: 20px;
  height: 20px;
}

/* Billing Management Page Styles */
.billing-page .success-icon svg,
.billing-page .success-icon i {
  color: var(--blue-600) !important;
}

.billing-page .success-header h1 {
  color: var(--blue-600);
}

/* Icon in buttons - ensure proper alignment */
.checkout-button i,
.secondary-button i {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin: 0;
}

.checkout-button svg,
.secondary-button svg {
  width: 20px;
  height: 20px;
}

/* Dashboard Page Styles */
.dashboard-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dashboard-wrapper {
  min-height: 100vh;
  padding: var(--space-8) var(--space-4);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.dashboard-title {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  margin: 0;
}

.dashboard-title .icon {
  width: 40px;
  height: 40px;
}

.logout-btn {
  background: #dc2626;
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  box-shadow: var(--shadow);
}

.logout-btn:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.logout-btn i {
  width: 16px;
  height: 16px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.stat-card {
  background: white;
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: var(--transition);
}

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

.stat-number {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--blue-600);
  margin-bottom: var(--space-2);
  line-height: 1;
}

.stat-label {
  color: var(--gray-600);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Dashboard Sections */
.dashboard-section {
  background: white;
  margin-bottom: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.dashboard-section-header {
  padding: var(--space-5);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.dashboard-section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}

.dashboard-section-title .icon {
  width: 24px;
  height: 24px;
  color: var(--blue-600);
}

.refresh-btn {
  background: var(--blue-600);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.refresh-btn:hover {
  background: var(--blue-700);
}

.refresh-btn i {
  width: 16px;
  height: 16px;
}

/* Dashboard Tables */
.dashboard-table-container {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: auto;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.dashboard-table th,
.dashboard-table td {
  padding: var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.dashboard-table th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
  position: sticky;
  top: 0;
  z-index: 1;
}

.dashboard-table tbody tr:hover {
  background: var(--gray-50);
}

/* Status Badges */
.status {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}

.status.active {
  background: #dcfce7;
  color: #166534;
}

.status.canceled {
  background: #fee2e2;
  color: #991b1b;
}

.status.past_due {
  background: #fed7aa;
  color: #9a3412;
}

/* Dashboard-specific elements */
.amount {
  font-weight: 700;
  color: #059669;
}

.loading {
  text-align: center;
  padding: var(--space-10);
  color: var(--gray-500);
}

.event-type {
  padding: var(--space-1) var(--space-2);
  background: #e0e7ff;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: #3730a3;
  font-weight: 600;
}

.timestamp {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

/* Responsive Dashboard */
@media (max-width: 768px) {
  .dashboard-wrapper {
    padding: var(--space-4) var(--space-3);
  }

  .dashboard-title {
    font-size: var(--text-2xl);
  }

  .dashboard-title .icon {
    width: 28px;
    height: 28px;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-4);
  }

  .stat-number {
    font-size: var(--text-3xl);
  }

  .dashboard-table {
    font-size: var(--text-xs);
  }

  .dashboard-table th,
  .dashboard-table td {
    padding: var(--space-2);
  }

  .dashboard-section-title {
    font-size: var(--text-lg);
  }
}
