.auth-form {
    background: #FFFFFF;
    border: 2px solid #DBDEE0;
    box-sizing: border-box;
    border-radius: 10px;
    padding: 10px;
    margin: 15px 0;
    display: inline-block;
    width: 391px;
    max-width: 100%;
}

.auth-form form {
    padding: 20px;
}

.auth-form-title {
    margin: 0 0 30px;
    text-align: left;
}

.auth-form label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.auth-form label input[type="text"],
.auth-form label input[type="password"] {
    flex-basis: 260px;
}

.auth-form label.checkbox {
    font-size: 12px;
    line-height: 14px;
    color: #797A79;
    justify-content: flex-start;
    align-items: center;
    display: flex;
}

.auth-form__footer {
    border-top: 2px solid #DBDEE0;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.auth-form__external {
    padding: 0 20px 20px;
}

.form-auth__wrapper .auth-form__external {
    margin-top: 24px;
    max-width: 500px;
    padding: 0;
}

.auth-form__external-separator {
    border-top: 1px solid #DBDEE0;
    margin: 2px 0 18px;
    text-align: center;
}

.auth-form__external-separator span {
    background: #FFFFFF;
    color: #797A79;
    display: inline-block;
    font-size: 12px;
    line-height: 16px;
    padding: 0 10px;
    position: relative;
    top: -9px;
}

.auth-form__vk-widget {
    margin-bottom: 10px;
}

.auth-form__external--vk-sdk [data-vk-fallback] {
    display: none;
}

.auth-form__external-button {
    align-items: center;
    border-radius: 8px;
    box-sizing: border-box;
    display: flex;
    font-size: 15px;
    font-weight: 600;
    height: 44px;
    justify-content: center;
    line-height: 20px;
    margin-top: 10px;
    padding: 0 14px;
    text-align: center;
    text-decoration: none;
    width: 100%;
}

.auth-form__external-button:hover {
    text-decoration: none;
}

.auth-form__external-button--vk {
    background: #0077ff;
    color: #FFFFFF;
}

.auth-form__external-button--vk:hover {
    background: #006be6;
    color: #FFFFFF;
}

.auth-form__external-button--yandex {
    background: #FFFFFF;
    border: 1px solid #DBDEE0;
    color: #222222;
}

.auth-form__external-button--yandex:hover {
    border-color: #B9BEC3;
    color: #222222;
}

.auth-form__external-error {
    color: #EC1C23;
    font-size: 12px;
    line-height: 16px;
    margin-top: 12px;
}

.auth-form__external-email {
    margin-top: 14px;
}

.auth-form__external-email-title {
    color: #222222;
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
    margin-bottom: 6px;
}

.auth-form__external-email-text {
    color: #797A79;
    font-size: 12px;
    line-height: 16px;
    margin-bottom: 10px;
}

.auth-form__external-email input[type="email"] {
    border: 1px solid #DBDEE0;
    border-radius: 8px;
    box-sizing: border-box;
    color: #222222;
    font-size: 15px;
    height: 44px;
    line-height: 20px;
    padding: 0 12px;
    width: 100%;
}

.auth-form__external-email input[type="email"]:focus {
    border-color: #0077ff;
    outline: none;
}

.auth-form__external--loading {
    opacity: .7;
    pointer-events: none;
}

.auth-form input[type="password"].error,
.auth-form input[type="text"].error {
    border-color: #EC1C23;
    color: #EC1C23;
    outline: none;
}

.auth-form .errortext {
    color: #EC1C23;
    display: none;
    width: 100%;
    margin: 10px 0 0;
    padding-left: calc(100% - 260px);
}

.auth-form input[type="password"].error + .errortext,
.auth-form input[type="text"].error + .errortext {
    display: block;
}

@media (max-width: 600px) {

    .auth-form .errortext {
        padding-left: 0;
    }

    .auth-form {
        border: none;
        margin-left: -25px;
        margin-right: -25px;
        padding: 0;
        width: calc(100% + 50px);
        max-width: calc(100% + 50px);
    }

    .auth-form label:not(.checkbox) {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-form label:not(.checkbox) > span {
        margin-bottom: 5px;
    }

    .remember-input {
        display: none!important;
    }

    .auth-form input[type="submit"],
    .auth-form label input[type="text"],
    .auth-form label input[type="password"] {
        flex-basis: auto;
        width: 100%;
    }

    .auth-form__external {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 320px) {
    .auth-form {
        border: none;
        margin-left: -10px;
        margin-right: -10px;
        padding: 0;
        width: calc(100% + 20px);
        max-width: calc(100% + 20px);
    }
}
