/* ============================================================
   Divi Popup On Load — popup.css
   ============================================================ */

/* ── The overlay backdrop ── */
#dpol-overlay {
    position: fixed;
    inset: 0;                      /* top/right/bottom/left: 0 */
    z-index: 999998;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.35s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#dpol-overlay.dpol-visible {
    opacity: 1;
}

/* ── The popup wrapper that holds the Divi section ── */
#dpol-popup-wrapper {
    position: relative;
    max-width: 860px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 6px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    transform: translateY(28px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.35s ease;
    opacity: 0;
}

#dpol-overlay.dpol-visible #dpol-popup-wrapper {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ── Close (×) button ── */
#dpol-close-btn {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 999999;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #333;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

#dpol-close-btn:hover {
    background: #333;
    color: #fff;
    transform: scale(1.1) rotate(90deg);
}

/* ── The relocated Divi section — strip Divi's own layout styles ── */
#dpol-popup-wrapper > .et_pb_section {
    margin: 0 !important;
    padding-top: 60px !important;       /* breathing room below close btn */
    width: 100% !important;
    max-width: 100% !important;
}

/* ── Body lock when popup is open ── */
body.dpol-open {
    overflow: hidden;
}

/* ── Scrollbar styling inside popup (Webkit) ── */
#dpol-popup-wrapper::-webkit-scrollbar {
    width: 6px;
}
#dpol-popup-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
#dpol-popup-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}
