/* ══════════════════════════════════
   SHARED IMAGE LIGHTBOX
   Works on any page that includes lightbox.js
══════════════════════════════════ */

/* Zoom cursor hint on eligible images */
.lb-zoomable { cursor: zoom-in !important; }

/* ── Overlay ── */
#lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.93);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}
#lb-overlay.lb-open {
    opacity: 1;
    pointer-events: all;
}

/* ── Main image ── */
#lb-img {
    max-width: 88vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.5);
    user-select: none;
    -webkit-user-drag: none;
    display: block;
}

/* ── Shared button base ── */
.lb-btn {
    position: fixed;
    background: rgba(255, 255, 255, 0.14);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.28); }

/* Close */
#lb-close {
    top: 14px; right: 16px;
    width: 42px; height: 42px;
    font-size: 1.3rem;
}

/* Prev / Next */
#lb-prev, #lb-next {
    top: 50%;
    transform: translateY(-50%);
    width: 50px; height: 50px;
    font-size: 2rem;
    padding-bottom: 3px;
}
#lb-prev { left: 10px; }
#lb-next { right: 10px; }
#lb-prev:disabled,
#lb-next:disabled { opacity: 0.22; cursor: default; pointer-events: none; }

/* Caption */
#lb-caption {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.82rem;
    max-width: 80vw;
    text-align: center;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Counter "2 / 12" */
#lb-counter {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.78rem;
    pointer-events: none;
}

/* ── Mobile: hide prev/next when only 1 image ── */
@media (max-width: 480px) {
    #lb-prev, #lb-next { width: 40px; height: 40px; font-size: 1.6rem; }
}
