#reve-popup-modal .modal-content,
.reve-popup-preview .modal-content {
    background: #fff;
    border: 0;
    border-radius: 12px;
    overflow: auto;
    overscroll-behavior: contain;
}

.reve-popup-preview .modal-content {
    max-height: calc(100dvh - 60px);
}

.reve-popup-preview.modal {
    max-width: 100dvw;
}

.reve-popup-card {
    position: relative;
    display: grid;
    gap: 0;
    align-items: center;
    background: #fff;
    color: #242322;
}

.reve-popup-card-with-image {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.reve-popup-card-image-only {
    grid-template-columns: minmax(0, 1fr);
}

.reve-popup-card-image-only .reve-popup-body {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
}

.reve-popup-picture {
    display: block;
    min-width: 0;
}

.reve-popup-image {
    display: block;
    width: 100%;
    max-height: 66vh;
    object-fit: contain;
    background: #f5f3ef;
}

.reve-popup-close {
    position: absolute;
    z-index: 1;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #d9d5ce;
    border-radius: 50%;
    background: #fff;
    color: #242322;
    font: 26px/1 Arial, sans-serif;
}

.reve-popup-body {
    min-width: 0;
    padding: 54px clamp(20px, 4vw, 48px) 32px;
    overflow-wrap: anywhere;
    text-align: center;
}

.reve-popup-body h2 {
    margin: 0 0 14px;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.15;
}

.reve-popup-body p {
    margin: 0 0 20px;
}

.reve-popup-code {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0 auto;
}

.reve-popup-code input {
    width: min(100%, 17em);
    padding: 8px 12px;
    border: 1px dashed #71685c;
    border-radius: 4px;
    background: #f5f3ef;
    color: #242322;
    font: 600 16px/1.4 monospace;
    text-align: center;
}

.reve-popup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 100%;
    padding: 8px 14px;
    border: 1px solid #242322;
    border-radius: 4px;
    background: #242322;
    color: #fff;
    text-decoration: none;
}

.reve-popup-button:is(:hover, :focus) {
    background: #47423c;
    color: #fff;
}

.reve-popup-feedback {
    min-height: 2.5em;
    padding: 4px 0;
    color: #354e3b;
    font-size: .9em;
}

.reve-popup-opt-out {
    display: block;
    min-height: 44px;
    margin: 6px auto 0;
    padding: 4px 8px;
    border: 0;
    background: transparent;
    color: #4e4942;
    text-decoration: underline;
}

@media (max-width: 767px) {
    .reve-popup-card-with-image {
        grid-template-columns: minmax(0, 1fr);
    }

    .reve-popup-image {
        max-height: 32vh;
    }

    .reve-popup-card-image-only .reve-popup-image {
        max-height: 66vh;
    }

    .reve-popup-card-with-image .reve-popup-body {
        padding-top: 22px;
    }
}
