/*
 * ExamEngine Customer Authentication Surface R3
 *
 * Loaded ONLY on customer authentication routes.
 *
 * Storefront header/footer/navigation remain available to
 * normal public pages, but are not part of authentication UX.
 */


/* ==========================================================
   REMOVE STOREFRONT CHROME
   ========================================================== */

header,
footer,

header nav,
footer nav,

body > nav,

.site-header,
.site-footer,

.store-header,
.store-footer,

.storefront-header,
.storefront-footer,

.ee-storefront-header,
.ee-storefront-footer,

.ee-public-header,
.ee-public-footer,

.public-header,
.public-footer,

[class*="storefront"][class*="header"],
[class*="storefront"][class*="footer"],

[class*="site-"][class*="header"],
[class*="site-"][class*="footer"],

[class*="public-"][class*="header"],
[class*="public-"][class*="footer"],

[data-ee-header],
[data-ee-footer] {
    display: none !important;
}


/* ==========================================================
   AUTHENTICATION CANVAS
   ========================================================== */

html,
body {
    min-height: 100%;
}


body {
    min-height: 100vh !important;

    margin-top:
        0 !important;

    padding-top:
        0 !important;

    background:
        #eef2f7 !important;

    color:
        #0f172a !important;
}


/*
 * Any wrapper that previously reserved spacing for
 * storefront chrome must not retain that spacing.
 */

main {
    margin-top:
        0 !important;
}


/* ==========================================================
   FORM CONTRAST
   ========================================================== */

form label {
    color:
        #111827 !important;

    opacity:
        1 !important;

    font-weight:
        700 !important;
}


form input:not([type="hidden"]),
form select,
form textarea {
    background:
        #ffffff !important;

    color:
        #0f172a !important;

    border:
        1px solid #94a3b8 !important;

    opacity:
        1 !important;

    box-shadow:
        none;
}


form input:not([type="hidden"]):focus,
form select:focus,
form textarea:focus {
    border-color:
        #3157e6 !important;

    outline:
        none !important;

    box-shadow:
        0 0 0 3px
        rgba(49,87,230,.16)
        !important;
}


form input::placeholder,
form textarea::placeholder {
    color:
        #64748b !important;

    opacity:
        1 !important;
}


/*
 * Browser autofill must not produce the pale yellow
 * low-contrast fields seen in earlier screenshots.
 */

form input:-webkit-autofill,
form input:-webkit-autofill:hover,
form input:-webkit-autofill:focus {
    -webkit-text-fill-color:
        #0f172a !important;

    -webkit-box-shadow:
        0 0 0 1000px
        #ffffff inset !important;

    transition:
        background-color
        9999s ease-out 0s;
}


/* ==========================================================
   PRIMARY BUTTONS
   ========================================================== */

form button:not(:disabled),
form input[type="submit"]:not(:disabled),
button[type="submit"]:not(:disabled) {
    background:
        var(
            --brand-primary,
            #3157e6
        ) !important;

    border-color:
        var(
            --brand-primary,
            #3157e6
        ) !important;

    color:
        #ffffff !important;

    opacity:
        1 !important;

    font-weight:
        800 !important;

    text-shadow:
        none !important;
}


form button:not(:disabled):hover,
form input[type="submit"]:not(:disabled):hover {
    filter:
        brightness(.90);
}


/*
 * Disabled buttons remain visibly disabled,
 * but their label must stay readable.
 */

form button:disabled,
form input[type="submit"]:disabled,
button[type="submit"]:disabled {
    background:
        #64748b !important;

    border-color:
        #64748b !important;

    color:
        #ffffff !important;

    opacity:
        .78 !important;

    cursor:
        not-allowed !important;

    text-shadow:
        none !important;
}


/* ==========================================================
   AUTH LINKS
   ========================================================== */

form a,
main a {
    color:
        #1d4ed8;

    opacity:
        1 !important;
}


form a {
    font-weight:
        700;
}


/* ==========================================================
   MFA
   ========================================================== */

input[name="authenticator_code"] {
    background:
        #ffffff !important;

    color:
        #0f172a !important;

    border-color:
        #64748b !important;

    font-weight:
        700 !important;
}


/* ==========================================================
   MOBILE AUTHENTICATION
   ========================================================== */

