/* =========================================
   UNIFIED LIGHTBOX / ZOOM MODAL STYLES
   ========================================= */

/* Prevent page scrolling when modal is open */
body.custom-lightbox-open {
    overflow: hidden !important;
}

.custom-lightbox-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85); /* Dark semi-transparent overlay */
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(3px); /* Smooth background blur */
}

.custom-lightbox-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.custom-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

/* Smooth Scale Zoom Animation */
.custom-lightbox-backdrop.active .custom-lightbox-content {
    transform: scale(1);
    opacity: 1;
}

.custom-lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    background: #ffffff;
    display: block;
}

.custom-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #ffffff;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
    user-select: none;
}

.custom-lightbox-close:hover {
    color: #ca1d1d;
    transform: scale(1.1);
}