/* Custom Lightbox Styles - Tailwind & Apple Inspired Luxury UI */

.wfp-gallery-container {
    padding: 0px;
}

.wfp-gallery-item {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
}

.wfp-gallery-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    pointer-events: auto;
}

.wfp-gallery-item:hover img {
    transform: scale(1.03);
}

/* Lightbox Wrapper */
#wfp-customLightbox {
    display: flex;
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    overflow: hidden;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity;
}

#wfp-customLightbox.wfp-show {
    opacity: 1;
    visibility: visible;
}

/* Image Container */
#wfp-lightboxImageContainer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

#wfp-lightboxImageContainer.wfp-draggable {
    cursor: grab;
}

#wfp-lightboxImageContainer.wfp-draggable:active {
    cursor: grabbing;
}

#wfp-lightboxImage {
    max-width: 90%;
    max-height: 85%;
    width: auto;
    height: auto;
    transform-origin: center;
    position: relative;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.1s ease, opacity 0.25s ease;
    user-select: none;
    pointer-events: auto;
    opacity: 0;
    will-change: transform, opacity;
}

#wfp-lightboxImage.wfp-loaded {
    opacity: 1;
}

/* Controls Base (Apple Glassmorphism Style) */
.wfp-lightbox-controls,
.wfp-zoom-button,
#wfp-closeButton {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.wfp-lightbox-controls:hover,
.wfp-zoom-button:hover,
#wfp-closeButton:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Navigation Buttons */
.wfp-lightbox-controls {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 100000;
    width: 48px;
    height: 48px;
    border-radius: 9999px;
}

#wfp-prevButton {
    left: 24px;
}

#wfp-nextButton {
    right: 24px;
}

/* Close Button */
#wfp-closeButton {
    position: fixed;
    top: 24px;
    right: 24px;
    cursor: pointer;
    z-index: 100000;
    width: 42px;
    height: 42px;
    border-radius: 9999px;
}

/* Zoom Controls Box */
.wfp-zoom-controls {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100000;
    display: flex;
    gap: 8px;
}

.wfp-zoom-button {
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

/* Zoom Level Tag */
#wfp-zoomLevel {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: none;
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 100000;
}

/* Icons inside buttons */
.wfp-lightbox-controls i,
.wfp-zoom-button i,
#wfp-closeButton i {
    font-size: 20px;
    line-height: 1;
    margin: 0;
    padding: 0;
}

/* Mobile Responsive Optimization */
@media (max-width: 768px) {
    #wfp-lightboxImage {
        max-width: 95%;
        max-height: 75%;
        border-radius: 1rem;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    }

    /* Slightly smaller controls shifted to the edges on mobile to prevent overlapping */
    .wfp-lightbox-controls {
        width: 38px;
        height: 38px;
    }

    #wfp-prevButton {
        left: 10px;
    }

    #wfp-nextButton {
        right: 10px;
    }

    #wfp-closeButton {
        top: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
    }

    .wfp-zoom-controls {
        right: 16px;
        bottom: 16px;
    }

    .wfp-zoom-button {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    #wfp-zoomLevel {
        bottom: 70px;
        right: 16px;
    }

    .wfp-lightbox-controls i,
    .wfp-zoom-button i,
    #wfp-closeButton i {
        font-size: 16px;
    }
}

/* Lightbox Video Container Styles */
#wfp-lightboxVideoContainer {
    display: none;
    width: 90%;
    max-width: 960px;
    aspect-ratio: 16/9;
    position: relative;
    z-index: 100;
}

#wfp-lightboxVideo {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    background-color: #000;
}
