/* Standard Dekstop Styling */
html {
    height: -webkit-fill-available; /* Prevent mobile webkit browsers from dropping footer behind the navigation bar */
}

body {
    min-height: 100vh;
    min-height: -webkit-fill-available; /* Prevent mobile webkit browsers from dropping footer behind the navigation bar */
}

.container-login,
.footer {
    max-width: 792px;
}

.container-login {
    min-height: 405px;
    overflow: hidden;
}

.box-logo {
    width: 40%;
}

.logo {
    object-fit: contain; /* Logo contains aspect ratio */
    max-width: 405px; /* Prevent horizontal logo going too big on large mobile screens */
    max-height: calc(405px - 3rem); /* Container height minus container padding */
}

img.logo {
    filter: drop-shadow(1px 0 0 rgba(255, 255, 255, 0.87)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.87)) drop-shadow(-1px 0 0 rgba(255, 255, 255, 0.87)) drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.87)); /* White border around Company Logo for correct display on darker themes */
}

.box-login {
    width: 60%;
}

.box-login form {
    width: 100%; /* Login box content full width */
}

.box-login .btn {
    min-height: 48px;
}

.login-heading {
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.22;
}

.login-password-field {
    position: relative;
}

.login-password-field .form-control {
    padding-right: 3.35rem;
}

.login-password-field .password-toggle {
    position: absolute;
    top: 50%;
    right: .55rem;
    z-index: 5;
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: .375rem;
    color: var(--bs-secondary-color);
    background: transparent;
    transform: translateY(-50%);
}

.login-password-field .password-toggle:hover,
.login-password-field .password-toggle:focus,
.input-group .password-toggle:hover,
.input-group .password-toggle:focus {
    color: var(--bs-primary);
    background: var(--bs-secondary-bg);
}

.password-toggle::before {
    content: "";
    width: 1.15rem;
    height: .72rem;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.password-toggle::after {
    content: "";
    position: absolute;
    width: .36rem;
    height: .36rem;
    border-radius: 50%;
    background: currentColor;
}

.password-toggle.is-visible::after {
    width: 1.35rem;
    height: 2px;
    border-radius: 0;
    transform: rotate(-42deg);
}

.input-group .password-toggle {
    position: relative;
    width: 3rem;
    justify-content: center;
    cursor: pointer;
}

.login-options {
    color: var(--bs-secondary-color);
    font-size: .95rem;
}

.login-options label {
    overflow-wrap: anywhere;
}

.box-login .alert {
    overflow-wrap: anywhere;
}

.box-login .form-floating:focus-within,
.box-login .input-group:focus-within {
    z-index: 2;
}

.box-login input[name="username"],
.box-login span[id="input-username"] {
    margin-bottom: -1px;
    border-bottom-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.box-login input[name="password"],
.box-login span[id="input-password"] {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.alert div:not(:first-child) {
    margin-top: 1rem; /* Space between multiple validation errors */
}

.bi {
    height: 1em;
}

footer a:not(:hover) {
    text-decoration: none;
}

/* Mobile Styling */
@media (max-width: 767.98px) {
    .container-login {
        min-height: auto;
        margin: 1rem !important;
        padding: 1.25rem !important;
    }

    .box-logo,
    .box-login {
        width: 100%;
    }

    .box-logo {
        border-right: none !important;
        border-bottom: 1px solid var(--bs-border-color) !important;
        margin-bottom: 1rem;
    }

    .logo {
        max-height: 112px;
    }

    #form-heading {
        font-size: 1.2rem;
        line-height: 1.28;
    }

    .login-options {
        font-size: .9rem;
    }

    .footer {
        max-width: 100%;
        border-radius: 0 !important;
        margin-bottom: 0 !important;
    }
}

/* QHD Styling */
@media (min-width: 2560px) {
    .container-login,
    .footer {
        max-width: 960px;
    }

    .container-login {
        min-height: 540px;
    }

    .logo {
        max-height: calc(540px - 3rem);
    }
}

/* 4K Styling */
@media (min-width: 3840px) {
    .container-login,
    .footer {
        max-width: 1140px;
    }

    .container-login {
        min-height: 641.25px;
    }

    .logo {
        max-height: calc(641.25px - 3rem);
    }
}

/* Specific Styling */
@media (max-width: 359.98px) {
    .g-recaptcha {
        overflow-x: auto; /* Makes sure reCAPTCHA is usable on the smallest screens */
        min-height: 86px;
    }
}
