.newsletter-exit-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 25, 30, 0.72);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
}

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

.newsletter-exit-dialog {
    position: relative;
    width: min(680px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 38px 24px 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
    transform: translateY(12px);
    transition: transform 180ms ease;
}

.newsletter-exit-modal.is-visible .newsletter-exit-dialog {
    transform: translateY(0);
}

.newsletter-exit-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #3c4858;
    font: 32px/1 Arial, sans-serif;
    cursor: pointer;
}

.newsletter-exit-close:hover,
.newsletter-exit-close:focus-visible {
    background: #f0f2f4;
    outline: none;
}

.newsletter-exit-title,
.newsletter-exit-copy {
    text-align: center;
}

.newsletter-exit-title {
    margin: 0 32px 8px;
    color: #3c4858;
    font-size: clamp(1.5rem, 4vw, 2.1rem);
}

.newsletter-exit-copy {
    margin: 0 auto 8px;
    color: #56616f;
    line-height: 1.5;
}

.newsletter-exit-frame {
    display: block;
    width: 100%;
    height: 850px;
    border: 0;
}

.newsletter-exit-actions {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.newsletter-exit-leave {
    border: 0;
    background: transparent;
    color: #56616f;
    text-decoration: underline;
    cursor: pointer;
}

body.newsletter-modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .newsletter-exit-frame {
        height: 900px;
    }

    .newsletter-exit-modal {
        padding: 10px;
    }

    .newsletter-exit-dialog {
        max-height: calc(100vh - 20px);
        padding: 44px 8px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .newsletter-exit-modal,
    .newsletter-exit-dialog {
        transition: none;
    }
}
