.auth-popup.popup {
    width: min(760px, calc(100vw - 32px));
    min-width: 0;
    border-radius: 18px;
    box-shadow: none;
    background: #fff;
}

.auth-popup__shell {
    display: grid;
    grid-template-columns: 340px 1fr;
    min-height: 462px;
}

.auth-popup__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: linear-gradient(110deg, #f7fbff 0%, #dcebff 74%);
    overflow: hidden;
}

.auth-popup__logo {
    width: 172px;
    height: auto;
    object-fit: contain;
}

.auth-popup__panel {
    position: relative;
    padding: 30px;
}

.auth-popup__close {
    position: absolute;
    top: 31px;
    right: 30px;
    width: 20px;
    height: 20px;
    padding: 0;
    background: transparent;
}

.auth-popup__close:before,
.auth-popup__close:after {
    content: "";
    position: absolute;
    left: 9px;
    top: 1px;
    width: 2px;
    height: 18px;
    background: #1b1b1b;
    border-radius: 2px;
}

.auth-popup__close:before {
    transform: rotate(45deg);
}

.auth-popup__close:after {
    transform: rotate(-45deg);
}

.auth-popup__legacy-close {
    display: none;
}

.auth-popup__form {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.auth-popup__form.is-active {
    display: flex;
}

.auth-popup__title {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
    color: #05070c;
}

.auth-popup__tabs {
    display: inline-flex;
    width: max-content;
    padding: 0;
    border: 1px solid #c9d8f4;
    border-radius: 12px;
    overflow: hidden;
}

.auth-popup__tab {
    min-width: 81px;
    height: 46px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #111;
    font-size: 14px;
    font-weight: 700;
}

.auth-popup__tab.is-active {
    border-radius: 10px;
    background: #111;
    color: #fff;
}

.auth-popup__field {
    position: relative;
}

.auth-popup__input {
    width: 100%;
    height: 48px;
    padding: 0 42px 0 12px;
    border: 1px solid #c7d7f6;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    font-weight: 400;
    line-height: 48px;
    color: #657494;
    outline: none;
}

#fakePopup.auth-popup input.auth-popup__input {
    border-radius: 12px !important;
    -webkit-border-radius: 12px !important;
    appearance: none;
    -webkit-appearance: none;
}

.auth-popup__input:focus,
.auth-popup__input:not(:placeholder-shown) {
    background: #fff;
    padding-top: 12px;
    padding-bottom: 2px;
    color: #05070c;
}

.auth-popup__label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #657494;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    pointer-events: none;
    transition: top 0.15s ease, transform 0.15s ease, font-size 0.15s ease;
}

.auth-popup__input:focus + .auth-popup__label,
.auth-popup__input:not(:placeholder-shown) + .auth-popup__label {
    top: 8px;
    transform: none;
    color: #73809c;
    font-size: 10px;
}

.auth-popup__toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 22px;
    height: 22px;
    border: 0;
    transform: translateY(-50%);
    background: transparent;
    color: #6d7994;
    cursor: pointer;
}

.auth-popup__toggle-password:before {
    content: "";
    position: absolute;
    left: 2px;
    top: 5px;
    width: 18px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 50%;
    box-sizing: border-box;
}

.auth-popup__toggle-password:after {
    content: "";
    position: absolute;
    left: 8px;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.auth-popup__forgot {
    margin-top: -4px;
    color: #111;
    font-size: 12px;
    font-weight: 500;
}

.auth-popup__primary,
.auth-popup__secondary {
    width: 100%;
    height: 48px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
}

.auth-popup__primary {
    background: #0871e8;
    color: #fff;
}

#fakePopup.auth-popup .auth-popup__primary:hover,
#fakePopup.auth-popup .auth-popup__primary:focus {
    background: #1f82ef;
    color: #fff;
}

.auth-popup__secondary {
    background: #f2f2f2;
    color: #05070c;
}

#fakePopup.auth-popup .auth-popup__secondary:hover,
#fakePopup.auth-popup .auth-popup__secondary:focus {
    background: #f2f2f2;
    color: #05070c;
}

.auth-popup__or {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #6d7994;
    font-size: 13px;
    justify-content: center;
    margin-top: 8px;
}

.auth-popup__or:before,
.auth-popup__or:after {
    content: "";
    width: 120px;
    height: 1px;
    background: #e3e8f2;
}

.auth-popup__socials {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.auth-popup__social {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    font-size: 19px;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-popup__social_vk {
    background: #e5f2ff;
    color: #0077ff;
}

#fakePopup.auth-popup .auth-popup__social_vk:hover,
#fakePopup.auth-popup .auth-popup__social_vk:focus {
    background: #e5f2ff;
    color: #0077ff;
}

.auth-popup__social_ya {
    background: #ffe7e7;
    color: #f00;
}

#fakePopup.auth-popup .auth-popup__social_ya:hover,
#fakePopup.auth-popup .auth-popup__social_ya:focus {
    background: #ffe7e7;
    color: #f00;
}

.auth-popup__social img {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin: 0 auto;
}

.auth-popup__message {
    display: none;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.35;
}

.auth-popup__message.is-error {
    display: block;
    background: #fff0f0;
    color: #c02525;
}

.auth-popup__message.is-success {
    display: block;
    background: #eefaf2;
    color: #177245;
}

@media (max-width: 743px) {
    .auth-popup.popup {
        width: 100%;
        max-height: 100dvh;
        overflow-y: auto;
        border-radius: 18px 18px 0 0;
    }

    .auth-popup__shell {
        display: block;
        min-height: 0;
    }

    .auth-popup__brand {
        display: none;
    }

    .auth-popup__panel {
        padding: 24px 16px 18px;
    }

    .auth-popup__close {
        top: 24px;
        right: 18px;
    }
}
