

/* =============================================
   21K School - Download Brochure Form CSS
   Premium UI Enhancement (Inherited Fonts)
   Fixed: OTP success message & submit progress text
   ============================================= */

/* CSS Variables */
:root {
  /* 21K Brand Colors */
  --primary-blue: #003872;
  --primary-gold: #ffbb00;
  --accent-cyan: #00c2e0;
  
  /* Extended Palette */
  --blue-dark: #002651;
  --blue-light: #0052a3;
  --gold-light: #ffd54f;
  --gold-dark: #e5a800;
  --cyan-light: #4dd9ed;
  --cyan-dark: #00a0bd;
  
  /* Neutrals */
  --white: #ffffff;
  --off-white: #f8fafc;
  --gray-50: #f1f5f9;
  --gray-100: #e2e8f0;
  --gray-200: #cbd5e1;
  --gray-300: #94a3b8;
  --gray-400: #64748b;
  --gray-500: #475569;
  --gray-600: #334155;
  --gray-700: #1e293b;
  
  /* Semantic */
  --success: #10b981;
  --success-light: #d1fae5;
  --error: #ef4444;
  --error-light: #fee2e2;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  /* Shadows */
  --shadow-md: 0 4px 12px rgba(0, 56, 114, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 56, 114, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 56, 114, 0.16);
  --shadow-gold: 0 4px 20px rgba(255, 187, 0, 0.35);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   STEP VISIBILITY - CRITICAL
   Step 1 visible by default, Step 2 hidden
   ============================================= */

/* Hide Step 2 by default */
#step2 {
  display: none !important;
}

/* Show Step 2 only when it has .active class */
#step2.active {
  display: block !important;
  animation: stepFadeIn 0.4s ease forwards;
}

/* Step 1 visible by default */
#step1 {
  display: block;
}

/* Hide Step 1 when Step 2 is active */
#step1:not(.active) {
  display: none !important;
}

#step1.active {
  display: block !important;
}

/* Generic step handling */
.step {
  display: none;
}

.step.active {
  display: block;
  animation: stepFadeIn 0.4s ease forwards;
}

@keyframes stepFadeIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =============================================
   Form Container / Card
   ============================================= */
.school-box,
.brochure-form,
.download-brochure-form,
.wpforms-container,
.gform_wrapper {
  background: var(--white) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-xl) !important;
  padding: var(--space-xl) !important;
  position: relative;
  overflow: hidden;
  animation: formSlideUp 0.5s ease forwards;
}

@keyframes formSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gradient Top Accent Bar */
.school-box::before,
.brochure-form::before,
.download-brochure-form::before,
.wpforms-container::before,
.gform_wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-gold), var(--accent-cyan), var(--primary-gold));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  z-index: 10;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =============================================
   Form Labels
   ============================================= */
.school-box label,
.school-label,
.brochure-form label,
.download-brochure-form label,
.wpforms-field-label,
.gfield_label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.01em;
}

/* Required Asterisk */
.brochure-form .required,
.wpforms-required-label,
.gfield_required {
  color: var(--primary-gold);
  font-weight: 700;
  margin-left: 2px;
}

/* Sub-labels (First, Last) */
.brochure-form .sub-label,
.wpforms-field-sublabel,
.name_first label,
.name_last label,
.ginput_container label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-top: var(--space-xs);
  display: block;
}

/* =============================================
   Form Inputs & Selects
   ============================================= */
.school-box input[type="text"],
.school-box input[type="email"],
.school-box input[type="tel"],
.school-box input[type="number"],
.school-box select,
.school-box textarea,
.school-box .form-control,
.school-box .form-select,
.brochure-form input[type="text"],
.brochure-form input[type="email"],
.brochure-form input[type="tel"],
.brochure-form input[type="number"],
.brochure-form select,
.brochure-form textarea,
.download-brochure-form input,
.download-brochure-form select,
.wpforms-field input,
.wpforms-field select,
.wpforms-field textarea,
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper select,
.gform_wrapper textarea {
  width: 100%;
  height: 50px;
  padding: 0 var(--space-md);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--gray-700);
  background: var(--gray-50) !important;
  border: 2px solid transparent !important;
  border-radius: var(--radius-md) !important;
  transition: var(--transition-base);
  outline: none;
  box-shadow: none !important;
}

