/* =========================================================
   LIGHTBOX
   Shared by the gallery and the event detail page.
   ========================================================= */

/* ---------------------------------------------------------
   LIGHTBOX
   --------------------------------------------------------- */

.gl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 40px);
}

.gl-lightbox[hidden] {
    display: none;
}

.gl-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 20, 14, 0.9);
}

.gl-lightbox-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
}

/* The image is shown whole, never cropped. */
.gl-lightbox-stage img {
    max-width: min(92vw, 1200px);
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

.gl-lightbox-stage iframe,
.gl-lightbox-stage video {
    width: min(92vw, 1100px);
    aspect-ratio: 16 / 9;
    height: auto;
    max-height: 80vh;
    border: 0;
    border-radius: 6px;
    display: block;
    background: #000;
}

.gl-lightbox-caption {
    margin: 14px 0 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

.gl-lightbox-caption:empty {
    display: none;
}

.gl-lightbox-close,
.gl-lightbox-nav {
    position: absolute;
    z-index: 2;
    position: fixed;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 16px;
    width: 48px;
    height: 48px;
    font-size: 18px;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.14);
    border: 0;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease;
    backdrop-filter: blur(4px);
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.gl-lightbox-close:hover,
.gl-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.75);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.06);
}

.gl-lightbox-close {
    top: -52px;
    right: 0;
    top: 24px;
    right: 24px;
}

.gl-lightbox-prev {
    top: 50%;
    left: -58px;
    left: 24px;
    transform: translateY(-50%);
}

.gl-lightbox-prev:hover {
    transform: translateY(-50%) scale(1.06);
}

.gl-lightbox-next {
    top: 50%;
    right: -58px;
    right: 24px;
    transform: translateY(-50%);
}

.gl-lightbox-next:hover {
    transform: translateY(-50%) scale(1.06);
}

.gl-lightbox-close:focus-visible,
.gl-lightbox-nav:focus-visible,
.gl-tile-button:focus-visible,
.gl-more-btn:focus-visible,
.gl-filter:focus-visible,
.gl-switch-item:focus-visible {
    outline: 2px solid var(--gl-accent);
    outline-offset: 2px;
}


@media (max-width: 900px) {

    /* Arrows move inside the frame once there is no room beside it. */
    .gl-lightbox-close,
    .gl-lightbox-nav {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .gl-lightbox-prev {
        left: 8px;
        left: 12px;
    }

    .gl-lightbox-next {
        right: 8px;
        right: 12px;
    }

    .gl-lightbox-close {
        top: 8px;
        right: 8px;
        top: 16px;
        right: 16px;
    }
}