@media (max-width: 760px) {

    body {
        width:
            100% !important;

        max-width:
            100% !important;

        overflow-x:
            hidden !important;
    }


    main {
        width:
            100% !important;

        max-width:
            100% !important;

        margin:
            0 auto !important;

        padding-left:
            12px !important;

        padding-right:
            12px !important;
    }


    form button,
    form input[type="submit"],
    button[type="submit"] {
        min-height:
            46px;
    }
}


/* ==========================================================
   EE-PRODUCTION-CUSTOMER-AUTH-UI-R3-HF1
   Contrast / readability refinement
   ========================================================== */


/*
 * Secondary navigation:
 *
 * Create account
 * Forgot password?
 * Back to Login
 *
 * Previous inherited rules made these nearly white.
 */

body a,
body a:visited {
    opacity: 1 !important;
}


body main a,
body form a,
body [class*="auth"] a {
    color: #1e40af !important;
    opacity: 1 !important;

    font-weight: 700 !important;

    text-decoration-color:
        rgba(30,64,175,.35);
}


body main a:hover,
body form a:hover,
body [class*="auth"] a:hover {
    color: #172554 !important;
}


/*
 * Labels need stronger contrast against the
 * white authentication panel.
 */

body form label {
    color: #0f172a !important;

    opacity: 1 !important;

    font-weight: 750 !important;
}


/*
 * Inputs: slightly darker outline.
 */

body form input:not([type="hidden"]),
body form select,
body form textarea {
    color: #0f172a !important;

    background: #ffffff !important;

    border-color: #7c8ca5 !important;

    opacity: 1 !important;
}


body form input:not([type="hidden"]):hover,
body form select:hover,
body form textarea:hover {
    border-color: #64748b !important;
}


body form input:not([type="hidden"]):focus,
body form select:focus,
body form textarea:focus {
    border-color:
        var(
            --brand-primary,
            #3346cc
        ) !important;

    box-shadow:
        0 0 0 3px
        rgba(49,70,204,.16)
        !important;
}


/*
 * Preserve store branding but make active actions
 * slightly darker and more substantial.
 */

body form button:not(:disabled),
body form input[type="submit"]:not(:disabled),
body button[type="submit"]:not(:disabled) {
    opacity: 1 !important;

    filter: brightness(.92);

    font-weight: 800 !important;

    box-shadow:
        0 5px 14px
        rgba(30,41,59,.12);
}


body form button:not(:disabled):hover,
body form input[type="submit"]:not(:disabled):hover,
body button[type="submit"]:not(:disabled):hover {
    filter: brightness(.84);
}


/*
 * Disabled Register / Reset controls:
 *
 * Keep the disabled state obvious without making
 * the button label almost invisible.
 */

body form button:disabled,
body form input[type="submit"]:disabled,
body button[type="submit"]:disabled {
    background: #64748b !important;

    border-color: #64748b !important;

    color: #ffffff !important;

    opacity: .88 !important;

    filter: none !important;

    font-weight: 800 !important;

    text-shadow: none !important;

    box-shadow:
        0 4px 12px
        rgba(15,23,42,.10)
        !important;
}


/*
 * Help / hint text that lives inside forms.
 */

body form small,
body form .help-text,
body form .form-help,
body form [class*="hint"],
body form [class*="muted"] {
    color: #475569 !important;

    opacity: 1 !important;
}


/*
 * MFA input should have the same high-contrast treatment.
 */

body input[name="authenticator_code"] {
    color: #0f172a !important;

    background: #ffffff !important;

    border-color: #64748b !important;

    font-weight: 750 !important;
}


/*
 * Mobile readability.
 */

@media (max-width:760px) {

    body form button,
    body form input[type="submit"] {
        font-size: 15px !important;
    }

    body form label {
        font-size: 13px !important;
    }

    body main a,
    body form a,
    body [class*="auth"] a {
        font-size: inherit;

        text-decoration-thickness:
            1px;
    }
}


/* ==========================================================
   EE-PRODUCTION-CUSTOMER-AUTH-UI-R3-HF2
   Secondary links + disabled action contrast
   ========================================================== */


/*
 * Create account
 * Forgot password?
 * Back to Login
 */

