/**
 * Lightbox (PhotoSwipe) Customisations
 * Minimal styling to integrate PhotoSwipe with Bootstrap 5
 */

/* Thumbnail styling for lightbox items */
.lightbox-gallery {
    cursor: pointer;
    display: block;
    position: relative;
    text-decoration: none;
}

/* Override PhotoSwipe default styles to match Bootstrap theme */
.pswp__bg {
    background: rgba(0, 0, 0, 0.95);
}

/* Top bar styling - match navbar height */
.pswp__top-bar {
    background: rgba(0, 0, 0, 0.5) !important;
    height: 50px !important;
    padding: 0 !important;
}

/* Remove individual button backgrounds */
.pswp__icn {
    top: 9px !important;
}

/* Fix cropped prev/next arrows by adjusting their SVG positioning */
.pswp__button--arrow--prev .pswp__icn {
    top: 25px !important;
    left: 5px !important;
}

/* Fix cropped prev/next arrows by adjusting their SVG positioning */
.pswp__button--arrow--next .pswp__icn {
    top: 25px !important;
    right: 10px !important;
}

/* Remove individual button backgrounds */
.pswp__button {
    background: none !important;
    border: none !important;
    outline: none !important;
    border-radius: 0;
    transition: opacity 0.2s ease;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
}

.pswp__button:hover {
    background: none !important;
    opacity: 0.7;
}

.pswp__button:focus {
    outline: none !important;
}

/* Ensure SVG icons are white */
.pswp__button svg {
    fill: white;
    color: white;
}

.pswp__icn {
    fill: white !important;
    color: white !important;
}

/* Counter styling - adjust for new top bar */
.pswp__counter {
    background: none;
    border-radius: 0;
    padding: 0;
    margin: 0 0 0 20px;
    height: 50px;
    line-height: 50px;
    font-size: 0.9rem;
    color: white;
}

/* Loading indicator */
.pswp__preloader {
    color: var(--bs-primary, #0d6efd);
}

/* Ensure proper z-index layering */
.pswp {
    z-index: 1090;
    /* Above navbar (1080), below modals (1100) */
}

/* Mobile-specific fixes */
@media (max-width: 768px) {

    /* Force top bar to show on mobile */
    .pswp__top-bar {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Force arrows to show on mobile */
    .pswp__button--arrow {
        display: flex !important;
        opacity: 0.8 !important;
        visibility: visible !important;
    }

}