body, html {
    height: 100%;
}

/***** [Outer wrap] ***************************************************************************************************/

.preauth-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.preauth-wrap.-login {
    /*align-items: center;*/
}

.preauth-wrap .main {
    margin-left: auto;
    margin-right: auto;
}
.preauth-wrap .aside {
    width: 245px;
    margin: 0 0 0 2.5rem;
    text-align: left;
    color: #333;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    flex-shrink: 0;
    flex-basis: auto;
    justify-content: center;
    align-items: center;
}

/***** [Aside] ********************************************************************************************************/

.aside.preauth.-login {
    margin-top: 0;
    margin-bottom: 0;
}

.aside.preauth .box {
    flex: 1;
    margin-bottom: 2.5rem;
    padding: 1.77333rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, .1);
    width: 100%;
    max-width: 100%;
    flex-grow: 1;
    flex-shrink: 0;
    background-color: #fff;
}
.aside.preauth .box:last-child {
    margin-bottom: 0;
}

.aside.preauth .box *:first-child {
    margin-top: 0;
}
.aside.preauth .box *:last-child {
    margin-bottom: 0;
}

.aside.preauth .box h3 {
    margin-bottom: 1rem;
}

.aside.preauth .box p, .aside.preauth .box li, .aside.preauth .box a {
    font-size: 1.5rem;
}

.aside.preauth .text-link {
    font-weight: 700;
}

.selling-points {
    list-style: none;
}
.selling-points li {
    margin: 3px 0;
}
.selling-points li:before {
    content: '✔';
    color: var(--color-accent);
    margin-right: 5px;
}

/***** [Main box] *****************************************************************************************************/

.main.preauth {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    max-width: 1000px;
}
.main.preauth > div {
    min-height: 100%;
}

.main.preauth.-art .left {
    display: flex;
    background-color: #eee;
    background-image: url('/static/art/login-deco.jpg');
    background-position: 55% center;
    background-size: auto;
    width: 250px;
    position: absolute;
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    z-index: 1;
}
.main.preauth.-art .left:after {
    content: " ";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    box-shadow: inset 0 75px 75px 0 rgba(0, 0, 0, .111);
    z-index: 2;
}

.main.preauth .right {
    padding: 1.5rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 750px;
}
.main.preauth.-art .right {
    padding: 1.5rem 1.5rem 1.5rem 26.5rem;
}
.main.preauth .right h1 {
    display: inline-flex;
    width: auto;
}
.main.preauth .right h2 {
    margin-top: 2rem;
}
.main.preauth .left *:last-child {
    margin-top: 0;
}
.main.preauth .right *:last-child {
    margin-bottom: 0;
}
.main.preauth .right button {
    margin-top: 2.5rem;
}

.form-group {
    position: relative;
}
.form-group .pull-right {
    position: absolute;
    right: 0;
    top: 0;
    font-weight: 600;
}
.form-group .pull-right a {
    color: var(--color-accent);
    transition: color .1s ease;
    text-decoration: none;
}
.form-group .pull-right a:hover {
    color: #3C4858;
}

.b2b-notice {
    color: var(--color-accent);
    font-weight: 600;
}

/***** [Submit button with error shake animation] *********************************************************************/

button.has-error {
    animation: login-error-shake 0.4s 1 linear;
}

@keyframes login-error-shake {
    0% { -webkit-transform: translate(30px); }
    20% { -webkit-transform: translate(-30px); }
    40% { -webkit-transform: translate(15px); }
    60% { -webkit-transform: translate(-15px); }
    80% { -webkit-transform: translate(8px); }
    100% { -webkit-transform: translate(0px); }
}

/***** [Submit button with error tooltip] *****************************************************************************/

.script-error-tip {
    background-color: #e74c3c;
    color: #fff;
    position: absolute;
    border-radius: 4px;
    box-shadow: 0 0 5px 1px rgba(0, 0, 0, .1);
    pointer-events: none;
    user-select: none;
    padding: .75rem;
    font-size: 1.4rem;
    z-index: 9999;
    top: 50%;
    left: -5px;
    transform: translate(-100%, -50%);
    right: auto;
    bottom: auto;
    border: 1px solid rgba(0, 0, 0, .1);
    max-width: 250px;
    animation: script-error-tip-appear .1s ease-out forwards;
}
.script-error-tip:before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    position: absolute;

    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid #e74c3c;
    right: -9px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99999;
}

