/* When popup is active, make sure header/admin bar sit below overlay */
body.daz-exit-active #wpadminbar,
body.daz-exit-active .site-header,
body.daz-exit-active #header,
body.daz-exit-active #mlh-header{
    z-index:1 !important;
}

/* Full-screen overlay above everything */
#daz-exit-modal{
    display:none;
    position:fixed;
    inset:0;
    z-index:2147483647 !important;
    background:rgba(0,0,0,0.6);
    overflow:auto;
}

/* White card – centered, scrollable if taller than viewport */
.daz-exit-modal-content{
    background:#fff;
    width:90%;
    max-width:900px;
    max-height:calc(100vh - 160px); /* leave space top/bottom */
    margin:100px auto 60px;         /* visually below header/admin bar */
    position:relative;
    border-radius:8px;
    display:flex;
    flex-direction:row;
    box-sizing:border-box;
    overflow:hidden;
}

/* Inner wrapper scrolls vertically inside the card */
.daz-exit-modal-inner{
    display:flex;
    width:100%;
    height:100%;
    overflow-y:auto;
}

/* Image column */
.daz-exit-modal-image{
    flex:1 1 40%;
    max-width:40%;
    overflow:hidden;
    display:block;
}
.daz-exit-modal-image img{
    width:auto !important;
    display:block;
    border-radius:8px 0 0 8px;
}

/* Form column */
.daz-exit-modal-form{
    flex:1 1 60%;
    max-width:60%;
    padding:30px;
    box-sizing:border-box;
}
.daz-exit-modal-form h2{
    color:#34b0d9;
}

/* Close button */
.daz-close{
    position:absolute;
    right:15px;
    top:15px;
    font-size:24px;
    background:0;
    border:0;
    cursor:pointer;
    z-index:2;
}

.daz-exit-modal-form input, .daz-exit-modal-form select { font-size:14px; }

/* Mobile adjustments */
@media(max-width:768px){
    .daz-exit-modal-content{
        flex-direction:column;
        max-height:calc(100vh - 140px);
        margin:80px auto 40px;
    }
    .daz-exit-modal-inner{
        flex-direction:column;
        overflow-y:auto;
        height:100%;
    }
    .daz-exit-modal-image{
        display:none;
    }
    .daz-exit-modal-form{
        max-width:100%;
        padding:20px;
    }
}

/* Optional animation (unchanged) */
@keyframes daz-fadein{
    from{opacity:0;transform:scale(0.9)}
    to{opacity:1;transform:scale(1)}
}