.school-box input::placeholder,
.brochure-form input::placeholder,
.download-brochure-form input::placeholder,
.wpforms-field input::placeholder,
.gform_wrapper input::placeholder {
  color: var(--gray-300);
}

/* Hover State */
.school-box input:hover,
.school-box select:hover,
.brochure-form input:hover,
.brochure-form select:hover,
.download-brochure-form input:hover,
.download-brochure-form select:hover,
.wpforms-field input:hover,
.wpforms-field select:hover,
.gform_wrapper input:hover,
.gform_wrapper select:hover {
  background: var(--white) !important;
  border-color: var(--gray-200) !important;
}

/* Focus State */
.school-box input:focus,
.school-box select:focus,
.brochure-form input:focus,
.brochure-form select:focus,
.download-brochure-form input:focus,
.download-brochure-form select:focus,
.wpforms-field input:focus,
.wpforms-field select:focus,
.gform_wrapper input:focus,
.gform_wrapper select:focus {
  background: var(--white) !important;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 4px rgba(0, 194, 224, 0.12) !important;
}

/* Select Dropdown Arrow */
.school-box select,
.school-box .form-select,
.brochure-form select,
.download-brochure-form select,
.wpforms-field select,
.gform_wrapper select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  padding-right: 44px !important;
}

/* =============================================
   Grid Layout Helpers
   ============================================= */
.school-box .row {
  display: flex;
  gap: var(--space-md);
}

.school-box .row.g-2 {
  gap: var(--space-sm);
}

.school-box .col-6 {
  flex: 1;
  min-width: 0;
}

.school-box .mt-2 { margin-top: var(--space-sm); }
.school-box .mt-3 { margin-top: var(--space-md); }
.school-box .w-100 { width: 100%; }
.school-box .text-center { text-align: center; }
.school-box .text-muted { color: var(--gray-400); }
.school-box .small { font-size: 0.8125rem; }
.school-box .d-block { display: block; }
.school-box .d-flex { display: flex; }
.school-box .justify-content-center { justify-content: center; }
.school-box .gap-2 { gap: var(--space-sm); }

/* =============================================
   OTP BUTTONS - PREMIUM STYLING
   WhatsApp & SMS with gradients
   ============================================= */

/* Base OTP Button Styles */
.school-box .otp-btn,
.otp-btn,
#sendWaOtpBtn,
#sendSmsOtpBtn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--space-sm) !important;
  height: 52px !important;
  font-family: inherit !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  position: relative !important;
  overflow: hidden !important;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
  line-height: 1.2 !important;
  padding: var(--space-sm) var(--space-md) !important;
}

/* WhatsApp Button - Green Gradient */
.school-box .otp-btn.whatsapp,
.otp-btn.whatsapp,
#sendWaOtpBtn {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
  color: var(--white) !important;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35) !important;
}

.school-box .otp-btn.whatsapp:hover,
.otp-btn.whatsapp:hover,
#sendWaOtpBtn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45) !important;
}

.school-box .otp-btn.whatsapp:active,
.otp-btn.whatsapp:active,
#sendWaOtpBtn:active {
  transform: translateY(0) scale(0.98) !important;
}

/* SMS Button - Blue Gradient */
.school-box .otp-btn.sms,
.otp-btn.sms,
#sendSmsOtpBtn {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--blue-light) 100%) !important;
  color: var(--white) !important;
  box-shadow: 0 4px 16px rgba(0, 56, 114, 0.35) !important;
}

.school-box .otp-btn.sms:hover,
.otp-btn.sms:hover,
#sendSmsOtpBtn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 24px rgba(0, 56, 114, 0.45) !important;
}

.school-box .otp-btn.sms:active,
.otp-btn.sms:active,
#sendSmsOtpBtn:active {
  transform: translateY(0) scale(0.98) !important;
}

