/* ============================================================
 * Gallery Lightbox
 * ============================================================ */

html.zm-lightbox-open,
html.zm-lightbox-open body {
    overflow: hidden;
}

.zm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
    /* Padding zodat de pijltjes ruimte krijgen aan de zijkant */
    padding: 24px clamp(48px, 7vw, 96px) 100px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.zm-lightbox.is-open {
    display: block;
    opacity: 1;
}

/* ----------------------------------------------------------
 * Stage (afbeelding + caption)
 * ---------------------------------------------------------- */
.zm-lightbox__stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.zm-lightbox__image {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    cursor: zoom-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: #111;
}

.zm-lightbox__caption {
    max-width: min(900px, 90%);
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.zm-lightbox__caption:empty {
    display: none;
}

/* ----------------------------------------------------------
 * Buttons (close + arrows)
 * ---------------------------------------------------------- */
.zm-lightbox__close,
.zm-lightbox__arrow {
    position: absolute;
    background: rgba(255, 255, 255, 0.33);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s ease, transform 0.15s ease;
    padding: 0;
    line-height: 1;
}
.zm-lightbox span{
	margin-bottom: 0;
}
.zm-lightbox__close:hover,
.zm-lightbox__arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}
.zm-lightbox__close:hover span,
.zm-lightbox__arrow:hover span{
	color: rgba(255, 255, 255, 0.8);;
}
.zm-lightbox__close:focus-visible,
.zm-lightbox__arrow:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Close (X) — rechtsboven */
.zm-lightbox__close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 28px;
    z-index: 2;
}

/* Pijltjes — verticaal gecentreerd in de zij-padding */
.zm-lightbox__arrow {
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    font-size: 40px;
    z-index: 2;
}

.zm-lightbox__arrow:hover {
    transform: translateY(-50%) scale(1.05);
}

.zm-lightbox__arrow--prev { left: clamp(8px, 1.5vw, 24px); }
.zm-lightbox__arrow--next { right: clamp(8px, 1.5vw, 24px); }

/* ----------------------------------------------------------
 * Dots
 * ---------------------------------------------------------- */
.zm-lightbox__dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 90%;
    z-index: 2;
}

.zm-lightbox__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease, width 0.18s ease, height 0.18s ease;
    flex-shrink: 0;
}

.zm-lightbox__dot.is-hidden {
    display: none;
}

.zm-lightbox__dot.is-visible {
    opacity: 0.65;
}

/* "Meer opacity" = transparanter, dus duidelijk gefadede preview-dots */
.zm-lightbox__dot.is-faded {
    opacity: 0.25;
    transform: scale(0.7);
}

.zm-lightbox__dot.is-active {
    opacity: 1;
    background: #fff;
    transform: scale(1.25);
}

.zm-lightbox__dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* ----------------------------------------------------------
 * Mobiel
 * ---------------------------------------------------------- */
@media (max-width: 600px) {
    .zm-lightbox {
        padding: 16px 12px 84px;
    }

    .zm-lightbox__arrow {
        width: 44px;
        height: 44px;
        font-size: 32px;
        background: rgba(255, 255, 255, 0.15);
    }

    .zm-lightbox__arrow--prev { left: 6px; }
    .zm-lightbox__arrow--next { right: 6px; }

    .zm-lightbox__close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .zm-lightbox__image {
        max-height: calc(100vh - 170px);
    }

    .zm-lightbox__dots {
        bottom: 18px;
        gap: 6px;
    }

    .zm-lightbox__dot {
        width: 8px;
        height: 8px;
    }
}

/* ----------------------------------------------------------
 * Hint dat afbeeldingen klikbaar zijn
 * ---------------------------------------------------------- */
.gallery-wrapper.lightbox .gallery-item--image.has-lightbox {
    cursor: zoom-in;
}