.script-error-tip.-field {

}
.script-error-tip.-global {

}

@keyframes script-error-tip-appear {
    0% {
        transform: translate(-120%, -50%);
        opacity: 0;
    }
    100% {
        transform: translate(-100%, -50%);
        opacity: 1;
    }
}

@keyframes script-error-tip-appear-mobile {
    0% {
        transform: translate(0, -50%);
        opacity: 0;
    }
    100% {
        transform: translate(0, -50%);
        opacity: 1;
    }
}

@media all and (max-width: 1000px) {
    .script-error-tip {
        top: -50%;
        left: auto;
        right: 0;
        bottom: auto;
        animation: script-error-tip-appear-mobile .1s ease-out forwards;
        text-align: center;
        width: auto;
    }
    .script-error-tip:before {
        border-top: 10px solid #e74c3c;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        top: auto;
        bottom: 0;
        left: 50%;
        right: auto;
        transform: translate(-50%, 100%);
    }
}

/***** [Thank you] ****************************************************************************************************/

.thank-you {
    max-width: 400px;
}
.thank-you .button {
    margin-top: 2.5rem;
}

/***** [Pwd reset] ****************************************************************************************************/

.reset-password {
    max-width: 400px;
}

/***** [Mobile view] **************************************************************************************************/

@media all and (max-width: 1000px) {
    .main.preauth.-art .left {
        display: none !important;
    }
    .main.preauth.-art .right {
        padding-left: 1.5rem;
    }

    .wrap, .preauth-wrap {
        max-width: 100%;
        min-width: 100%;
        width: 100%;
    }
    .wrap {
        padding-left: 0;
        padding-right: 0;
    }
    .preauth-wrap {
        flex-direction: column;
    }
    .preauth-wrap .main, .preauth-wrap .aside, .preauth-wrap .login-box {
        max-width: 100%;
        min-width: 100%;
        width: 100%;
        flex-grow: 0;
        flex-shrink: 0;
        margin-left: 0;
        margin-right: 0;
        margin-top: 1rem;
        margin-bottom: 1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .login-main {
        max-width: 100%;
        min-width: 100%;
        width: 100% !important;
    }
    .aside.preauth .box {
        padding: 1.5rem;
        margin-bottom: 1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

@media all and (max-width: 420px) {
    body, .aside.preauth .box, .aside.preauth .box p, .aside.preauth .box a {
        font-size: 1.4rem;
    }

    .logo-wrap, .logo-wrap img {
        max-height: 50px;
    }

    p {
        margin-bottom: 1rem;
    }
    input {
        font-size: 1.4rem !important;
    }

    .button, .btn, .button.-smol, .btn.-smol {
        font-size: 1.4rem !important;
        padding: 1rem;
        margin-bottom: .75rem !important;
    }

    .preauth-wrap .main, .aside.preauth .box {
        padding: 1.5rem;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .preauth-wrap .main.preauth {
        margin-top: 0;
        margin-bottom: 0;
    }

    .main.preauth .right {
        padding: 0 !important;
    }
    .main.preauth .right h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .footer-wrap.-links {
        flex-direction: column;
    }
    .footer-wrap.-links a, .footer-wrap.-links span {
        margin: .333rem;
    }
}

/***** [Login specific] ***********************************************************************************************/

.login-box {
    background: #fff;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, .1);
    width: 700px;
    margin-bottom: 3rem;
}

.login-header {
    background-position: center center;
    background-image: url('/static/art/main-banner.png');
    background-color: #ccc;
    background-size: cover;
    color: #fff;
    width: 100%;
    height: 150px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.login-main {
    border-top: 1px solid rgba(0, 0, 0, .1);
    padding: 25px;
    text-align: left;
    width: auto;
}
.login-main h1 {
    text-align: left;
    justify-content: flex-start;
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
}

@media all and (max-width: 1000px) {
    .login-wrap, .login-box {
        width: 100%;
    }
    .login-wrap .logo-wrap {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    .login-main {
        padding: 1.5rem;
    }
    .logo-wrap.-spacer {
        display: none;
    }
}