/* ==========================================================================
   SPELL WELL INDIA - AUTHENTICATION & ONBOARDING THEME STYLESHEET
   File: new_design/css/auth.css
   Covers: Student Login, School Login, Student Register, School Register,
           Forgot Password, Reset Password.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ORGANIC BACKGROUND CANVAS
   -------------------------------------------------------------------------- */
.bg-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background-color: #fcfaf7;
  background-image: 
    radial-gradient(circle at 85% 12%, rgba(255, 117, 26, 0.09) 0%, rgba(255, 154, 60, 0.03) 40%, transparent 65%),
    radial-gradient(circle at 10% 88%, rgba(255, 138, 43, 0.07) 0%, rgba(255, 179, 102, 0.02) 42%, transparent 70%),
    radial-gradient(circle at 50% 30%, rgba(255, 117, 26, 0.03) 0%, transparent 55%);
}

.bg-wave-top {
  position: absolute;
  top: -140px;
  right: -120px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(255, 117, 26, 0.11) 0%, rgba(255, 160, 64, 0.04) 50%, rgba(255, 117, 26, 0) 70%);
  border-radius: 50%;
  filter: blur(50px);
  animation: floatWave 20s ease-in-out infinite alternate;
}

/* Subtle decorative warm ambient glow orb at bottom */
.bg-canvas::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: 20%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 138, 43, 0.08) 0%, rgba(255, 179, 102, 0.02) 50%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

@keyframes floatWave {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, 30px) scale(1.08); }
}

@keyframes fadeInCard {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   2. MAIN WRAPPER & SPLIT LAYOUT
   -------------------------------------------------------------------------- */
.main-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2.5rem;
  padding: 2.5rem 1.5rem;
  box-sizing: border-box;
}
/* Split-screen specific overrides */

.main-wrapper.split-screen {

  max-width: none;

  justify-content: stretch;

  align-items: stretch;

  gap: 0;

  padding: 0;

}



/* --------------------------------------------------------------------------

   3. LEFT HERO SECTION (ILLUSTRATION & WAVE FOOTER BAR)

   -------------------------------------------------------------------------- */

.hero-container {
  flex: 1 1 50%;
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: sticky;
  top: 2.5rem;
  align-self: flex-start;
}



/* Split-screen hero: edge-to-edge */

.split-screen .hero-container {

  flex: 0 0 50%;

  max-width: 50%;

  height: 100vh;

}



.split-screen .hero-art-wrapper {

  border-radius: 0;

  box-shadow: none;

  border: none;

  height: 100%;

}



.split-screen .hero-art-img {

  height: 100%;

  object-fit: cover;

}

/* Sticky alignment for taller forms (e.g. Registration) */
.hero-container.sticky-desktop {
  position: sticky;
  top: 2.5rem;
  align-self: flex-start;
}

.hero-art-wrapper {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(255, 117, 26, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
  background: #ffffff;
  border: 1px solid rgba(255, 140, 50, 0.15);
}

.hero-art-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Live Vector Wave Footer Bar */
.hero-bottom-wave-bar {
  position: absolute;
  bottom: 3.8%;
  left: 2.5%;
  right: 2.5%;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  z-index: 5;
  pointer-events: auto;
  user-select: none;
  background: transparent;
}

.wave-feature-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.66rem, 0.88vw, 0.76rem);
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.wave-feature-item:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.feature-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: #ffffff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.wave-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.45);
  margin: 0 2px;
  flex-shrink: 0;
  border-radius: 1px;
}

/* --------------------------------------------------------------------------
   4. RIGHT AUTH CARD & CONTAINERS
   -------------------------------------------------------------------------- */
.card-container {
  flex: 1 1 45%;
  max-width: 440px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-self: flex-start;
  animation: fadeInCard 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Split-screen overrides */
.split-screen .card-container {
  flex: 1 1 50%;
  max-width: 50%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem;
  box-sizing: border-box;
  overflow-y: auto;
  /* Soft unique light orange warm aura for the card zone */
  background: radial-gradient(circle at 60% 50%, rgba(255, 117, 26, 0.04) 0%, transparent 70%);
}

/* Ensure login card fills height but constrains form width */
.split-screen .login-card,
.split-screen .registration-card {
  height: auto;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 480px;
  margin: auto;
  padding: 1.65rem 2.25rem 1.75rem;
}

/* Form and other direct children should fill card width */
.split-screen .login-card > *,
.split-screen .registration-card > * {
  width: 100%;
}

/* Responsive: stack columns on narrow screens */
@media (max-width: 768px) {
  .split-screen {
    flex-direction: column;
    align-items: stretch;
  }
  .split-screen .hero-container,
  .split-screen .card-container {
    flex: none;
    max-width: none;
    height: auto;
  }
}



.card-container.reg-card-container {
  max-width: 580px;
}

.login-card,
.registration-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.45rem 1.85rem 1.5rem;
  box-shadow: 
    0 14px 36px rgba(15, 23, 42, 0.05),
    0 2px 8px rgba(255, 117, 26, 0.04),
    0 0 0 1px rgba(255, 117, 26, 0.08);
  width: 100%;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  border: 1px solid rgba(255, 117, 26, 0.09);
}

