/* Exit Intent Popup Styles */
#exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#exit-popup-overlay.visible {
    display: flex;
}

/* Prevent background scrolling when modal is open */
body.no-scroll {
    overflow: hidden;
}

#exit-popup-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    width: 500px;
    text-align: center;
    position: relative;
    animation: fadeIn 0.3s ease-out;
    max-height: 90vh;
    /* Ensure modal itself is scrollable if too tall */
    overflow-y: visible;
    /* changed from auto to visible to allow close button to be outside */
}

#exit-popup-close {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    background-color: transparent;
    font-size: 40px;
    cursor: pointer;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    line-height: 1;
}

/* Mobile adjustment for close button if screen is narrow */
@media (max-width: 600px) {
    #exit-popup-close {
        top: -45px;
        right: 0;
    }
}

#exit-popup-close:hover {
    color: #ddd;
    background-color: transparent;
}

#exit-popup-content img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

#exit-popup-cta {
    display: inline-block;
    padding: 12px 24px;
    background-color: #ff6b6b;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#exit-popup-cta:hover {
    background-color: #ff5252;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}