/* Keep login branding visible when the desktop sidebar collapses. */
#login-form {
    height: auto;
}

#login-form .login-fields::after {
    clear: both;
    content: '';
    display: table;
}

.back-to-site-login {
    background: #232A4E;
    border-radius: 8px;
    box-sizing: border-box;
    color: #fff !important;
    display: block;
    font-size: 14px;
    font-weight: 700;
    left: 130px;
    margin-top: 14px;
    padding: 12px 18px;
    position: relative;
    text-align: center;
    width: 355px;
}

.back-to-site-login:hover,
.back-to-site-login:focus {
    box-shadow: 0 5px 14px rgba(35, 42, 78, 0.18);
    color: #fff !important;
    transform: translateY(-1px);
}

#main-header nav li.website a {
    background-image: url('../img/home.png');
}

@media only screen and (max-width: 1100px) {
    #main-header #mobile-brand {
        align-items: center;
        display: flex;
        float: left;
        gap: 12px;
    }

    #main-header #mobile-brand #logo-small {
        display: block;
        float: none;
        margin: 0;
        max-height: 60px;
        max-width: 82px;
    }

    #main-header #mobile-brand span {
        color: #EAB42A;
        font-size: 16px;
        font-weight: 700;
        white-space: nowrap;
    }

    #main-header .mobile-portal-actions {
        clear: both;
        display: flex;
        margin: 0;
        padding: 12px 0 16px 0;
    }

    #login-form {
        top: 0;
    }

    #login-form.button {
        height: auto;
        top: 0;
    }

    #login-form .login-brand-mobile {
        display: block;
        margin: 0 auto 24px auto;
        max-width: 320px;
        width: 100%;
    }

    #login-form .login-brand-mobile img {
        padding: 0;
        position: static;
        width: 100%;
    }
}

@media only screen and (max-width: 450px) {
    #main-header #mobile-brand {
        float: none;
        justify-content: center;
        margin: 0 auto;
    }
}

@media only screen and (max-width: 600px) {
    #main-header .mobile-portal-actions .portal-action {
        font-size: 13px;
        padding-left: 8px;
        padding-right: 8px;
    }

    #login-form .login-fields {
        height: 263px;
    }

    #login-form .login-gravatar {
        display: block;
        margin: auto;
        padding-bottom: 10px;
        position: static;
    }

    #login-form .back-to-site-login {
        left: 0;
        margin-top: 14px;
        width: 100%;
    }
}

/* Keep the CSRF-protected logout POST visually identical to the old link. */
#main-header nav li form,
#main-header nav li button {
    height: 100%;
    margin: 0;
}

#main-header nav li button {
    background: no-repeat center 10px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #000;
    cursor: pointer;
    display: block;
    font-family: inherit;
    font-size: 12px;
    height: 55px;
    margin-left: 3px;
    opacity: 0.5;
    padding: 32px 10px 3px;
    text-align: center;
    text-transform: lowercase;
}

#main-header nav li.logout button {
    background-image: url('../img/logout.png');
}

#main-header nav li button:hover {
    box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.2);
    opacity: 1;
    transform: none;
}