.registration-card {
  padding: 1.3rem 1.85rem 1.5rem;
}

/* Card Header */
.card-header {
  margin-bottom: 0.5rem;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  text-align: center !important;
}

.mobile-brand-logo {
  display: none;
  margin-bottom: 0.75rem;
  text-align: center;
}

.mobile-brand-logo img {
  max-width: 150px;
  height: auto;
}

.card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.1rem;
  letter-spacing: -0.02em;
  display: block !important;
  text-align: center !important;
  width: 100% !important;
}

.card-subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
  text-align: center;
}

/* --------------------------------------------------------------------------
   5. ALERTS & NOTIFICATIONS
   -------------------------------------------------------------------------- */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.825rem;
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.auth-alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.auth-alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.auth-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.auth-alert-link {
  color: #ff751a;
  font-weight: 600;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   6. FORM CONTROLS & INPUTS
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 0.55rem;
  display: flex;
  flex-direction: column;
}

.form-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.25rem;
  /*display: flex;*/
  align-items: center;
  justify-content: space-between;
}

.form-label .req {
  color: #ff751a;
  margin-left: 2px;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.forgot-link {
  font-family: 'Poppins', sans-serif;
  font-size: 0.775rem;
  color: #ff751a;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.forgot-link:hover {
  color: #ea580c;
  text-decoration: underline;
}

.input-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.input-icon-left {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  fill: #94a3b8;
  color: #94a3b8;
  pointer-events: none;
  z-index: 2;
  transition: fill 0.2s ease, color 0.2s ease;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 42px;
  padding: 0.62rem 0.9rem 0.62rem 2.5rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.84rem;
  color: #1e293b;
  background-color: #ffffff;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  /* Prevent long option text breaking the grid layout */
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-textarea {
  height: auto;
}

.form-input.has-toggle {
  padding-right: 2.75rem;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #94a3b8;
  font-weight: 400;
  font-size: 0.85rem;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #ff751a;
  box-shadow: 0 0 0 3.5px rgba(255, 117, 26, 0.14);
}

.input-field-wrap:focus-within .input-icon-left {
  fill: #ff751a;
  color: #ff751a;
}

.password-toggle-btn {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: color 0.18s ease;
}

.password-toggle-btn:hover {
  color: #475569;
}

.password-toggle-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.field-error-text {
  font-family: 'Poppins', sans-serif;
  font-size: 0.80rem;
  color: #ef4444;
  margin-top: 0.2rem;
  font-weight: 500;
  line-height: 1.25;
}

.field-error-text:empty {
  display: none;
  margin: 0;
}

/* --------------------------------------------------------------------------
   7. 2-COLUMN REGISTRATION GRID
   -------------------------------------------------------------------------- */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1rem;
  row-gap: 0;
  /* Prevent grid columns from expanding beyond 1fr due to long content */
  min-width: 0;
}

/* Critical: grid children must have min-width:0 to prevent overflow */
.form-grid-2 > .form-group {
  min-width: 0;
  overflow: hidden;
}

.form-col-full {
  grid-column: 1 / -1;
}

.optional-note {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   8. SELECT2 CUSTOM STYLING (THEMED TO MATCH INPUTS)
   -------------------------------------------------------------------------- */
.input-field-wrap .select2-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.input-field-wrap .select2-container--default .select2-selection--single {
  height: 42px !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding-left: 2.5rem !important;
  padding-right: 2.2rem !important;
  display: block !important;
  background-color: #ffffff !important;
  box-sizing: border-box !important;
  position: relative !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.input-field-wrap .select2-container--default .select2-selection--single .select2-selection__rendered {
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.84rem !important;
  color: #1e293b !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
  line-height: 39px !important;
  height: 39px !important;
  /* Prevent long option text from breaking the grid layout */
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}

.input-field-wrap .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #94a3b8 !important;
  line-height: 39px !important;
}

.input-field-wrap .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px !important;
  width: 20px !important;
  right: 10px !important;
  top: 1px !important;
  position: absolute !important;
}

.input-field-wrap .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #888 transparent transparent transparent !important;
  border-style: solid !important;
  border-width: 5px 4px 0 4px !important;
  height: 0 !important;
  left: 50% !important;
  margin-left: -4px !important;
  margin-top: -2px !important;
  position: absolute !important;
  top: 50% !important;
  width: 0 !important;
}

