/**
 * Exit Intent Popup Styles for Content Pages
 * Modern design with route planner illustration
 * Responsive across all devices
 */

/* Modal Base Styling */
.exit-popup-content.modal {
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999 !important;
    overflow-x: hidden;
    overflow-y: auto;
}

.exit-popup-content .modal-dialog {
    max-width: 825px;
    margin: 1.75rem auto;
    position: relative;
    z-index: 1000000 !important;
    width: 100%;
}

.exit-popup-content .modal-content {
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1000001 !important;
    background: #fff;
}

.exit-popup-content .modal-body {
    padding: 0;
    position: relative;
}

/* Close Button - Positioned outside the modal box */
.exit-popup-content button.close {
    position: absolute;
    top: -60px;
    right: -70px;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    opacity: 1;
    border: none;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: #333;
    transition: all 0.3s ease;
    z-index: 1000002 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.exit-popup-content button.close:hover {
    opacity: 0.8;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.exit-popup-content button.close:focus {
    outline: none;
}

/* Content Container */
.exit-popup-content .popup-inner {
    max-width: 700px;
    margin: 0 auto;
}

/* Typography */
.exit-popup-content .popup-inner h2 {
    font-size: 36px;
    line-height: 1.3;
    font-weight: 700;
    color: #000;
    margin-bottom: 15px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.exit-popup-content .popup-description {
    font-size: 18px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 25px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Map Image */
.exit-popup-content .popup-image {
    margin-bottom: 30px;
}

.exit-popup-content .popup-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

/* CTA Button Section */
.exit-popup-content .popup-cta {
    margin-top: 30px;
}

.exit-popup-content .popup-cta .btn-primary {
    background: #1C72EB !important;
    color: #fff !important;
    font-size: 20px;
    font-weight: 600;
    padding: 15px 40px;
    border-radius: 8px;
    border: none;
    display: inline-block;
    text-decoration: none !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    line-height: 1.4;
    box-shadow: unset !important;
}

.exit-popup-content .popup-cta .btn-primary:hover {
    background-color: #1C72EB !important;
    box-shadow: 0 4px 12px rgba(28, 114, 235, 0.3);
    text-decoration: none !important;
    color: #fff !important;
}

.exit-popup-content .popup-cta .btn-primary:active {
    background: #1C72EB;
    color: #fff !important;
}

.exit-popup-content .no-cc-text {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    margin-bottom: 0;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Responsive Design - Tablet breakpoint removed */
/* Using desktop styles for all screens > 576px */

/* @media (max-width: 991px) {
    .exit-popup-content .modal-dialog {
        max-width: 700px;
        margin: 1.5rem auto;
    }

    .exit-popup-content .popup-inner h2 {
        font-size: 32px;
    }

    .exit-popup-content .popup-description {
        font-size: 17px;
    }
} */

/* Tablet breakpoint removed - using desktop styles for screens > 576px */

/* @media (max-width: 768px) {
    .exit-popup-content .modal-dialog {
        margin: 1.5rem auto;
        max-width: 90%;
        width: 90%;
    }

    .exit-popup-content .modal-content {
        padding: 55px 20px 30px;
        border-radius: 15px;
        width: 100%;
    }

    .exit-popup-content .popup-inner h2 {
        font-size: 28px;
        margin-bottom: 12px;
        margin-top: 0;
    }

    .exit-popup-content .popup-description {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .exit-popup-content .popup-image {
        margin-bottom: 25px;
    }

    .exit-popup-content .popup-cta .btn-primary {
        font-size: 18px;
        padding: 12px 30px;
        width: 100%;
        max-width: 350px;
    }

    .exit-popup-content button.close {
        width: 36px;
        height: 36px;
        font-size: 22px;
        top: 10px;
        right: 10px;
        background: #f5f5f5;
    }
} */

/* Responsive Design - Mobile */
@media (max-width: 576px) {
    .exit-popup-content .modal-dialog {
        margin: 1rem auto;
        max-width: 90%;
        width: 90%;
    }

    .exit-popup-content .modal-content {
        padding: 50px 20px 30px;
        border-radius: 12px;
        margin: 0;
        width: 100%;
    }

    .exit-popup-content .popup-inner h2 {
        font-size: 22px;
        line-height: 1.3;
        margin-top: 0;
    }

    .exit-popup-content .popup-description {
        font-size: 14px;
        margin-bottom: 18px;
    }

    .exit-popup-content .popup-image {
        margin-bottom: 20px;
    }

    .exit-popup-content .popup-cta {
        margin-top: 20px;
    }

    .exit-popup-content .popup-cta .btn-primary {
        font-size: 16px;
        padding: 12px 25px;
        width: 100%;
        max-width: 100%;
    }

    .exit-popup-content .no-cc-text {
        font-size: 12px;
    }

    /* Close button above the box, aligned to right edge on mobile */
    .exit-popup-content button.close {
        width: 32px;
        height: 32px;
        top: -40px;
        right: 0px;
        font-size: 20px;
        background: #f5f5f5;
    }

    /* Ensure images don't overflow */
    .exit-popup-content .popup-image img {
        max-width: 100%;
        width: 100%;
        height: auto;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .exit-popup-content .modal-dialog {
        margin: 0.5rem auto;
        max-width: 95%;
        width: 95%;
    }

    .exit-popup-content .modal-content {
        padding: 45px 15px 25px;
    }

    .exit-popup-content .popup-inner h2 {
        font-size: 20px;
    }

    .exit-popup-content .popup-description {
        font-size: 13px;
    }
}

/* Animation for modal entrance */
.exit-popup-content.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

.exit-popup-content.modal.show .modal-dialog {
    transform: none;
}

/* Ensure backdrop is visible and above everything */
.exit-popup-content.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999998 !important;
}

/* Bootstrap backdrop z-index fix */
.modal-backdrop.show {
    z-index: 999998 !important;
}

/* Ensure our modal shows above the backdrop */
#exitintentpopup-content.modal {
    z-index: 999999 !important;
}
