/* Photo lightbox — shared component */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
    box-sizing: border-box;
    animation: lbFadeIn 0.18s ease-out;
}
.lightbox-overlay.active { display: flex; }

@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-img-wrap {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 8rem);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    background: #111;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-caption {
    color: #fff;
    font-size: 0.95rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    backdrop-filter: blur(6px);
}

.lightbox-counter {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.45);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    backdrop-filter: blur(6px);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    transition: background 0.15s;
    z-index: 2;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }
.lightbox-nav:disabled { opacity: 0.3; cursor: not-allowed; }

@media (max-width: 600px) {
    .lightbox-overlay { padding: 0.5rem; }
    .lightbox-nav { width: 40px; height: 40px; font-size: 1.3rem; }
    .lightbox-nav.prev { left: 0.4rem; }
    .lightbox-nav.next { right: 0.4rem; }
    .lightbox-close { width: 40px; height: 40px; top: 0.4rem; right: 0.4rem; }
    .lightbox-counter { top: 0.5rem; left: 0.5rem; font-size: 0.75rem; }
    .lightbox-img { max-height: calc(100vh - 6rem); }
}

@media (prefers-reduced-motion: reduce) {
    .lightbox-overlay { animation: none; }
}

img[data-lightbox] { cursor: zoom-in; }