/* Shine Effect on Hover */
.school-box .otp-btn::before,
.otp-btn::before,
#sendWaOtpBtn::before,
#sendSmsOtpBtn::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent) !important;
  transition: 0.5s ease !important;
}

.school-box .otp-btn:hover::before,
.otp-btn:hover::before,
#sendWaOtpBtn:hover::before,
#sendSmsOtpBtn:hover::before {
  left: 100% !important;
}

/* OTP Button Icons */
.school-box .otp-btn i,
.otp-btn i,
#sendWaOtpBtn i,
#sendSmsOtpBtn i {
  font-size: 1.25rem !important;
  opacity: 1 !important;
}

/* Loading State */
.school-box .otp-btn.loading,
.otp-btn.loading,
#sendWaOtpBtn.loading,
#sendSmsOtpBtn.loading {
  pointer-events: none !important;
  opacity: 0.85 !important;
}

.school-box .otp-btn.loading::after,
.otp-btn.loading::after {
  content: '' !important;
  width: 18px !important;
  height: 18px !important;
  border: 2px solid transparent !important;
  border-top-color: currentColor !important;
  border-radius: 50% !important;
  animation: spin 0.8s linear infinite !important;
  margin-left: var(--space-sm) !important;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Disabled State */
.school-box .otp-btn:disabled,
.otp-btn:disabled,
#sendWaOtpBtn:disabled,
#sendSmsOtpBtn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* =============================================
   OTP Input Digits
   ============================================= */
.otp-box {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
}

.school-box .otpDigit,
.otpDigit {
  width: 48px !important;
  height: 56px !important;
  text-align: center !important;
  font-family: inherit !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: var(--primary-blue) !important;
  background: var(--gray-50) !important;
  border: 2px solid var(--gray-200) !important;
  border-radius: var(--radius-md) !important;
  transition: var(--transition-base) !important;
  outline: none !important;
  padding: 0 !important;
}

.school-box .otpDigit:focus,
.otpDigit:focus {
  border-color: var(--accent-cyan) !important;
  background: var(--white) !important;
  box-shadow: 0 0 0 4px rgba(0, 194, 224, 0.15) !important;
  transform: scale(1.05);
}

.school-box .otpDigit.filled,
.otpDigit.filled {
  border-color: var(--primary-gold) !important;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
}

.school-box .otpDigit.success,
.otpDigit.success {
  border-color: var(--success) !important;
  background: var(--success-light) !important;
  animation: successPulse 0.3s ease;
}

.school-box .otpDigit.error,
.otpDigit.error {
  border-color: var(--error) !important;
  background: var(--error-light) !important;
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* =============================================
   OTP Verify Box - Hidden by default
   ============================================= */
#otpVerifyBox {
  display: none;
  margin-top: var(--space-md);
}

#otpVerifyBox.show,
#otpVerifyBox[style*="display: block"],
#otpVerifyBox[style*="display:block"] {
  display: block !important;
  animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   OTP Counter & Resend
   ============================================= */
.otp-counter,
#otpCounter {
  text-align: center;
  margin-top: var(--space-md);
  font-size: 0.875rem;
  color: var(--gray-400);
}

.otp-counter .time,
#otpCounter .time {
  font-weight: 600;
  color: var(--primary-blue);
}

.otp-resend,
#otpResend {
  text-align: center;
  margin-top: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--gray-400);
}

.otp-resend.hidden,
#otpResend.hidden {
  display: none;
}

.otp-resend button,
#otpResend button,
#resendOtpBtn {
  background: none !important;
  border: none !important;
  color: var(--accent-cyan) !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
  transition: var(--transition-fast) !important;
  font-family: inherit !important;
  font-size: 0.8125rem !important;
  padding: 0 !important;
  height: auto !important;
  box-shadow: none !important;
}

.otp-resend button:hover,
#otpResend button:hover,
#resendOtpBtn:hover {
  color: var(--cyan-dark) !important;
  transform: none !important;
}

