/* DD Popups */

.dd-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}
.dd-popup-overlay.active {
    display: flex;
}

.dd-popup-overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: black;
    opacity: 0;
    transition: opacity var(--dd-animation-time, 0.3s) var(--dd-animation-easing, ease);
}
.dd-popup-overlay.active .dd-popup-overlay-bg {
    opacity: 0.5;
}


/* POPUP WINDOW */

.dd-popup {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--dd-color-background, white);
    color: var(--dd-color-text, inherit);
    border-radius: var(--dd-window-radius, 8px);
    max-width: min( var(--dd-max-width-popups, 1280px) , calc(100% - 40px) );
    max-height: calc(100vh - 40px);
    max-height: calc(100svh - 40px);
    width: fit-content;
    min-width: 280px;
    z-index: 1;
    overflow: hidden;
}


/* HEADER */

.dd-popup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 25px var(--dd-window-padding, 30px) 0;
    box-sizing: border-box;
}

.dd-popup-heading {
    font-weight: 500;
    margin-right: 30px;
}


/* CLOSE BUTTON */

.dd-popup .dd-popup-menu-closebutton {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: transparent;
    flex-shrink: 0;
}


/* CONTENT */

.dd-popup-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--dd-window-padding, 30px);
    box-sizing: border-box;
}


/* CTA BUTTONS */

.dd-popup-cta-buttons {
    display: flex;
    flex-flow: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0 var(--dd-window-padding, 30px) var(--dd-window-padding, 30px);
    box-sizing: border-box;
}

.dd-popup-cta-buttons:empty {
    display: none;
}


/* LOADING STATE */

.dd-popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    min-width: 200px;
    padding: var(--dd-window-padding, 30px);
}


/* RESPONSIVE */

@media screen and (max-width: 767px) {
    .dd-popup {
        max-width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        max-height: calc(100svh - 20px);
    }

    .dd-popup-header {
        padding: 20px 20px 0;
    }

    .dd-popup-body {
        padding: 20px;
    }

    .dd-popup-cta-buttons {
        padding: 0 20px 20px;
    }
}