.input-field-wrap .select2-container--default.select2-container--open .select2-selection--single,
.input-field-wrap .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #ff751a !important;
  box-shadow: 0 0 0 3.5px rgba(255, 117, 26, 0.14) !important;
}

.select2-dropdown {
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08) !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.85rem !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #ff751a !important;
  color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   9. CHECKBOXES & OPTIONS
   -------------------------------------------------------------------------- */
.remember-row,
.checkbox-agreement-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.remember-row input[type="checkbox"],
.checkbox-agreement-box input[type="checkbox"] {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  accent-color: #ff751a;
  cursor: pointer;
  margin: 0;
}

.remember-row span,
.checkbox-agreement-box span {
  font-family: 'Poppins', sans-serif;
  font-size: 0.825rem;
  color: #475569;
}

/* --------------------------------------------------------------------------
   10. BUTTONS & ACTIONS
   -------------------------------------------------------------------------- */
.btn-submit-main,
.btn-login {
  width: 100%;
  padding: 0.72rem 1.15rem;
  text-align: center;
  line-height: 1.4;
  background: linear-gradient(135deg, #ff751a 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  border-radius: 9px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  box-shadow: 0 3px 12px rgba(255, 117, 26, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-submit-main:hover,
.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 117, 26, 0.42);
}

.btn-submit-main:active,
.btn-login:active {
  transform: translateY(0);
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.btn-submit-main:hover .btn-arrow,
.btn-login:hover .btn-arrow {
  transform: translateX(3px);
}

/* Google OAuth Button */
.btn-google,
.btn-google-signup {
  width: 100%;
  padding: 0.72rem 1rem;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-google:hover,
.btn-google-signup:hover {
  border-color: #cbd5e1;
  background-color: #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-google svg,
.btn-google-signup svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Secondary Button Grid (School Login / School Register) */
.school-buttons-grid,
.secondary-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

/* When there are an odd number of secondary buttons, make the 3rd button span 2 columns nicely */
.secondary-buttons-grid > a:nth-child(3):last-child {
  grid-column: 1 / -1;
}

.btn-school-outline,
.btn-outline-pill {
  padding: 0.55rem 0.7rem;
  background: #ffffff;
  border: 1.5px solid #ff751a;
  border-radius: 9px;
  color: #ff751a;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
  text-align: center;
}

.btn-school-outline:hover,
.btn-outline-pill:hover {
  background-color: #fff7ed;
  color: #ea580c;
  border-color: #ea580c;
}

.btn-school-outline svg,
.btn-outline-pill svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   11. DIVIDERS & FOOTER SWITCH TEXT
   -------------------------------------------------------------------------- */
.form-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 0.65rem 0;
  color: #94a3b8;
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.form-divider span {
  padding: 0 0.65rem;
}

.card-footer-box,
.register-switch-row {
  margin-top: 0.65rem;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  color: #64748b;
}

.auth-link {
  color: #ff751a;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-link:hover {
  color: #ea580c;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   12. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .main-wrapper {
    flex-direction: column;
    max-width: 540px;
    padding: 2rem 1rem;
    gap: 1.5rem;
  }

  .hero-container {
    position: static !important;
  }

  .card-container,
  .card-container.reg-card-container {
    max-width: 480px;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 768px) {
  .hero-container {
    display: none;
  }

  .mobile-brand-logo {
    display: block;
  }

  .card-container,
  .card-container.reg-card-container {
    max-width: 100%;
  }

  .login-card,
  .registration-card {
    padding: 2rem 1.5rem;
    border-radius: 18px;
  }

  /* Split-screen responsive */
  .split-screen {
    flex-direction: column;
    align-items: stretch;
  }
  .split-screen .hero-container,
  .split-screen .card-container {
    flex: none;
    max-width: none;
    height: auto;
  }
}

@media (max-width: 480px) {
  .main-wrapper {
    padding: 1rem 0.75rem;
  }

  .login-card,
  .registration-card {
    padding: 1.75rem 1.15rem 1.5rem;
    border-radius: 16px;
  }

  .card-title {
    font-size: 1.45rem;
  }

  .school-buttons-grid,
  .secondary-buttons-grid {
    grid-template-columns: 1fr;
  }

  .hero-bottom-wave-bar {
    bottom: 2.5%;
    left: 1%;
    right: 1%;
  }

  .wave-feature-item {
    font-size: 0.58rem;
    gap: 3px;
  }

  .feature-icon {
    width: 12px;
    height: 12px;
  }

  .wave-sep {
    height: 11px;
    margin: 0 1px;
  }
}
