/* ═══════════════════════════════════════════════════
   SYNC2SYS — Image lightbox
   Click any screenshot to open it full size
   ═══════════════════════════════════════════════════ */

.js-zoomable {
    cursor: zoom-in;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: rgba(6, 8, 7, 0.96);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox__figure {
    margin: 0;
    max-width: 1400px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md, 1rem);
    transform: scale(0.97);
    transition: transform 0.22s ease;
}

.lightbox.is-open .lightbox__figure {
    transform: scale(1);
}

.lightbox__img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 9rem);
    width: auto;
    height: auto;
    border-radius: 14px;
    border: 1px solid rgba(140, 220, 190, 0.14);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.lightbox__caption {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    max-width: 60ch;
}

.lightbox__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.lightbox__close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.lightbox__close svg {
    width: 20px;
    height: 20px;
}

body.lightbox-open {
    overflow: hidden;
}

/* The fixed nav would otherwise sit on top of the enlarged image */
body.lightbox-open .nav {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

@media (max-width: 640px) {
    .lightbox {
        padding: 4.5rem 0.75rem 1.5rem;
    }

    .lightbox__img {
        max-height: calc(100vh - 11rem);
        border-radius: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .lightbox,
    .lightbox__figure {
        transition: none;
    }
}