body a[href*="register"],
body a[href*="forgot_password"],
body a[href*="login"],
body a[href*="reset_password"] {
    color: #1e3a8a !important;

    opacity: 1 !important;

    visibility: visible !important;

    font-weight: 750 !important;

    text-decoration: none !important;
}


body a[href*="register"]:hover,
body a[href*="forgot_password"]:hover,
body a[href*="login"]:hover,
body a[href*="reset_password"]:hover {
    color: #172554 !important;

    text-decoration: underline !important;
}


/*
 * Disabled Register / Send Reset Link.
 */

body button:disabled,
body button[disabled],
body input[type="submit"]:disabled,
body input[type="submit"][disabled] {
    background: #475569 !important;

    border-color: #475569 !important;

    color: #ffffff !important;

    opacity: 1 !important;

    filter: none !important;

    font-weight: 800 !important;

    text-shadow: none !important;

    box-shadow:
        0 4px 12px
        rgba(15,23,42,.14)
        !important;
}


/*
 * Enabled primary buttons remain strong.
 */

body button[type="submit"]:not(:disabled),
body input[type="submit"]:not(:disabled) {
    color: #ffffff !important;

    opacity: 1 !important;

    font-weight: 800 !important;
}


/* ==========================================================
   EE-PRODUCTION-CUSTOMER-AUTH-UI-R3-HF4
   Canonical customer authentication primary action
   ========================================================== */


/*
 * Exact approved button appearance.
 *
 * Login
 * Register
 * Send Reset Link
 * Reset Password
 * Verify and Continue
 * Enable Authenticator MFA
 */

#ee8-form-host button[type="submit"],
#ee8-form-host input[type="submit"],
#ee8-form-host .btn-primary,
#ee8-form-host .login-button,

body form button[type="submit"],
body form input[type="submit"],
body button[type="submit"] {
    width: 100% !important;

    min-height: 48px !important;

    background: #0028FF !important;

    border: 1px solid #0028FF !important;

    border-radius: 9px !important;

    color: #FFFFFF !important;

    -webkit-text-fill-color: #FFFFFF !important;

    opacity: 1 !important;

    filter: none !important;

    font-weight: 800 !important;

    font-size: 15px !important;

    text-shadow: none !important;

    box-shadow:
        0 5px 14px
        rgba(0,40,255,.16)
        !important;
}


/*
 * Text nested inside button must also remain white.
 */

#ee8-form-host button[type="submit"] *,
body form button[type="submit"] *,
body button[type="submit"] * {
    color: #FFFFFF !important;

    -webkit-text-fill-color:
        #FFFFFF !important;

    opacity: 1 !important;
}


/*
 * Enabled hover.
 */

#ee8-form-host button[type="submit"]:not(:disabled):hover,
#ee8-form-host input[type="submit"]:not(:disabled):hover,

body form button[type="submit"]:not(:disabled):hover,
body form input[type="submit"]:not(:disabled):hover,
body button[type="submit"]:not(:disabled):hover {
    background: #001ED0 !important;

    border-color: #001ED0 !important;

    color: #FFFFFF !important;

    filter: none !important;
}


/*
 * Disabled Register / Send Reset Link:
 *
 * SAME visible blue/white treatment requested.
 * Disabled state remains functional and is indicated
 * by cursor behavior rather than washed-out colors.
 */

#ee8-form-host button[type="submit"]:disabled,
#ee8-form-host button[type="submit"][disabled],
#ee8-form-host input[type="submit"]:disabled,
#ee8-form-host input[type="submit"][disabled],

body form button[type="submit"]:disabled,
body form button[type="submit"][disabled],
body form input[type="submit"]:disabled,
body form input[type="submit"][disabled],
body button[type="submit"]:disabled,
body button[type="submit"][disabled] {
    background: #0028FF !important;

    border-color: #0028FF !important;

    color: #FFFFFF !important;

    -webkit-text-fill-color:
        #FFFFFF !important;

    opacity: 1 !important;

    filter: none !important;

    cursor: not-allowed !important;

    font-weight: 800 !important;

    text-shadow: none !important;
}


/*
 * Prevent browser disabled-state text fading.
 */

#ee8-form-host button:disabled *,
body button[type="submit"]:disabled * {
    color: #FFFFFF !important;

    -webkit-text-fill-color:
        #FFFFFF !important;

    opacity: 1 !important;
}


