/* ==========================================================================
   Wind UI for the sign-up screen (signinoptionslatest.jsp, /sign-in-options), 2026-11-14. JSP kept, skin only:
   every id, class the script toggles (.active, .show, .hidden, .loading), form and the Firebase flow are unchanged.
   Tokens and the page background come from auth.css (the sign-in screens); this file lays out the two halves:
   the sign-up card on the left, a brand panel on the right (it replaced a hot-linked stock photo: generic, an outside
   dependency, and wrong next to a school's own branding).
   ========================================================================== */

body.wa-signup {
  flex-direction: row;
  min-height: 100vh;
}

/* ── Left: the card ── */
.wa-signup .left-section {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.wa-signup .content-wrapper {
  width: min(420px, 100%);
  padding: 36px 32px 28px;
  background: var(--wind-surface);
  border: 1px solid var(--wind-line);
  border-radius: var(--radius-wind);
  box-shadow: var(--wind-shadow-lift);
}
.wa-signup .logo { display: flex; justify-content: flex-start; margin-bottom: 22px; }
.wa-signup .logo img { height: 40px !important; width: auto; }
.wa-signup h1 {
  margin: 0 0 6px;
  font: 600 24px/1.3 'Poppins', sans-serif;
  color: var(--wind-ink);
}
.wa-signup .subtitle { margin: 0 0 22px; font-size: 13.5px; color: var(--wind-ink-3); }
.wa-signup .subtitle:empty { margin: 0 0 18px; }

/* Option buttons (Phone, Email) */
.wa-signup .btn {
  position: relative;
  width: 100%;
  min-height: 48px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wind-line-strong);
  border-radius: var(--radius-wind-inner);
  background: var(--wind-surface);
  color: var(--wind-ink);
  font: 600 14px/1 'Poppins', sans-serif;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.wa-signup .btn:hover { border-color: var(--wind-accent); background: var(--wind-accent-soft); }
.wa-signup .btn:focus-visible { outline: 2px solid var(--wind-accent); outline-offset: 2px; }
.wa-signup .btn:disabled { opacity: 0.6; cursor: not-allowed; }
.wa-signup .btn i { color: var(--wind-accent); }
.wa-signup .btn .btn-content { display: flex; align-items: center; gap: 10px; transition: opacity 0.3s ease; }
.wa-signup .btn.hidden { display: none !important; }
.wa-signup .btn.loading .btn-content { opacity: 0.3; }
.wa-signup .btn-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--wind-accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: wa-spin 0.6s linear infinite;
}

/* "Back to all options" and "Back" */
.wa-signup .back-to-options-btn,
.wa-signup .back-btn {
  display: none;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--wind-accent);
  font: 600 13px/1.4 'Poppins', sans-serif;
  cursor: pointer;
}
.wa-signup .back-to-options-btn.show { display: inline-flex; }
.wa-signup .back-btn { display: inline-flex; }
.wa-signup .back-to-options-btn:hover,
.wa-signup .back-btn:hover { text-decoration: underline; }

/* Phone / email fields: shown by the script with .active */
.wa-signup .input-container { display: none; margin: 0 0 12px; }
.wa-signup .input-container.active { display: block; animation: wa-fade 0.25s ease; }
.wa-signup .input-container input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--wind-line-strong);
  border-radius: var(--radius-wind-inner);
  background: var(--wind-surface);
  color: var(--wind-ink);
  font: 400 15px/1 'Poppins', sans-serif;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wa-signup .input-container input:focus {
  border-color: var(--wind-accent);
  box-shadow: 0 0 0 3px var(--wind-accent-soft);
}
.wa-signup .error-msg { display: none; margin-top: 6px; font-size: 12.5px; color: var(--wind-alert); }
.wa-signup .error-msg.show { display: block; animation: wa-fade 0.25s ease; }

/* Continue / Verify */
.wa-signup .continue-btn {
  display: none;
  width: 100%;
  min-height: 46px;
  margin: 4px 0 6px;
  border: 0;
  border-radius: 999px;
  background: var(--wind-accent);
  color: #fff;
  font: 600 14px/1 'Poppins', sans-serif;
  cursor: pointer;
  transition: background 0.15s ease;
}
.wa-signup .continue-btn.active { display: block; }
.wa-signup .continue-btn:hover { background: var(--wind-accent-hover); }
.wa-signup .continue-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.wa-signup .loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: wa-spin 0.6s linear infinite;
}

