.modal__wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 100;
}

.modal {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    width: max-content;
    margin: 167px auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, top 0.3s;
    z-index: 101;
}

.modal__wrapper--show {
    opacity: 1;
    pointer-events: initial;
}

.modal--show {
    opacity: 1;
    pointer-events: initial;
    top: 0;
}

.modal--auth {
    width: 484px;
    max-width: 100%;
}

.auth__wrapper {
    width: 484px;
    max-width: calc(100% - 30px);
    background: #FFFFFF;
    border-radius: 10px;
    margin: 68px auto 120px;
    padding: 30px 27px;
    box-sizing: border-box;
}

.auth__wrapper--registration {
    padding: 30px 27px 57px 30px;
}

.auth__wrapper--modal {
    margin: 0 auto;
}

.auth__header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 25px;
}

.auth__title {
    color: #000000;
    font-size: 24px;
    line-height: normal;
    font-weight: 400;
}

.auth__subtitle {
    color: #494A4A;
    font-size: 14px;
    line-height: normal;
    font-weight: 300;
}

.auth__form {
    display: flex;
    flex-direction: column;
    gap: 23px;
}

.auth__form--registration {
    gap: 42px;
    margin-bottom: 30px;
}

.auth__form--modal {
    gap: 15px;
    margin-bottom: 43px;
}

.auth__label {
    font-size: 20px;
    color: #000000;
    margin-bottom: 5px;
    line-height: normal;
    display: flex;
    align-items: center;
}

.auth__label_trailing {
    margin-left: auto;
    font-size: 15px;
    color: #494A4A;
}

.auth__label .auth__sup {
    margin-left: 2px;
}

.auth__input {
    border: 1px solid #A5A8A8;
    border-radius: 10px;
    height: 50px;
    padding: 13px 12px;
    width: 100%;
    font-size: 20px;
    color: #000000;
    box-sizing: border-box;
}

.auth__input--modal {
    height: 60px;
    text-align: center;
}

.auth__input::placeholder {
    color: #A5A8A8;
}

.auth__input:hover,
.auth__input:focus {
    border-color: #267A16;
    outline: none;
}

.auth__input--error {
    border-color: #EE340B;
}

.auth__submit {
    margin-top: 26px;
    background: #267A16;
    color: #FFFFFF;
    border-radius: 10px;
    font-size: 20px;
    height: 60px;
    border: none;
    cursor: pointer;
}

.auth__form--registration .auth__submit {
    margin-top: 0;
}

.auth__form--password-recovery .auth__submit {
    margin-top: 0;
}

.auth__form--modal .auth__submit {
    margin-top: 0;
}

.auth__form--password-recovery {
    margin-bottom: 30px;
}

.auth__link_login {
    color: #267A16;
    font-size: 16px;
    margin-top: 12px;
    display: inline-block;
    text-decoration: none;
    margin-bottom: 35px;
    line-height: normal;
}

.auth__oauth_wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
    margin: 20px auto 40px;
    width: 100%;
}

.auth__link_text {
    text-align: center;
    font-size: 16px;
    color: #000000;
    line-height: normal;
}

.auth__link_text--left {
    text-align: left;
}

.auth__link_text--large {
    font-size: 20px;
}

.auth__link_text a {
    text-decoration: none;
    color: #267A16;
    transition: color .15s ease;
}

.auth__link_text a:hover {
    color: #34C318;
}

.auth__popover {
    position: relative;
    display: inline-block;
    margin-left: 6px;
}

.auth__popover_icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 19px;
    height: 19px;
    border-radius: 20px;
    background: #D9D9D9;
    color: #494A4A;
    font-size: 15px;
}

