/* ── Simple Gallery – Lightbox styles ─────────────────────────────────── */

/* Overlay */
#sg-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .88);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

#sg-lightbox.active {
    display: flex;
}

/* Image wrapper */
#sg-lightbox-img-wrap {
    position: relative;
    max-width: min(90vw, 1200px);
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sg-lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
    user-select: none;
}

/* Caption */
#sg-lightbox-caption {
    color: #ccc;
    font-size: .85rem;
    margin-top: 10px;
    text-align: center;
    max-width: 90vw;
    word-break: break-all;
}

/* Close button */
#sg-lightbox-close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    z-index: 100000;
    transition: color .15s;
}
#sg-lightbox-close:hover { color: #f66; }

/* Prev / Next */
#sg-lightbox-prev,
#sg-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.1);
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1.4rem;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 100000;
}
#sg-lightbox-prev { left: 16px; }
#sg-lightbox-next { right: 16px; }
#sg-lightbox-prev:hover,
#sg-lightbox-next:hover { background: rgba(255,255,255,.25); }

/* Counter */
#sg-lightbox-counter {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.6);
    font-size: .8rem;
    z-index: 100000;
}

/* Loading spinner */
#sg-lightbox.loading #sg-lightbox-img {
    opacity: 0;
}

@media (max-width: 500px) {
    #sg-lightbox-prev { left: 4px; }
    #sg-lightbox-next { right: 4px; }
}
