﻿/* =========================
   VARIABLES
   ========================= */

:root {
    --footer-height: 4rem;
}


/* =========================
   BASE STRUCTURE
   ========================= */

body {
    display: block;
    overflow-x: hidden;
}

.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

    .layout .layoutContent {
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        min-width: 0;
    }

.public-shell-main {
    flex: 1 1 auto;
    padding-bottom: .5rem;
}

.team_logo {
    height: 10rem;
}


/* =========================
   CARD SHELL
   ========================= */
.public-shell-card {
    width: 100%;
    max-height: calc(100vh - 13rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}


/* =========================
   FOOTER
   ========================= */

.public-shell-footer {
    height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.public-footer-logo {
    height: calc(var(--footer-height) - 0.75rem);
    width: auto;
    display: inline-block;
}


/* =========================
   AUTH BACKGROUND
   ========================= */

.auth-bg {
    position: relative;
    min-height: 100vh;
    background-size: cover;
    background-position: 50% 70%;
    background-repeat: no-repeat;
    overflow: hidden;
}

    .auth-bg::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.2);
        z-index: 0;
        pointer-events: none;
    }

    .auth-bg > * {
        position: relative;
        z-index: 1;
    }

@media (max-width: 768px) {
    .auth-bg {
        background-position: 50% 15%;
    }
}

/* =========================
   SHELL TO USE ON The View with the Content
   ========================= */

.public-form-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
}

.public-form-header {
    flex: 0 0 auto;
}

.public-form-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 1rem 1rem 1rem;
}


/* =========================
   LOGIN PAGE ONLY
   All selectors in this section are scoped to .login-page so that the
   remaining guest and Identity pages keep their existing layout.
   ========================= */

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    background-position: 50% 62%;
    overflow-x: hidden;
    overflow-y: auto;
}

.login-page .layout {
    min-height: 100vh;
    min-height: 100dvh;
}

.login-page .login-shell {
    display: flex;
    align-items: center;
    padding: clamp(.75rem, 2vh, 1.5rem) 0 clamp(3rem, 9vh, 6rem);
}

.login-page .login-shell > .container-xl {
    width: 100%;
}

.login-page .login-column {
    flex: 0 0 auto;
    width: min(32rem, calc(100% - 2rem));
    transform: translateY(clamp(-7rem, -10vh, -4rem));
}

.login-page .login-card {
    max-height: none;
    overflow: hidden;
    border-radius: .875rem !important;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 1rem 2.75rem rgba(0, 0, 0, .18) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.login-page .login-card .login-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 6rem;
    padding: .75rem 1.5rem .25rem;
    border-bottom: 0 !important;
    background-color: transparent !important;
}

.login-page .login-card-logo {
    display: block;
    width: auto;
    height: 5rem;
    max-width: 100%;
    object-fit: contain;
}

.login-page .login-card-body {
    padding: .75rem 1.5rem 1.5rem;
    background-color: transparent;
}

.login-page .login-form > .mb-3 {
    margin-bottom: 1rem !important;
}

.login-page .login-actions {
    margin-top: 1.25rem !important;
}

.login-page .login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: .75rem;
}

.login-page .login-options .form-check {
    flex: 0 0 auto;
    margin: 0;
    padding-left: 0;
}

.login-page .login-options .form-check-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #6c757d;
    cursor: pointer;
    font-size: .75rem;
    line-height: 1.25;
    white-space: nowrap;
}

.login-page .login-options .form-check-input {
    position: static;
    flex: 0 0 auto;
    width: 2rem;
    height: 1.125rem;
    margin: 0;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 999px;
    appearance: none;
    -webkit-appearance: none;
    background-color: #ced4da;
    background-image: radial-gradient(circle, #fff 0, #fff .34rem, transparent .38rem);
    background-repeat: no-repeat;
    background-position: .05rem center;
    background-size: 1rem 1rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12);
    cursor: pointer;
    transition: background-color .18s ease, background-position .18s ease, box-shadow .18s ease;
}

.login-page .login-options .form-check-input:hover {
    background-color: #bfc5ca;
}

.login-page .login-options .form-check-input:checked {
    border-color: var(--primary-color-dark);
    background-color: var(--primary-color-dark);
    background-position: .9rem center;
}

.login-page .login-options .form-check-input:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(163, 190, 31, .24);
}

.login-page .login-options .form-check-input:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.login-page .login-options #forgot-password {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: .75rem;
    line-height: 1.25;
    text-align: right;
    white-space: nowrap;
}

.login-page .input-text-auth:focus {
    outline: 0;
    border-color: var(--primary-color-dark);
    box-shadow: 0 0 0 .2rem rgba(163, 190, 31, .22);
}

.login-page .login-password-control {
    position: relative;
}

.login-page .login-password-control .input-text-auth {
    padding-right: 3rem;
}

.login-page .login-password-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 2.75rem;
    height: calc(100% - 2px);
    padding: 0;
    border: 0;
    border-radius: 0 .2rem .2rem 0;
    background: transparent;
    color: var(--text-black);
    cursor: pointer;
}

.login-page .login-password-toggle:hover {
    background-color: rgba(0, 0, 0, .05);
}

.login-page .login-password-toggle:focus-visible {
    outline: 2px solid var(--primary-color-dark);
    outline-offset: -3px;
}

.login-page .login-actions .btn-auth {
    width: 100%;
    min-height: 2.5rem;
    padding-right: 1rem;
    padding-left: 1rem;
    border-color: var(--primary-color-dark);
    background-color: var(--primary-color-dark);
    font-weight: 700;
}

.login-page .login-actions .btn-auth:hover,
.login-page .login-actions .btn-auth:focus {
    border-color: var(--primary-color-dark);
    background-color: var(--primary-color-dark);
    color: var(--text-white);
    filter: brightness(.9);
}

.login-page .login-actions .btn-auth:focus-visible {
    box-shadow: 0 0 0 .2rem rgba(163, 190, 31, .28);
}

.login-page .login-caps-lock {
    display: block;
    margin-top: .3rem;
    color: #8a6512;
    font-size: .75rem;
    line-height: 1.2;
}

.login-page .login-caps-lock[hidden] {
    display: none;
}

.login-page .field-validation-error {
    display: block;
    margin-top: .3rem;
    font-size: .75rem;
    line-height: 1.2;
}

.login-page .validation-summary-valid {
    display: none !important;
}

.login-page .login-actions .btn-auth:disabled {
    cursor: wait;
    opacity: .78;
    filter: none;
}

@media (max-width: 576px) {
    .login-page .login-shell {
        padding-top: .75rem;
        padding-bottom: clamp(2rem, 6vh, 3.5rem);
    }

    .login-page .login-column {
        width: calc(100% - clamp(4rem, 22vw, 6rem));
    }

    .login-page {
        background-position: 50% 20%;
    }

    .login-page .login-card .login-card-header {
        min-height: 5.75rem;
        padding: .625rem 1.25rem .125rem;
    }

    .login-page .login-card-logo {
        height: 4.75rem;
    }

    .login-page .login-card-body {
        padding: .75rem 1.25rem 1.25rem;
    }

}

@media (max-width: 360px) {
    .login-page .login-options {
        gap: .4rem;
    }

    .login-page .login-options .form-check-label,
    .login-page .login-options #forgot-password {
        font-size: .68rem;
    }
}

@media (max-height: 560px) {
    .login-page .login-shell {
        align-items: flex-start;
        padding-top: .75rem;
        padding-bottom: .75rem;
    }

    .login-page .login-column {
        transform: none;
    }
}