/* =============================================
   OTP SUCCESS MESSAGE - FIXED!
   Script uses .active class, not .show
   ============================================= */
.otp-success-box,
#otpSuccessMsg {
  display: none !important;
  margin-top: var(--space-md);
  padding: var(--space-lg);
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
  border: 2px solid var(--success) !important;
  border-radius: var(--radius-md) !important;
  text-align: center;
  color: var(--gray-700) !important;
  font-size: 0.9375rem !important;
  line-height: 1.6 !important;
}

/* CRITICAL: Script adds .active class after OTP verification */
.otp-success-box.active,
.otp-success-box.show,
#otpSuccessMsg.active,
#otpSuccessMsg.show {
  display: block !important;
  animation: successSlideIn 0.5s ease forwards;
}

#otpSuccessMsg strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: var(--space-xs);
}

@keyframes successSlideIn {
  from {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =============================================
   Error Messages
   ============================================= */
.error-msg,
#phoneError,
#otpMsg,
#pinError,
#consentError {
  font-size: 0.75rem;
  color: var(--error);
  margin-top: var(--space-xs);
}

.error-msg:empty,
#phoneError:empty,
#otpMsg:empty,
#pinError:empty,
#consentError:empty {
  display: none;
}

/* =============================================
   Submit / CTA Button
   ============================================= */
.btn-cta,
#submitBtn,
.school-box button[type="submit"],
.school-box input[type="submit"],
.brochure-form button[type="submit"],
.brochure-form input[type="submit"],
.brochure-form .submit-btn,
.download-brochure-form button,
.wpforms-submit,
.wpforms-submit-container button,
.gform_submit_button,
.gform_button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 56px !important;
  margin-top: var(--space-lg) !important;
  font-family: inherit !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--primary-blue) !important;
  background: linear-gradient(135deg, var(--primary-gold) 0%, var(--gold-light) 100%) !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  cursor: pointer !important;
  transition: var(--transition-base) !important;
  box-shadow: var(--shadow-gold) !important;
  position: relative !important;
  overflow: hidden !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.btn-cta::before,
#submitBtn::before,
.school-box button[type="submit"]::before,
.brochure-form button[type="submit"]::before,
.brochure-form input[type="submit"]::before,
.wpforms-submit::before,
.gform_submit_button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: 0.6s ease;
}

.btn-cta:hover,
#submitBtn:hover,
.school-box button[type="submit"]:hover,
.brochure-form button[type="submit"]:hover,
.brochure-form input[type="submit"]:hover,
.wpforms-submit:hover,
.gform_submit_button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 28px rgba(255, 187, 0, 0.5) !important;
}

.btn-cta:hover::before,
#submitBtn:hover::before,
.school-box button[type="submit"]:hover::before,
.brochure-form button[type="submit"]:hover::before,
.brochure-form input[type="submit"]:hover::before,
.wpforms-submit:hover::before,
.gform_submit_button:hover::before {
  left: 100%;
}

.btn-cta:active,
#submitBtn:active,
.school-box button[type="submit"]:active,
.brochure-form button[type="submit"]:active,
.brochure-form input[type="submit"]:active,
.wpforms-submit:active,
.gform_submit_button:active {
  transform: translateY(0) scale(0.98) !important;
}

.btn-cta:disabled,
#submitBtn:disabled,
.school-box button[type="submit"]:disabled,
.brochure-form button[type="submit"]:disabled {
  background: var(--gray-300) !important;
  color: var(--white) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
  opacity: 0.8 !important;
}

/* Loading State */
.btn-cta.loading,
#submitBtn.loading,
.wpforms-submit.loading,
.gform_submit_button.loading {
  pointer-events: none !important;
  opacity: 0.85 !important;
}

/* =============================================
   SUBMIT PROGRESS BAR - FIXED!
   Shows "Submitting..." text properly
   ============================================= */
.school-box .progress,
.brochure-form .progress,
#submitProgress {
  display: none;
  height: auto !important;
  min-height: 36px !important;
  background: var(--gray-100) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden !important;
  margin-top: var(--space-md) !important;
}