/* The code screen (the script shows it) */
.wa-signup .otp-container { display: none; text-align: center; }
.wa-signup .otp-title { font: 600 18px/1.3 'Poppins', sans-serif; color: var(--wind-ink); margin-bottom: 4px; }
.wa-signup .otp-subtitle { font-size: 13px; color: var(--wind-ink-3); margin-bottom: 18px; }
.wa-signup .otp-subtitle span { color: var(--wind-ink); font-weight: 600; }
.wa-signup .otp-input-container { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.wa-signup .otp-input {
  width: 44px;
  height: 52px;
  border: 1px solid var(--wind-line-strong);
  border-radius: 12px;
  text-align: center;
  font: 600 20px/1 'Poppins', sans-serif;
  color: var(--wind-ink);
  outline: none;
}
.wa-signup .otp-input:focus { border-color: var(--wind-accent); box-shadow: 0 0 0 3px var(--wind-accent-soft); }
.wa-signup .resend-otp { margin-top: 12px; font-size: 12.5px; color: var(--wind-ink-3); }
.wa-signup .resend-otp a { color: var(--wind-accent); font-weight: 600; text-decoration: none; }

/* Terms and "Log in" */
.wa-signup .terms,
.wa-signup .login-link { margin: 16px 0 0; font-size: 12.5px; line-height: 1.5; text-align: center; color: var(--wind-ink-3); }
.wa-signup .login-link { margin-top: 8px; }
.wa-signup .terms a,
.wa-signup .login-link a { color: var(--wind-accent); font-weight: 600; text-decoration: none; }
.wa-signup .terms a:hover,
.wa-signup .login-link a:hover { text-decoration: underline; }

/* Message dialog (the script shows it with display:flex) */
.wa-signup .modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
}
.wa-signup .modal-content {
  width: min(420px, 90%);
  padding: 36px 32px;
  border-radius: var(--radius-wind);
  background: var(--wind-surface);
  box-shadow: var(--wind-shadow-lift);
  text-align: center;
  animation: wa-fade 0.3s ease;
}
.wa-signup .modal-content .icon { font-size: 52px; color: var(--wind-ok); margin-bottom: 14px; }
.wa-signup .modal-content h2 { margin: 0 0 8px; font: 600 20px/1.3 'Poppins', sans-serif; color: var(--wind-ink); }
.wa-signup .modal-content p { margin: 0 0 22px; font-size: 14px; color: var(--wind-ink-2); }
.wa-signup #otpContinueBtn {
  min-height: 44px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--wind-accent);
  color: #fff;
  font: 600 14px/1 'Poppins', sans-serif;
  cursor: pointer;
}
.wa-signup #otpContinueBtn:hover { background: var(--wind-accent-hover); }

/* Google's own button is not used (commented out in the page) */
.wa-signup .g_id_signin,
.wa-signup #g_id_onload,
.wa-signup .g_id_signin > div { display: none !important; }

/* ── Right: the brand panel ── */
.wa-signup .right-section {
  flex: 1 1 50%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background:
    radial-gradient(60% 50% at 50% 42%, rgba(70, 23, 143, 0.22) 0%, transparent 70%),
    radial-gradient(40% 40% at 85% 90%, rgba(30, 136, 229, 0.14) 0%, transparent 70%),
    linear-gradient(160deg, #f6f1fd 0%, #eef2fb 100%);
  border-left: 1px solid var(--wind-line);
}
.wa-signup .su-panel { position: relative; max-width: 440px; text-align: center; }
.wa-signup .su-mark {
  width: 132px;
  height: auto;
  margin: 0 auto 28px;
  display: block;
  filter: drop-shadow(0 18px 30px rgba(70, 23, 143, 0.25));
}
.wa-signup .su-line {
  margin: 0;
  font: 500 clamp(22px, 2.2vw, 30px)/1.35 'Poppins', sans-serif;
  color: var(--wind-ink);
  letter-spacing: -0.01em;
}
.wa-signup .su-line .su-l { display: block; }
.wa-signup .su-line .su-accent { color: var(--wind-accent); }
/* A school's own branding: the panel keeps its colour but not Vidyalay's mark and line. */
.wa-signup .right-section.su-tenant .su-panel { display: none; }

@keyframes wa-spin { to { transform: rotate(360deg); } }
@keyframes wa-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* Phones and narrow windows: the card only. */
@media (max-width: 900px) {
  .wa-signup .right-section { display: none; }
  .wa-signup .left-section { padding: 28px 16px; }
}
@media (max-width: 480px) {
  .wa-signup .content-wrapper { padding: 28px 20px 22px; }
  .wa-signup .otp-input { width: 40px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-signup * { animation: none !important; transition: none !important; }
}

/* Once Phone or Email is chosen, only that path shows ("Back to all options" brings the two buttons back). The old
   page left both buttons above the field; CSS only, so the script is unchanged. */
.wa-signup #authView:has(.back-to-options-btn.show) #phoneBtn,
.wa-signup #authView:has(.back-to-options-btn.show) #emailBtn { display: none; }