.auth__popover_content {
    min-width: 243px;
    max-width: 100%;
    background: #F1EFEF;
    border: 1px solid #828484;
    padding: 9px 12px;
    border-radius: 5px;
    font-size: 14px;
    color: #494A4A;
    line-height: normal;
    position: absolute;
    left: 25px;
    top: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.auth__popover:hover .auth__popover_content {
    display: block;
    opacity: 1;
    pointer-events: initial;
}

.auth__checkbox {
    position: relative;
    cursor: pointer;
}

.auth__checkbox input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.auth__checkbox_icon {
    border: 1px solid #828484;
    border-radius: 2px;
    width: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 24px;
    height: 24px;
    background: #ffffff;
}

.auth__checkbox input:checked ~ .auth__checkbox_icon {
    background: #267A16;
    border: 1px solid #267A16;
}

.icon--auth-checkbox-icon {
    width: 17px;
    height: 10px;
    color: #ffffff;
    opacity: 0;
}

.auth__checkbox input:checked ~ .auth__checkbox_icon .icon--auth-checkbox-icon {
    opacity: 1;
}

.auth__checkbox__wrapper {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 9px;
}

.auth__checkbox__info {
    color: #000000;
    font-size: 16px;
    line-height: normal;
}

.auth__checkbox__info a {
    text-decoration: none;
    color: #267A16;
}

.auth__stages {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 49px 0 40px 0;
}

.auth__stage {
    background: #A5A8A8;
    color: #ffffff;
    width: 35px;
    min-width: 35px;
    border-radius: 100px;
    height: 35px;
    font-size: 20px;
    line-height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.auth__stage_line {
    width: 100%;
    height: 1px;
    background: #A5A8A8;
}

.auth__stage.auth__stage--passed {
    color: #000000;
    background: #D9D9D9;
}

.auth__stage.auth__stage--active {
    background: #267A16;
}

.auth__sup {
    font-size: 20px;
    color: #EE340B;
}

.auth__captcha {
    background: #E8E7E7;
    border: 1px solid #828484;
    border-radius: 10px;
    padding: 28px 25px;
    display: grid;
    grid-template-columns: 27px 1fr;
    align-items: center;
    gap: 11px;
    width: 342px;
    max-width: 100%;
}

.auth__captcha .auth__checkbox_icon {
    border-radius: 3px;
}

.auth__captcha_info {
    color: #000000;
    font-size: 20px;
    line-height: normal;
}

.auth__checkbox_group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-top: 16px;
}

.auth__checkbox_group .auth__checkbox__wrapper {
    grid-template-columns: 29px 1fr;
    gap: 15px;
}

.auth__checkbox_group .auth__checkbox__info {
    font-size: 20px;
}

.auth__checkbox_group .auth__checkbox_icon {
    border-radius: 3px;
    width: 29px;
    min-width: 29px;
    height: 29px;
}

.auth__checkbox_row {
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.auth__notify {
    background: #FFFFFF;
    border-radius: 10px;
    padding: 39px 36px 30px 36px;
    margin: 68px auto 120px;
    width: 687px;
    max-width: calc(100% - 30px);
    color: #000000;
    box-sizing: border-box;
}

.auth__notify h4 {
    font-weight: 500;
    font-size: 24px;
    margin-bottom: 33px;
    line-height: normal;
}

.auth__notify--right {
    text-align: right;
}

.auth__notify p {
    margin: 25px 0;
    font-size: 20px;
    line-height: 28px;
}

.auth__notify a {
    text-decoration: underline;
    color: #267A16;
    text-underline-offset: 3px;
}

.auth__notify p:first-of-type {
    margin-top: 0;
}

.auth__notify p:last-of-type {
    margin-bottom: 0;
}

.auth__header--inline {
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 7px;
}

.auth__header--inline .auth__subtitle {
    width: 404px;
    max-width: 100%;
}

.auth__form_group_trailing {
    display: none;
}

.show-phone {
    display: none;
}

@media (max-width: 520px) {

    .hide-phone {
        display: none;
    }

    .show-phone {
        display: block;
    }

    .auth__wrapper {
        margin: 20px auto 57px;
        width: calc(100% - 24px);
        padding: 14px 11px 24px 11px;
    }

    .auth__form--password-recovery {
        margin-bottom: 25px;
    }

    .auth__notify {
        margin: 20px auto 57px;
        width: calc(100% - 24px);
        padding: 14px 11px;
    }

    .auth__title {
        font-size: 18px;
    }

    .auth__subtitle {
        font-size: 12px;
    }

    .auth__label {
        font-size: 16px;
        font-weight: 300;
    }

    .auth__input {
        height: 40px;
        font-size: 16px;
        font-weight: 300;
    }

    .auth__submit {
        height: 40px;
        font-size: 18px;
        margin-top: 0;
    }

    .auth__link_login {
        font-size: 14px;
        margin-bottom: 25px;
        margin-top: 18px;
    }

    .auth__link_text {
        font-size: 14px;
        line-height: 18px;
        font-weight: 300;
    }

    .auth__link_text--large-phone {
        font-size: 16px;
        line-height: 25px;
    }

    .auth__link_text--large-phone a {
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .auth__oauth_wrapper {
        margin: 9px auto 25px;
        gap: 4px;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .auth__oauth_item {
        display: flex;
        justify-content: center;
        background: #F1EFEF;
        padding: 4px;
    }

    .auth__label_trailing {
        display: none;
    }

    .auth__form--registration {
        gap: 25px;
        margin-bottom: 25px;
    }

    .auth__stage {
        font-size: 16px;
        width: 20px;
        min-width: 20px;
        height: 20px;
    }

    .auth__stages {
        margin: 25px auto;
    }

    .auth__popover {
        display: none;
    }

    .auth__form_group_trailing {
        display: block;
        font-size: 14px;
        font-weight: 300;
        line-height: 15px;
        color: #494A4A;
        margin-top: 10px;
    }

    .auth__checkbox__info {
        font-size: 16px;
        font-weight: 300;
    }

    .auth__captcha {
        padding: 19px 25px;
        width: 223px;
        max-width: 100%;
    }

    .auth__captcha_info {
        font-size: 16px;
        font-weight: 300;
    }

    .auth__form--modal {
        margin-bottom: 25px;
    }

    .auth__form--inner {
        flex-direction: column-reverse;
        margin: 0;
    }

    .auth__checkbox_group {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .auth__checkbox_row {
        gap: 12px;
    }

    .auth__checkbox_group .auth__checkbox__info {
        font-size: 16px;
    }

    .auth__checkbox__wrapper {
        align-items: center;
    }

    .auth__notify h4 {
        font-size: 18px;
        font-weight: 400;
        margin-bottom: 14px;
    }

    .auth__notify p {
        font-size: 16px;
        font-weight: 300;
        line-height: 22px;
        margin: 14px 0;
    }

    .auth__notify p:first-of-type {
        margin-top: 0;
    }

    .auth__notify p:last-of-type {
        margin-bottom: 0;
    }

    .auth__notify--right {
        text-align: left;
    }
}