/**
 * Jengjavilla Image Modal Styles
 * Simple modal for enlarging images
 */

/* ==========================================================================
   Image Modal Styles
   ========================================================================== */

.jengjavilla-image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999 !important;
    align-items: center;
    justify-content: center;
}

.jengjavilla-image-modal.active {
    display: flex;
}

/* Ensure modal is above header */
body.image-modal-open .site-header-main,
body.image-modal-open .header-container {
    z-index: 99 !important;
}

/* Modal Overlay */
.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 1;
}

/* Modal Content */
.image-modal-content {
    position: relative;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    animation: imageModalSlideIn 0.3s ease;
}

@keyframes imageModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal Image */
.image-modal-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

/* Close Button */
.image-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #1B3A42;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.image-modal-close:hover {
    background: #ffffff;
    transform: rotate(90deg) scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .image-modal-content {
        width: 100%;
        top: 30px;
        /* background-color: #fff; */
        height: 80vh;
        padding: 60px 15px 15px 15px;
    }

    .image-modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    .image-modal-img {
        border-radius: 4px;
    }
}

/* Clickable Image Indicator */
.jengjavilla-clickable-image img {
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.jengjavilla-clickable-image img:hover {
    opacity: 0.9;
    transform: scale(1.02);
}