/* When shown via style="display:block" */
#submitProgress[style*="display: block"],
#submitProgress[style*="display:block"] {
  display: block !important;
}

.school-box .progress-bar,
.brochure-form .progress-bar,
#submitProgress .progress-bar {
  height: 36px !important;
  background: linear-gradient(90deg, var(--primary-gold), var(--accent-cyan), var(--primary-gold)) !important;
  background-size: 200% 100% !important;
  animation: progressShimmer 1.5s linear infinite !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--primary-blue) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
}

@keyframes progressShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =============================================
   Checkbox / Consent
   ============================================= */
.school-box .form-check,
.brochure-form .consent-row,
.wpforms-field-checkbox,
.wpforms-field-gdpr-checkbox,
.gfield.consent_field {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.school-box .form-check-input,
.school-box input[type="checkbox"],
.brochure-form input[type="checkbox"],
#consentCheck,
.wpforms-field-checkbox input,
.wpforms-field-gdpr-checkbox input,
.gfield input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  margin-top: 2px !important;
  accent-color: var(--primary-blue) !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

.school-box .form-check-label,
.brochure-form .consent-text,
.wpforms-field-checkbox label,
.wpforms-field-gdpr-checkbox label,
.gfield.consent_field label {
  font-size: 0.75rem;
  color: var(--gray-500);
  line-height: 1.5;
  font-weight: 400;
}

.school-box .form-check-label a,
.brochure-form .consent-text a,
.wpforms-field-checkbox a,
.wpforms-field-gdpr-checkbox a,
.gfield.consent_field a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
}

.school-box .form-check-label a:hover,
.brochure-form .consent-text a:hover,
.wpforms-field-checkbox a:hover,
.wpforms-field-gdpr-checkbox a:hover,
.gfield.consent_field a:hover {
  color: var(--cyan-dark);
  text-decoration: underline;
}

/* =============================================
   intl-tel-input Integration
   ============================================= */
.school-box .iti,
.brochure-form .iti,
.iti {
  width: 100%;
}

.school-box .iti__flag-container,
.brochure-form .iti__flag-container,
.iti__flag-container {
  padding-left: 4px;
}

.school-box .iti__selected-flag,
.brochure-form .iti__selected-flag,
.iti__selected-flag {
  background: var(--gray-100) !important;
  border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
  padding: 0 12px !important;
  height: 46px !important;
  transition: var(--transition-fast) !important;
}

.school-box .iti__selected-flag:hover,
.brochure-form .iti__selected-flag:hover,
.iti__selected-flag:hover {
  background: var(--gray-200) !important;
}

.school-box .iti--separate-dial-code .iti__selected-flag,
.brochure-form .iti--separate-dial-code .iti__selected-flag,
.iti--separate-dial-code .iti__selected-flag {
  background: var(--gray-100) !important;
}

.school-box .iti__selected-dial-code,
.brochure-form .iti__selected-dial-code,
.iti__selected-dial-code {
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-600);
  margin-left: 6px;
}

.school-box .iti__arrow,
.brochure-form .iti__arrow,
.iti__arrow {
  border-top-color: var(--gray-500);
}

/* Dropdown */
.school-box .iti__country-list,
.brochure-form .iti__country-list,
.iti__country-list {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--gray-200) !important;
  font-family: inherit;
  max-height: 220px;
}

.school-box .iti__country,
.brochure-form .iti__country,
.iti__country {
  padding: 10px 14px;
  font-size: 0.875rem;
}

.school-box .iti__country:hover,
.brochure-form .iti__country:hover,
.iti__country:hover {
  background: var(--gray-50);
}

.school-box .iti__country--highlight,
.brochure-form .iti__country--highlight,
.iti__country--highlight {
  background: var(--gray-100);
}

.school-box .iti__dial-code,
.brochure-form .iti__dial-code,
.iti__dial-code {
  color: var(--gray-400);
}

/* Phone input with country code */
.school-box .iti input,
.school-box .iti input[type="tel"],
.brochure-form .iti input,
.brochure-form .iti input[type="tel"],
.iti input,
.iti input[type="tel"] {
  padding-left: 100px !important;
}

