.header-mid {
    position: relative;
}
.header-login {
    position: relative;
}
.header-login::after {
    content: '';
    position: absolute;
    top: calc(100% + 3px);
    left: 50%;
    z-index: 12;
    width: 0;
    height: 0;
    border-left: 12.5px solid transparent;
    border-right: 12.5px solid transparent;
    border-bottom: 12.5px solid white;
    pointer-events: none;
    opacity: 0;
    transform: translateY(15px) translateX(-50%);

    transition: .3s;
}
.header-login.auth-open::after {
    opacity: 1;
    transform: translateY(0px) translateX(-50%);
}
.header-login__modal {
    position: absolute;
    left: 0;
    top: calc(100% - 12px);
    width: 100%;
    z-index: 11;

    pointer-events: none;
    opacity: 0;
    transition: opacity .3s ease;
}
.header-login__modal.open {
    opacity: 1;
}
.header-login__modal.open .auth-modal {
    pointer-events: all;
}
.auth-modal {
    max-width: 746px;
    width: 100%;
    min-height: 377px;
    margin-left: auto;
    
    display: flex;
    
    background-color: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 11px 40px 0 rgba(0, 0, 0, 0.25);

    pointer-events: all;
    transition: transform .3s ease;
    transform: translateY(15px);
}
.header-login__modal.open .auth-modal {
    transform: translateY(0);
}

.auth-modal .register-banner {
    width: 47.3%;
    flex-shrink: 0;
    background-image:
        /* url('../img/register/reg-banner-pattern.svg'),  */
        url('../img/reg-banner-pattern.svg'),
        linear-gradient(90deg, #EFF5FB 87.91%, #DEE7F0 100.13%);

    background-repeat: repeat-y, no-repeat;
    background-position: center center, center center;
    background-size: 100%, cover;
}

.auth-modal__form {
    flex-grow: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    row-gap: 20px;
}
.auth-modal__title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.43;
    color: #191C21;
    padding-right: 26px;
}

.auth-modal__form .btn {
    padding: 18px 23px;
}

.header.fix .header-login__modal {
    display: none;
}

.auth-form__sms {
    display: flex;
    align-items: flex-end;
    /* justify-content: space-between; */
    gap: 20px;
}

.auth-form__sms .fg {
    width: 100%;
    max-width: 175px;
}

.auth-form__sms-content {
    /* padding-right: 12px; */
}

.auth-form__sms-text {
    color: #A0A3AA;
    font-size: 13px;
    font-weight: 500;
    line-height: 138%; /* 17.94px */
}
.auth-form__sms-try {
    display: inline-block;
    margin-top: 3px;
    color: #20247A;
    font-size: 14px;
    font-weight: 600;
    line-height: 143%; /* 20.02px */
    border-bottom: 1px dashed rgba(32, 36, 122, 0.50);
    transition: color .3s;
}

.auth-form__options {
    display: flex;
    row-gap: 6px;
    column-gap: 10px;
}
.auth-form__options > input {
    display: none;
    opacity: 0;
    width: 0;
    height: 0;
    visibility: hidden;
}

.auth-form__options > input:checked + .auth-option {
    border-color: #20247A;
    cursor: default;
}

.auth-option {
    padding: 12px;
    flex: 1;
    display: flex;
    column-gap: 10px;
    border: 2px solid #F3F4F5;
    border-radius: 14px;
    transition: .3s;
    cursor: pointer;
}
.auth-option .radio {
    flex-shrink: 0;
}
.auth-option__text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.38;
    color: #343E4A;
}

.auth-form__sms-timer {
    margin-top: 3px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.38;
    color: #92969A;
}

.auth-form__sms-timer span {
    color: #191C21;
}

@media screen and (max-width: 1260px) {
    .header-login__modal {
        top: calc(100% - 4px);
    }
}

@media screen and (max-width: 992px){
    .auth-modal {
        max-width: 720px;
    }
    .auth-modal .register-banner {
        width: 49%;
        padding: 16px;
    }
    .auth-modal__form {
        padding: 16px;
    }
    .auth-modal__title {
        padding-right: 34px;
    }

    .auth-form__sms .fg {
        max-width: 151px;
    }
    .auth-form__sms-content {
        padding-right: 0;
    }

}

@media screen and (max-width: 767px) {
    .header-login__modal {
        position: fixed;
        width: 100%;
        height: 100%;
        bottom: 0;
        left: 0;
        top: auto;
    }
    .header-login__modal .container {
        padding: 0;
        height: 100%;
    }

    .auth-modal {
        margin: 0 auto;
        height: 100%;
        flex-direction: column-reverse;
        border-radius: 14px 14px 0 0;
    }
    .auth-modal__form {
        padding: 25px;
        flex-grow: 0;
    }
    .auth-modal .register-banner {
        flex-grow: 1;
        padding: 25px;
        width: auto;
    }
    .header.fix .header-login__modal {
        display: block;
    }

    .auth-form__sms .fg {
        width: auto;
        max-width: none;
    }
    .auth-form__sms {
        justify-content: flex-start;
    }

}

@media screen and (max-width: 580px) {
    .auth-modal__title {
        font-size: 18px;
    }
    .register-banner__title {
        font-size: 18px;
    }
    .auth-form__sms {
        flex-direction: column;
        align-items: stretch;
        row-gap: 10px;
    }

    .auth-form__options {
        flex-direction: column;
    }
}

.header-login__modal.phone .auth-modal__form.auth-form {
    display: none;
}

.header-login__modal:not(.phone) .auth-modal__form.phone-form {
    display: none;
}

.header-login__modal.resend .auth-form__sms-timer {
    display: none;
}

.header-login__modal:not(.resend) .auth-form__sms-try {
    display: none;
}

.header-login__modal:not(.login) .auth-modal__title .login {
    display: none;
}

.header-login__modal.login .auth-modal__title .register {
    display: none;
}

.header-login__modal.login .auth-form__options {
    display: none;
}

.header-login__modal .fg input[name="phone"]:focus {
    border-color: transparent;
}

.header-login__modal .error-field .fg__icon,
.header-login__modal .error-field[data-validate="code"] input {
    border: 1.4px solid var(--UI-Red, #F00) !important;
    background: var(--UI-White, #FFF) o !important;
    box-shadow: 0 2px 6px 0 rgba(255, 0, 0, 0.13) inset !important;
}

.header-login__modal .error-field input {
    color: var(--UI-Red, #F00) !important;
}

.header-login__modal .error-field svg path {
    stroke: var(--UI-Red, #F00) !important;
}

.header-login__modal .errors {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 13px;
}

.header-login__modal .errors li {
    color: var(--UI-Red, #F00);
    text-align: center;
    /* Text, 12px/Regular */
    font-family: Inter;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 133%; /* 15.96px */
    list-style-type: disc;
}

.header-login__modal.loading {
    pointer-events: none;
}

.header-login__modal.loading .auth-modal__form > * {
    opacity: 0.8;
}

/*
.header-login__modal .nazad-btn {
    display: flex;
    padding: 10px 20px;
    justify-content: center;
    align-items: center;
    gap: 5px;
    align-self: stretch;

    border-radius: 10px;
    border: 2px solid var(--UI-Dark-Grey-Blue, #BACFE3);

    color: var(--Primary-Dark-Blue, #20247A);

    font-family: Inter;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
    line-height: 138%;

    cursor: pointer;
}
*/

.header-login__modal .fg[data-validate="none"] input {
    border: none;
}

.header-login__modal .buttons-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-login__modal .nazad-btn {
    cursor: pointer;
}