/* ================================================================
   Culture For Good - Modern Affiliates Page Styles
   Enhanced UI with brand colors and professional design
   ================================================================ */

/* Affiliate Hero Section */
.affiliate-hero {
  background: linear-gradient(135deg, #40A944 0%, #358a38 100%);
  padding: 4rem 0;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.affiliate-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(80, 92, 166, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.affiliate-hero-content {
  text-align: center;
  color: #ffffff;
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.affiliate-hero-content h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ffffff;
}

.affiliate-hero-content p {
  font-size: 1.125rem;
  opacity: 0.95;
  color: #ffffff;
}

/* Affiliate Form Section */
.affiliate-form-section {
  padding-bottom: 4rem;
}

/* Intro Card */
.affiliate-intro-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.affiliate-intro-card h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #222222;
  margin-bottom: 1rem;
}

.affiliate-intro-card p {
  font-size: 1rem;
  color: #666;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.comp-plan-link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: #505ca6;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.75rem 1.25rem;
  border: 2px solid #505ca6;
  border-radius: 8px;
}

.comp-plan-link:hover {
  background: #505ca6;
  color: #ffffff;
}

.comp-plan-link svg {
  flex-shrink: 0;
}

/* Form Section Card */
.form-section-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid #e0e0e0;
}

.form-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #222222;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #40A944;
}

/* Form Styling Enhancements */
.checkout_form label {
  display: block;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.checkout_form label span {
  color: #b2023e;
}

.checkout_form input[type="text"],
.checkout_form input[type="password"],
.checkout_form input[type="email"],
.checkout_form input[type="tel"],
.checkout_form textarea,
.checkout_form select,
.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  background: #ffffff;
  font-family: 'Poppins', sans-serif;
  line-height: 1.5;
}

.checkout_form input[type="text"]:hover,
.checkout_form input[type="password"]:hover,
.checkout_form input[type="email"]:hover,
.checkout_form input[type="tel"]:hover,
.checkout_form select:hover,
.form-control:hover {
  border-color: #c0c0c0;
}

.checkout_form input[type="text"]:focus,
.checkout_form input[type="password"]:focus,
.checkout_form input[type="email"]:focus,
.checkout_form input[type="tel"]:focus,
.checkout_form textarea:focus,
.checkout_form select:focus,
.form-control:focus {
  outline: none;
  border-color: #40A944;
  box-shadow: 0 0 0 4px rgba(64, 169, 68, 0.1);
  background: #fafffe;
}

/* Select dropdown arrow styling */
.checkout_form select,
.form-control select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.checkout_form .mb-20 {
  margin-bottom: 1.5rem;
}

.checkout_form span i {
  font-style: italic;
  color: #666;
  font-size: 0.875rem;
  display: block;
  margin-top: 0.375rem;
}

/* Form Container */
.form-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

/* Validators */
.validator {
  color: #b2023e;
  font-size: 0.875rem;
  margin-top: 0.375rem;
  display: block;
}

/* Checkbox Styling */
.checkout_form input[type="checkbox"],
.form-checkbox {
  width: auto;
  margin-right: 0.75rem;
  cursor: pointer;
  accent-color: #40A944;
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.checkbox-label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
  line-height: 1.5;
}

/* Submit Button */
.buttons {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.buttons input[type="submit"],
.buttons .cfgButton {
  background: linear-gradient(135deg, #40A944 0%, #358a38 100%);
  color: #ffffff;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(64, 169, 68, 0.2);
  font-family: 'Poppins', sans-serif;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
}

.buttons input[type="submit"]:hover,
.buttons .cfgButton:hover {
  background: linear-gradient(135deg, #358a38 0%, #2d7330 100%);
  box-shadow: 0 4px 12px rgba(64, 169, 68, 0.3);
  transform: translateY(-2px);
}

.buttons input[type="submit"]:active,
.buttons .cfgButton:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(64, 169, 68, 0.2);
}

/* Processing State */
.processing {
  opacity: 0.6;
  pointer-events: none;
}

/* Loading Panel */
#loadingPanel {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 1000;
  text-align: center;
}

/* Turnstile Wrapper */
.cf-turnstile {
  margin: 1.5rem 0;
}

/* Alert Styles */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.alert-danger,
.alert-error {
  background: #fff5f5;
  color: #b2023e;
  border-left: 4px solid #b2023e;
}

.alert-success {
  background: #f0fdf4;
  color: #358a38;
  border-left: 4px solid #40A944;
}

/* Form Status Messages */
.form-status {
  display: block;
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Textarea Styling */
.checkout_form textarea {
  min-height: 120px;
  resize: vertical;
  font-family: 'Poppins', sans-serif;
}

/* Input Helper Text */
.checkout_form .mb-20 span i {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #666;
  font-style: italic;
  line-height: 1.4;
}

/* Focus Ring for Better Accessibility */
.checkout_form input[type="text"]:focus,
.checkout_form input[type="password"]:focus,
.checkout_form input[type="email"]:focus,
.checkout_form input[type="tel"]:focus,
.checkout_form textarea:focus,
.checkout_form select:focus,
.form-control:focus {
  outline: none;
  border-color: #40A944;
  box-shadow: 0 0 0 4px rgba(64, 169, 68, 0.1);
  background: #fafffe;
}

/* Disabled State */
.checkout_form input[type="text"]:disabled,
.checkout_form input[type="password"]:disabled,
.checkout_form input[type="email"]:disabled,
.checkout_form select:disabled,
.form-control:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Row Gutters */
.checkout_form .row {
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}

.checkout_form .row > [class*="col-"] {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .affiliate-hero {
    padding: 3rem 0;
  }

  .affiliate-hero-content h1 {
    font-size: 2rem;
  }

  .affiliate-hero-content p {
    font-size: 1rem;
  }

  .affiliate-intro-card,
  .form-section-card {
    padding: 1.5rem;
  }

  .affiliate-intro-card h2 {
    font-size: 1.5rem;
  }

  .form-section-title {
    font-size: 1.25rem;
  }
  
  .checkout_form .mb-20 {
    margin-bottom: 1.25rem;
  }
}

@media (max-width: 480px) {
  .affiliate-hero {
    padding: 2rem 0;
  }

  .affiliate-hero-content h1 {
    font-size: 1.75rem;
  }

  .affiliate-intro-card,
  .form-section-card {
    padding: 1.25rem;
  }

  .comp-plan-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
