@import 'variables';

.login-wrapper {
    background-image: linear-gradient(135deg, var(--color-login-gradient-top), var(--color-login-gradient-bottom)),
    var(--login-page-bg);
    background-blend-mode: screen;
    background-repeat: repeat;
    background-size: auto;
    background-position: initial;
    justify-content: center;
}

@media screen and (max-width: $breakpoint-small) {
    .login-wrapper {
        justify-content: center;
        background-color: transparent;
        .login {
            margin: 20px;
            padding: 24px;
        }
    }
}

.login {
    margin: 5vh 0;
    border-radius: 6px;
    min-height: calc(100vh - 10vh);
    max-height: 800px;
}

.title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 8vh;

    img {
        max-width: 100%;
        width: 150px;
    }
    span {
        padding-top: 12px;
        font-weight: bold;
        color: var(--color-primary-500);
        font-size: 38px;
    }
}

.version {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    color: var(--color-grey-300);

    span + span {
        margin-left: 5px;
    }
}

.login-error {
    max-height: 0;
    overflow: hidden;

    &.visible {
        max-height: 46px;
        transition: max-height 0.2s;
        animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
        animation-delay: 0.2s;
        transform: translate3d(0, 0, 0);
        backface-visibility: hidden;
        perspective: 1000px;
    }
}

@keyframes shake {
    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}
