/* ==========================================================================
   CredentialForms.css

   Shared styles for the credential pages: Login.aspx, Signup.aspx,
   SchoolSignup.aspx (and the SchoolSetup wizard). Single source of truth
   for the glass-morphism cyan theme so the three flows stay visually
   consistent and tweaks happen in one place.

   Font: Inter (loaded via Google Fonts in each page's <head>).
   ========================================================================== */


/* --------------------------------------------------------------------------
   Font — Inter on body + every form/button element so .btnDefault,
   .InputBox etc. don't fall back to whatever MainStyles.css declares first.
   The .InputBox / .btnDefault selectors win against Login.css / MainStyles.css
   because they're in a stylesheet loaded later in the cascade.
   -------------------------------------------------------------------------- */

body,
.InputBox,
.form-input,
.form-select,
.form-label,
.btnDefault,
.nav-button,
.oauth-btn,
.oauth-btn-compact,
.welcome-title,
.screen-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}


/* ==========================================================================
   Original layout/component styles below.

   What lives here:
     - OAuth buttons (side-by-side compact pills) + divider + verified banner
     - Password field: visibility toggle, hover-tooltip requirements,
       strength meter
     - Form group / form input / form label (tightened spacing)
     - Verified-as banner (used after OAuth handshake on SchoolSignup)
     - Screen content glass-card panel (used by SchoolSignup wizard)

   What does NOT live here:
     - .btnDefault button (already in MainStyles.css — don't duplicate)
     - .InputBox base style (already in Login.css)
     - Page-specific layout (background grid, animations, max-widths)
   ========================================================================== */


/* --------------------------------------------------------------------------
   OAuth buttons — side-by-side compact pills
   -------------------------------------------------------------------------- */

.oauth-row {
    display: flex;
    gap: 10px;
    margin: 0 0 16px 0;
}

.oauth-btn-compact {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    font-family: inherit;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.oauth-btn-compact:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.oauth-btn-compact svg { flex-shrink: 0; }


/* Stacked OAuth variant — full-width pills, used on the narrow Login / Signup
   centered cards where horizontal space doesn't accommodate side-by-side. */

.oauth-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin: 0;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    padding: 11px 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    font-family: inherit;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.oauth-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.oauth-btn svg { flex-shrink: 0; }

.oauth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.82rem;
}

.oauth-divider::before,
.oauth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}


/* --------------------------------------------------------------------------
   Verified-as banner — shown after OAuth handshake
   -------------------------------------------------------------------------- */

.oauth-verified-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    margin: 0 0 18px 0;
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.35);
    border-radius: 10px;
    color: #00d4aa;
    font-size: 0.95rem;
}

.oauth-verified-banner .verified-email {
    color: #ffffff;
    font-weight: 600;
}


/* --------------------------------------------------------------------------
   Password field: visibility toggle + hover-tooltip requirements + strength meter
   -------------------------------------------------------------------------- */

/* Hide browser-native password reveal (Edge/IE) so only our toggle shows */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display: none; }

.pwd-field-wrap {
    position: relative;
    display: block;
    margin-bottom: 1rem;
}
.pwd-field-wrap .InputBox,
.pwd-field-wrap .form-input { margin-bottom: 0; }

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.2s ease;
    line-height: 0;
    display: none;   /* hidden until field has text */
    z-index: 2;
}
.toggle-password.is-visible { display: block; }
.toggle-password:hover { color: rgba(0, 204, 255, 0.9); }

/* Eye icon swap: eye-off shown when hidden, eye shown when revealed */
.toggle-password .icon-eye { display: none; }
.toggle-password .icon-eye-off { display: block; }
.toggle-password.is-shown .icon-eye { display: block; }
.toggle-password.is-shown .icon-eye-off { display: none; }

/* Cursor-following requirements tooltip on the strength meter */
.password-strength { cursor: help; }

.pwd-requirements {
    position: fixed;
    left: 0;
    top: 0;
    max-width: 260px;
    background: rgba(40, 40, 40, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.82rem;
    text-align: left;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}
.pwd-requirements.is-visible {
    opacity: 0.92;
    visibility: visible;
}

/* Arrow pointing up-left toward the cursor */
.pwd-requirements::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 10px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(40, 40, 40, 0.92);
}

.req-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 8px 0;
    font-weight: 600;
}

.req-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    color: rgba(255, 255, 255, 0.65);
    transition: color 0.2s ease;
}
.req-item.met { color: #00ff88; }

.req-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.req-item .icon-check { display: none; }
.req-item .icon-cross { display: block; color: rgba(255, 255, 255, 0.4); }
.req-item.met .icon-check { display: block; }
.req-item.met .icon-cross { display: none; }

.password-strength {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.password-strength.visible { display: flex; }

.strength-bars {
    display: flex;
    gap: 4px;
    flex: 1;
}

.strength-bar {
    height: 4px;
    flex: 1;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.strength-text {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}


/* --------------------------------------------------------------------------
   Form group / form-input / form-label — used by SchoolSignup wizard.
   Tighter spacing than the original (16px vs 25px gaps) to reduce scrolling.
   -------------------------------------------------------------------------- */

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-label {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid rgba(0, 204, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-select option {
    color: #000000;
    background: #ffffff;
}

.form-input:focus,
.form-select:focus {
    border-color: #00ccff;
    box-shadow: 0 0 0 3px rgba(0, 204, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.validation-message {
    margin-top: 6px;
    font-size: 0.88rem;
    min-height: 18px;
}

.validation-message.success,
.validation-message .success,
span.success { color: #00d4aa; }

.validation-message.error,
.validation-message .error,
span.error { color: #ff4757; }

.validation-message.info,
.validation-message .info,
span.info { color: #4dd4ff; }


/* --------------------------------------------------------------------------
   Glass-card panel — used by SchoolSignup / SchoolSetup wizards
   -------------------------------------------------------------------------- */

.screen-content {
    background: linear-gradient(145deg,
        rgba(25, 55, 109, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(25, 55, 109, 0.12) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 28px;
    border-radius: 24px;
    box-shadow:
        0 8px 32px rgba(25, 55, 109, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: center;
    max-width: 700px;
    width: 90%;
    max-height: 92vh;
    overflow-y: auto;
    border: 1px solid rgba(25, 55, 109, 0.3);
    position: relative;
    z-index: 10;
}

.screen-title {
    font-size: 2rem;
    background: linear-gradient(135deg, #00ccff 0%, #4dd4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px 0;
    font-weight: 700;
}

@media (max-width: 768px) {
    .screen-content {
        padding: 22px 18px;
        margin: 10px;
    }
    .screen-title {
        font-size: 1.7rem;
    }
}


/* --------------------------------------------------------------------------
   Submit-button sizing on credential pages.
   Matches the height of the adjacent input field and trims the width by ~25%
   so the action sits as a clear, compact target rather than a full-bleed bar.
   Targets:
     - .btnDefault on Login.aspx and Signup.aspx (paired with .InputBox)
     - .nav-button on SchoolSignup.aspx (paired with .form-input)
   The !important is needed to win against MainStyles.css's .btnDefault
   declarations (font-size / padding / max-width) and the inline style="width"
   that ASP.NET asp:Button sometimes emits.
   -------------------------------------------------------------------------- */

.btnDefault {
    padding: 10px 20px !important;
    font-size: 0.95rem !important;
    width: 60% !important;
    max-width: 180px !important;
    margin: 12px auto !important;
}

.nav-button {
    padding: 10px 20px;
    font-size: 0.95rem;
    width: 60%;
    max-width: 400px;
    margin: 8px auto;
}
