/* =============================================================
   VedicSageAuth.css — VedicSage PUBLIC AUTHENTICATION theme
   -------------------------------------------------------------
   Shared stylesheet for unauthenticated auth screens (Login,
   Register, Forgot Password, ...). Each page opts in explicitly
   by linking this file (pages are Layout = null / self-contained).

   Root scope: .vs-auth-page (set on <body> of the adopting page).
   Never loads VedicSageTheme.css / VedicSagePublic.css.
   Class names intentionally match the existing inline auth styles
   (login-visual-side, login-form-card, btn-login, ...) so the
   other auth pages can migrate without markup rewrites.

   Corporate tokens mirror the approved VedicSage palette.
   ============================================================= */

/* -------------------------------------------------------------
   AUTH TOKENS
   ============================================================= */
:root {
    --vs-navy-deep: #0E2A47;
    --vs-navy-royal: #123B68;
    --vs-gold: #C89A3D;
    --vs-gold-dark: #A87F2E;
    --vs-gold-surface: #F5EDD8;
    --vs-text-navy-dark: #0A1F38;
    --vs-text-muted: #555770;
    --vs-border: #D4D8E2;
}

/* -------------------------------------------------------------
   AUTH SHELL
   ============================================================= */
body.vs-auth-page {
    margin: 0;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

.vs-auth-page .full-height-container {
    min-height: 100vh;
}

/* -------------------------------------------------------------
   VISUAL PANEL (left, desktop only — hidden below lg by markup)
   ============================================================= */
.vs-auth-page .login-visual-side {
    background-color: var(--vs-navy-deep);
    color: #ffffff;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* -------------------------------------------------------------
   BRAND (left panel — dominant desktop brand expression)
   White wordmark + restrained corporate gold separator.
   The horizontal logo is NOT used here (navy wordmark is for
   light surfaces).
   ============================================================= */
.vs-auth-page .login-logo h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: #ffffff;
}

.vs-auth-page .login-logo h1::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    margin: 14px auto 0 auto;
    background-color: var(--vs-gold);
    border-radius: 2px;
}

.vs-auth-page .login-logo p {
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: #C9D2E3;
}

/* Navy heading option for future adopting pages (e.g. Register
   card header), kept for reuse — NOT used on Login. */
.vs-auth-page .login-title {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
    color: var(--vs-navy-deep);
    font-size: 1.5rem;
}

/* -------------------------------------------------------------
   ILLUSTRATION (left panel)
   The legacy brightness/contrast/saturate filter compensated for
   the old bright-blue panel; removed for the deep-navy field.
   ============================================================= */
.vs-auth-page .login-illustration img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
}

/* -------------------------------------------------------------
   PATTERN / FORM SIDE (right)
   Domain astrology pattern retained, softened with a light
   neutral overlay so it does not compete with the card.
   Asset casing corrected to the on-disk name (PeasLoginPG.png)
   to prevent case-sensitive hosting failure.
   ============================================================= */
.vs-auth-page .bg-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
        url('/Content/HomePage/img/LoginPage/PeasLoginPG.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.vs-auth-page .login-form-side {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.vs-auth-page .login-form-container {
    width: 100%;
    max-width: 400px;
}

/* -------------------------------------------------------------
   LOGIN CARD
   White, neutral corporate border, restrained navy-tinted shadow.
   ============================================================= */
