html.exit-popup-is-open {
    overflow: hidden;
}

.exit-popup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: auto;
    box-sizing: border-box;
    visibility: hidden;
    opacity: 0;
    background: rgba(29, 37, 43, 0.64);
    transition: opacity 200ms ease, visibility 200ms ease;
    -webkit-overflow-scrolling: touch;
}

.exit-popup.is-visible {
    visibility: visible;
    opacity: 1;
}

.exit-popup,
.exit-popup * {
    box-sizing: border-box;
}

.exit-popup__dialog {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, 0.88fr) minmax(390px, 1.12fr);
    width: min(760px, 100%);
    overflow: hidden;
    color: #252a2e;
    border-radius: 3px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    transform: translateY(-14px) scale(0.985);
    transition: transform 220ms ease;
    font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.exit-popup.is-visible .exit-popup__dialog {
    transform: translateY(0) scale(1);
}

.exit-popup__offer-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 42px 34px 36px;
    overflow: hidden;
    text-align: center;
    color: #fff;
    background: #515e6a;
}

.exit-popup__offer-panel::after {
    position: absolute;
    right: -78px;
    bottom: -78px;
    width: 180px;
    height: 180px;
    content: '';
    border: 34px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.exit-popup__offer-kicker {
    position: relative;
    z-index: 1;
    margin-bottom: 13px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.exit-popup__discount {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin: 0 0 18px;
    line-height: 0.82;
    white-space: nowrap;
}

.exit-popup__discount-value {
    color: #fff;
    font-size: 92px;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.exit-popup__discount-unit {
    margin: 0 0 4px 5px;
    color: #ffd9da;
    font-size: 42px;
    font-weight: 900;
}

.exit-popup__offer-text {
    position: relative;
    z-index: 1;
    max-width: 225px;
    margin: 0;
    color: rgba(255, 255, 255, 0.87);
    font-size: 16px;
    line-height: 1.45;
}

.exit-popup__content {
    position: relative;
    min-width: 0;
    padding: 38px 42px 32px;
    background: #fff;
}

.exit-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #939393;
    border: 0;
    border-radius: 50%;
    background: transparent;
    opacity: 0.72;
    cursor: pointer;
}

.exit-popup__close::before,
.exit-popup__close::after {
    position: absolute;
    top: 16px;
    left: 9px;
    width: 16px;
    height: 2px;
    content: '';
    border-radius: 2px;
    background: currentColor;
    transform-origin: center;
}

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

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

.exit-popup__close:hover,
.exit-popup__close:focus-visible {
    opacity: 1;
    background: #f3f4f8;
}

.exit-popup__close:focus-visible,
.exit-popup__phone:focus-visible,
.exit-popup__submit:focus-visible,
.exit-popup__policy:focus-visible,
.exit-popup__consent-input:focus-visible {
    outline: 3px solid rgba(81, 94, 106, 0.25);
    outline-offset: 2px;
}

.exit-popup__title {
    margin: 0 32px 9px 0;
    color: #515e6a;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.08;
}

.exit-popup__text {
    margin: 0 0 25px;
    color: #939393;
    font-size: 15px;
    line-height: 1.45;
}

.exit-popup__field {
    margin-bottom: 8px;
}

.exit-popup__label {
    display: block;
    margin-bottom: 6px;
    color: #515e6a;
    font-size: 13px;
    font-weight: 700;
}

.exit-popup__phone-wrap {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
}

.exit-popup__phone-prefix,
.exit-popup__phone {
    min-height: 52px;
    border: 1px solid #cfd0d3;
    background: #fff;
}

.exit-popup__phone-prefix {
    display: grid;
    place-items: center;
    color: #515e6a;
    border-right: 0;
    border-radius: 2px 0 0 2px;
    background: #f7f8fa;
    font-size: 17px;
    font-weight: 700;
}

.exit-popup__phone {
    display: block;
    width: 100%;
    padding: 0 15px;
    color: #1f2428;
    border-radius: 0 2px 2px 0;
    outline: none;
    font-size: 17px;
    line-height: normal;
    text-align: left;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.exit-popup__phone:focus {
    border-color: #515e6a;
    box-shadow: 0 0 0 3px rgba(81, 94, 106, 0.12);
}

.exit-popup__field.has-error .exit-popup__phone-prefix,
.exit-popup__field.has-error .exit-popup__phone {
    border-color: #ff5256;
}

.exit-popup__field-error {
    min-height: 17px;
    margin-top: 5px;
    color: #ff5256;
    font-size: 12px;
    line-height: 1.3;
}

.exit-popup__consent {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    margin: 4px 0 17px;
    color: #939393;
    font-size: 12px;
    line-height: 1.35;
    cursor: pointer;
}

.exit-popup__consent-input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #515e6a;
}

.exit-popup__consent.has-error {
    color: #ff5256;
}

.exit-popup__policy {
    display: inline;
    padding: 0;
    color: inherit;
    border: 0;
    border-radius: 0;
    background: none;
    font-size: inherit;
    line-height: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.exit-popup__submit {
    display: block;
    width: 100%;
    min-height: 51px;
    padding: 12px 22px;
    color: #fff;
    border: 0;
    border-radius: 999px;
    background: #ff5256;
    box-shadow: 0 8px 20px rgba(255, 82, 86, 0.2);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease;
}

.exit-popup__submit:hover {
    background: #ff5e62;
    transform: translateY(-1px);
}

.exit-popup__submit:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.exit-popup__form-error {
    min-height: 17px;
    margin-top: 8px;
    text-align: center;
    color: #ff5256;
    font-size: 12px;
    line-height: 1.3;
}

.exit-popup__success {
    min-height: 318px;
    padding-top: 58px;
    text-align: center;
}

.exit-popup__success[hidden] {
    display: none;
}

.exit-popup__success-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 17px;
    color: #fff;
    border-radius: 50%;
    background: #2f8a55;
    font-size: 30px;
    font-weight: 900;
}

.exit-popup__success h3 {
    margin: 0 0 8px;
    color: #515e6a;
    font-size: 25px;
}

.exit-popup__success p {
    margin: 0;
    color: #939393;
    font-size: 15px;
    line-height: 1.45;
}

@media (max-width: 767px) {
    .exit-popup {
        align-items: center;
        padding: 12px;
    }

    .exit-popup__dialog {
        display: block;
        width: min(390px, 100%);
        max-height: calc(100vh - 24px);
        overflow: auto;
    }

    .exit-popup__offer-panel {
        display: block;
        min-height: 0;
        padding: 18px 48px 17px;
    }

    .exit-popup__offer-kicker {
        margin: 0 0 6px;
        font-size: 10px;
    }

    .exit-popup__discount {
        margin: 0;
        align-items: flex-end;
        line-height: 0.9;
    }

    .exit-popup__discount-value {
        font-size: 64px;
    }

    .exit-popup__discount-unit {
        margin: 0 0 3px 4px;
        font-size: 29px;
    }

    .exit-popup__offer-text {
        display: none;
    }

    .exit-popup__content {
        padding: 24px 20px 21px;
    }

    .exit-popup__title {
        margin-bottom: 7px;
        font-size: 23px;
    }

    .exit-popup__text {
        margin-bottom: 17px;
        font-size: 14px;
    }

    .exit-popup__close {
        top: 7px;
        right: 7px;
        color: #fff;
        background: rgba(0, 0, 0, 0.13);
    }

    .exit-popup__close:hover,
    .exit-popup__close:focus-visible {
        background: rgba(0, 0, 0, 0.22);
    }

    .exit-popup__success {
        min-height: 270px;
        padding-top: 38px;
    }
}

@media (max-width: 359px) {
    .exit-popup__offer-panel {
        padding-top: 14px;
        padding-bottom: 13px;
    }

    .exit-popup__content {
        padding: 20px 16px 17px;
    }

    .exit-popup__phone-prefix,
    .exit-popup__phone {
        min-height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .exit-popup,
    .exit-popup__dialog,
    .exit-popup__phone,
    .exit-popup__submit {
        transition: none;
    }
}