/* =============================================
   Error & Success States for Inputs
   ============================================= */
.school-box input.error,
.school-box select.error,
.school-box .form-control.error,
.school-box .form-select.error,
.brochure-form input.error,
.brochure-form select.error,
.wpforms-error,
.gfield_error input,
.gfield_error select {
  border-color: var(--error) !important;
  background: var(--error-light) !important;
}

.school-box input.valid,
.school-box input.success,
.school-box select.valid,
.school-box .form-control.valid,
.school-box .form-select.valid,
.brochure-form input.valid,
.brochure-form select.valid,
.wpforms-valid input,
.gfield_valid input {
  border-color: var(--success) !important;
}

/* =============================================
   OTP Shake Animation (on failure)
   ============================================= */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.otp-box.shake,
.otpDigit.shake,
.otpDigit.otp-shake {
  animation: shake 0.5s ease !important;
}

/* =============================================
   Focus Visible (Accessibility)
   ============================================= */
.school-box *:focus-visible,
.brochure-form *:focus-visible,
.wpforms-container *:focus-visible,
.gform_wrapper *:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.school-box button:focus-visible,
.brochure-form button:focus-visible,
.wpforms-submit:focus-visible {
  outline-offset: 3px;
}

/* =============================================
   Responsive Adjustments
   ============================================= */
@media (max-width: 600px) {
  .school-box,
  .brochure-form,
  .wpforms-container,
  .gform_wrapper {
    padding: var(--space-lg) !important;
    border-radius: var(--radius-lg) !important;
  }

  .school-box .row,
  .brochure-form .name-row,
  .wpforms-field-name .wpforms-field-row {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .otpDigit {
    width: 42px !important;
    height: 50px !important;
    font-size: 1.25rem !important;
  }

  .otp-btn,
  #sendWaOtpBtn,
  #sendSmsOtpBtn {
    height: 48px !important;
    font-size: 0.8125rem !important;
  }

  .btn-cta,
  #submitBtn,
  .school-box button[type="submit"],
  .brochure-form button[type="submit"],
  .wpforms-submit,
  .gform_submit_button {
    height: 52px !important;
    font-size: 0.9375rem !important;
  }
}

/* =============================================
   Override any conflicting Bootstrap/Theme styles
   ============================================= */
.school-box .btn,
.brochure-form .btn {
  box-shadow: none;
}

.school-box .btn:focus,
.brochure-form .btn:focus {
  box-shadow: none;
}

/* Ensure OTP buttons don't inherit btn-secondary or other styles */
.school-box .otp-btn.btn,
.school-box #sendWaOtpBtn.btn,
.school-box #sendSmsOtpBtn.btn,
.brochure-form .otp-btn.btn,
.brochure-form #sendWaOtpBtn.btn,
.brochure-form #sendSmsOtpBtn.btn {
  background-image: none;
}

.school-box #sendWaOtpBtn.btn,
.brochure-form #sendWaOtpBtn.btn {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
}

.school-box #sendSmsOtpBtn.btn,
.brochure-form #sendSmsOtpBtn.btn {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--blue-light) 100%) !important;
}

/* OTP Buttons - Single Row on Mobile */
@media (max-width: 600px) {
  .school-box .row.g-2.mt-1:has(#sendWaOtpBtn) {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  
  .school-box .row.g-2.mt-1:has(#sendWaOtpBtn) > .col-6 {
    flex: 0 0 calc(50% - 4px) !important;
    width: calc(50% - 4px) !important;
    max-width: calc(50% - 4px) !important;
  }
  
  .school-box .row.g-2.mt-1:has(#sendWaOtpBtn) .otp-btn {
    padding: 10px 5px !important;
    font-size: 0.8rem !important;
  }
}

@media (max-width: 600px) {
  .school-box .otp-buttons-row {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  
  .school-box .otp-buttons-row > .col-6 {
    flex: 0 0 calc(50% - 4px) !important;
  }
}