.vs-auth-page .login-form-card {
    background-color: #ffffff;
    border: 1px solid var(--vs-border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(14, 42, 71, 0.08);
    padding: 40px 30px;
}

/* -------------------------------------------------------------
   CARD BRAND LOGO (supporting brand expression)
   WebP + PNG fallback via <picture> in markup. On <lg viewports
   this becomes the single brand expression.
   ============================================================= */
.vs-auth-page .vs-auth-logo-picture {
    display: block;
    margin: 0 auto 22px auto;
}

.vs-auth-page .vs-auth-logo {
    display: block;
    margin: 0 auto;
    width: 160px;
    max-width: 100%;
    height: auto;
}

/* -------------------------------------------------------------
   FORM CONTROLS
   ============================================================= */
.vs-auth-page .form-label {
    font-weight: 500;
    color: var(--vs-text-navy-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.vs-auth-page .form-control {
    height: 48px;
    border-radius: 8px;
    border: 1px solid var(--vs-border);
    padding-left: 15px;
    background-color: #ffffff;
}

.vs-auth-page .form-control::placeholder {
    color: #adb5bd;
    opacity: 1;
    font-size: 0.9rem;
}

.vs-auth-page .form-control:focus::placeholder {
    color: #ced4da;
}

.vs-auth-page .input-group-text {
    border-radius: 8px 0 0 8px;
    background-color: #f8f9fa;
    border: 1px solid var(--vs-border);
    color: var(--vs-text-muted);
}

/* Focus: royal-navy border + restrained gold ring */
.vs-auth-page .form-control:focus {
    border-color: var(--vs-navy-royal);
    box-shadow: 0 0 0 0.2rem rgba(200, 154, 61, 0.18);
}

.vs-auth-page .form-control:focus + .input-group-text {
    border-color: var(--vs-navy-royal);
}

/* -------------------------------------------------------------
   PRIMARY ACTION (LOGIN — navy, never gold)
   ============================================================= */
.vs-auth-page .btn-login {
    background-color: var(--vs-navy-royal);
    border-color: var(--vs-navy-royal);
    color: #ffffff;
    font-weight: 600;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.vs-auth-page .btn-login:hover,
.vs-auth-page .btn-login:focus {
    background-color: var(--vs-navy-deep);
    border-color: var(--vs-gold);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(14, 42, 71, 0.25);
}

.vs-auth-page .btn-login:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(200, 154, 61, 0.35);
}

/* -------------------------------------------------------------
   SECONDARY LINKS
   ============================================================= */
/* Create free account link (prefix stays .text-muted in markup) */
.vs-auth-page .vs-auth-link {
    color: var(--vs-navy-royal);
    text-decoration: none;
}

.vs-auth-page .vs-auth-link:hover,
.vs-auth-page .vs-auth-link:focus {
    color: var(--vs-gold-dark);
    text-decoration: underline;
}

/* Card footer links (Forgot Password / Continue to homepage) */
.vs-auth-page .login-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--vs-border);
}

.vs-auth-page .footer-link {
    color: var(--vs-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.vs-auth-page .footer-link:hover,
.vs-auth-page .footer-link:focus {
    color: var(--vs-navy-deep);
    text-decoration: none;
}

/* -------------------------------------------------------------
   VALIDATION (semantic danger — preserved, never recolored)
   ============================================================= */
.vs-auth-page .validation-summary-errors {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 15px;
    padding: 10px;
    background-color: #fff5f5;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
}

.vs-auth-page .validation-summary-errors ul {
    margin-bottom: 0;
    padding-left: 15px;
}

/* -------------------------------------------------------------
   ACCESSIBILITY / FOCUS
   ============================================================= */
.vs-auth-page a:focus-visible {
    outline: 2px solid var(--vs-gold-dark);
    outline-offset: 2px;
    border-radius: 2px;
}

/* -------------------------------------------------------------
   REGISTER-SPECIFIC (Register.cshtml opts in; unused on Login)
   ============================================================= */
/* Slightly wider card for registration fields (Login stays 400px) */
.vs-auth-page .register-form-container {
    max-width: 450px;
}

/* Left-panel description lines (Register tagline/description block) */
.vs-auth-page .login-logo h2 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-top: 15px;
    line-height: 1.6;
    color: #C9D2E3;
}

/* Select inside an icon input-group (UserCategory identity) */
.vs-auth-page .input-group .form-select {
    height: 48px;
    border-radius: 0 8px 8px 0;
    border: 1px solid var(--vs-border);
}

.vs-auth-page .input-group .form-select:focus {
    border-color: var(--vs-navy-royal);
    box-shadow: 0 0 0 0.2rem rgba(200, 154, 61, 0.18);
}

/* intlTelInput: full-width phone input; flag/dial-code padding is
   owned by the plugin (padding-left: 52px wins by specificity).
   display:block overrides the plugin's inline-block shrink-to-fit
   so the input matches the other full-width fields. */
.vs-auth-page .iti {
    display: block;
    width: 100%;
}

/* intlTelInput retina fix: the plugin CSS references a flags@2x.png
   sprite that does not exist on disk (only img/flags.png is deployed),
   so high-DPI / mobile devices 404 and render a blank flag. Re-point
   the retina rule to the existing 1x sprite, scoped to auth pages. */
@media (min-resolution: 2x) {
    .vs-auth-page .iti__flag {
        background-image: url('/Content/plugins/img/flags.png?1');
    }
}

/* Full-screen registration loader */
.vs-auth-page #fullscreen-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.vs-auth-page .spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid var(--vs-navy-royal);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: vs-auth-spin 1s linear infinite;
}

@keyframes vs-auth-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Partner-code confirmation strip (success icon inside is injected
   by JS with semantic text-success and stays preserved) */
.vs-auth-page #partnerBranding {
    background-color: #f8f9fa;
    border-left: 4px solid var(--vs-navy-royal);
    padding: 8px 12px;
    border-radius: 4px;
}

/* -------------------------------------------------------------
   SWEETALERT (auth dialog presentation only)
   Scoped to .vs-auth-page so it never leaks application-wide.
   Semantic icon colors (error/success/warning/info) are NOT
   recolored — only chrome, typography, and the confirm button.
   ============================================================= */
.vs-auth-page .swal2-popup {
    width: 400px;
    max-width: calc(100vw - 2rem);
    padding: 1.5rem;
    font-size: 0.9rem;
    background: #fff;
    border: 1px solid var(--vs-border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(14, 42, 71, 0.10);
}

.vs-auth-page .swal2-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--vs-text-navy-dark);
}

.vs-auth-page .swal2-html-container {
    color: var(--vs-text-muted);
    font-size: 0.95rem;
}

.vs-auth-page .swal2-confirm {
    background-color: var(--vs-navy-royal);
    border-color: var(--vs-navy-royal);
    color: #fff;
    font-weight: 600;
}

.vs-auth-page .swal2-confirm:hover,
.vs-auth-page .swal2-confirm:focus {
    background-color: var(--vs-navy-deep);
    border-color: var(--vs-gold);
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(200, 154, 61, 0.35);
}

/* -------------------------------------------------------------
   RESPONSIVE
   Left panel visibility is handled by the existing markup
   (d-none d-lg-flex). Below lg the card logo is the single
   brand expression; no extra mobile banner is added.
   ============================================================= */
@media (max-width: 767.98px) {
    .vs-auth-page .login-form-side {
        padding: 16px 12px;
    }

    .vs-auth-page .login-form-card {
        padding: 28px 20px;
    }
}