@media (max-width:760px) {

    #ee8-form-host button[type="submit"],
    #ee8-form-host input[type="submit"],

    body form button[type="submit"],
    body form input[type="submit"],
    body button[type="submit"] {
        min-height: 48px !important;

        font-size: 15px !important;

        color: #FFFFFF !important;
    }
}


/* ==========================================================
   EE-PRODUCTION-CUSTOMER-AUTH-UI-R3-HF5
   Force primary authentication action in every UI state.
   ========================================================== */


/*
 * Actual production auth structure:
 *
 * body.ee-tenant-app
 *   main
 *     form
 *       button[type=submit]
 *
 * Explicit normal-state declaration is required because
 * legacy/template CSS was overriding the background while
 * leaving the hover state blue.
 */

html body.ee-tenant-app main form button[type="submit"],
html body.ee-tenant-app main form button[type="submit"]:not(:disabled),

html body.ee-tenant-app main form input[type="submit"],
html body.ee-tenant-app main form input[type="submit"]:not(:disabled) {

    background:
        #0028FF !important;

    background-color:
        #0028FF !important;

    background-image:
        none !important;

    border:
        1px solid #0028FF !important;

    border-color:
        #0028FF !important;

    color:
        #FFFFFF !important;

    -webkit-text-fill-color:
        #FFFFFF !important;

    opacity:
        1 !important;

    filter:
        none !important;

    font-weight:
        800 !important;

    text-shadow:
        none !important;

    box-shadow:
        0 5px 14px
        rgba(0,40,255,.16)
        !important;
}


/*
 * Focus state must remain blue.
 */

html body.ee-tenant-app main form button[type="submit"]:focus,
html body.ee-tenant-app main form button[type="submit"]:focus-visible,

html body.ee-tenant-app main form input[type="submit"]:focus,
html body.ee-tenant-app main form input[type="submit"]:focus-visible {

    background:
        #0028FF !important;

    background-color:
        #0028FF !important;

    background-image:
        none !important;

    border-color:
        #0028FF !important;

    color:
        #FFFFFF !important;

    -webkit-text-fill-color:
        #FFFFFF !important;

    outline:
        3px solid
        rgba(0,40,255,.18)
        !important;

    outline-offset:
        2px !important;
}


/*
 * Active/clicked state.
 */

html body.ee-tenant-app main form button[type="submit"]:active,
html body.ee-tenant-app main form input[type="submit"]:active {

    background:
        #001ED0 !important;

    background-color:
        #001ED0 !important;

    background-image:
        none !important;

    border-color:
        #001ED0 !important;

    color:
        #FFFFFF !important;

    -webkit-text-fill-color:
        #FFFFFF !important;
}


/*
 * Hover remains slightly darker.
 */

html body.ee-tenant-app main form button[type="submit"]:hover,
html body.ee-tenant-app main form input[type="submit"]:hover {

    background:
        #001ED0 !important;

    background-color:
        #001ED0 !important;

    background-image:
        none !important;

    border-color:
        #001ED0 !important;

    color:
        #FFFFFF !important;

    -webkit-text-fill-color:
        #FFFFFF !important;

    filter:
        none !important;
}


/*
 * Disabled Register / Reset buttons retain the same
 * readable blue/white presentation.
 */

html body.ee-tenant-app main form button[type="submit"]:disabled,
html body.ee-tenant-app main form button[type="submit"][disabled],

html body.ee-tenant-app main form input[type="submit"]:disabled,
html body.ee-tenant-app main form input[type="submit"][disabled] {

    background:
        #0028FF !important;

    background-color:
        #0028FF !important;

    background-image:
        none !important;

    border-color:
        #0028FF !important;

    color:
        #FFFFFF !important;

    -webkit-text-fill-color:
        #FFFFFF !important;

    opacity:
        1 !important;

    filter:
        none !important;

    cursor:
        not-allowed !important;
}


/*
 * Prevent nested text from being faded by template CSS.
 */

html body.ee-tenant-app main form button[type="submit"] *,
html body.ee-tenant-app main form button[type="submit"]:disabled * {

    color:
        #FFFFFF !important;

    -webkit-text-fill-color:
        #FFFFFF !important;

    opacity:
        1 !important;
}
