body.lre-popup-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

.lre-popups {
    position: relative;
    z-index: 1000;
}

.lre-popup {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--lre-gutter);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.lre-popup.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lre-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.76);
}

.lre-popup__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 760px);
    max-height: min(600px, calc(100vh - 48px));
    overflow: hidden;
    background: #ffffff;
    color: var(--lre-color-ink);
    padding: 118px 114px 64px;
    outline: none;
}

.lre-popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: var(--lre-color-ink);
    cursor: pointer;
    font-family: var(--lre-font-sans);
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
}

.lre-popup__close:focus-visible {
    outline: 1px solid var(--lre-color-ink);
    outline-offset: 2px;
}

.lre-popup__heading {
    margin: 0 44px 28px;
    font-family: var(--lre-font-sans);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.lre-popup__content {
    font-family: var(--lre-font-sans);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
}

.lre-popup__content .wpcf7-form {
    margin: 0;
}

.lre-popup__content .screen-reader-response,
.lre-popup__content .hidden-fields-container,
.lre-popup__content .wpcf7-response-output:empty {
    display: none;
}

.lre-popup__content .lre-popup-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 10px;
}

.lre-popup__content .lre-popup-form p {
    margin: 0;
}

.lre-popup__content .lre-popup-form__field--wide,
.lre-popup__content .lre-popup-form__submit {
    grid-column: 1 / -1;
}

.lre-popup__content input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.lre-popup__content textarea,
.lre-popup__content select {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 0;
    padding: 5px 14px;
    font: inherit;
    color: var(--lre-color-ink);
    background: #f4f4f4;
}

.lre-popup__content textarea {
    height: 94px;
    min-height: 94px;
    resize: vertical;
}

.lre-popup__content input::placeholder,
.lre-popup__content textarea::placeholder {
    color: #141313;
    opacity: 1;
}

.lre-popup__content input[type="checkbox"],
.lre-popup__content input[type="radio"] {
    width: auto;
    min-height: 0;
    margin: 6px 6px 0 0;
}

.lre-popup__content .lre-popup-form__acceptance {
    color: rgba(31, 26, 20, 0.66);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.5;
}

.lre-popup__content .lre-popup-form__acceptance .wpcf7-list-item {
    margin: 0;
}

.lre-popup__content .lre-popup-form__acceptance label {
    display: flex;
    align-items: flex-start;
}

.lre-popup__content input[type="submit"],
.lre-popup__content button[type="submit"] {
    width: 100%;
    min-height: 44px;
    padding: 15px 35px;
    border: 1px solid var(--lre-color-ink);
    background: #080b1b;
    color: #ffffff;
    cursor: pointer;
    font-family: var(--lre-font-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

@media (max-width: 860px) {
    .lre-popup {
        padding: 16px;
    }

    .lre-popup__dialog {
        max-height: calc(100vh - 32px);
        overflow: auto;
        padding: 118px 34px 64px;
    }

    .lre-popup__heading {
        margin: 0 0 28px;
        font-size: clamp(13px, 3.8vw, 16px);
        line-height: 1.2;
        white-space: nowrap;
    }

    .lre-popup__content .lre-popup-form {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .lre-popup__content input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
    .lre-popup__content textarea,
    .lre-popup__content select {
        min-height: 80px;
        font-size: 20px;
        line-height: 1.2;
        padding: 16px 28px;
    }

    .lre-popup__content textarea {
        height: 180px;
        min-height: 180px;
    }
}

@media (min-width: 861px) and (max-height: 680px) {
    .lre-popup__dialog {
        overflow: auto;
    }
}
