/* Lightbox allgemein */

.vt-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: block;
    pointer-events: none;
    --vt-lightbox-reserved-height: 18rem;
    --vt-lightbox-safe-space: 0;
}

.vt-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0%);
    transition: background 0.25s ease;
}

.vt-lightbox__dialog {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    overflow: hidden;
    margin: 0;
    border-radius: 0;
    opacity: 0;
    transform: scale(0.96);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.vt-lightbox.is-open {
    display: block;
    pointer-events: auto;
}

.vt-lightbox.is-open .vt-lightbox__backdrop {
    background: rgb(0 115 191 / 100%);
}

.vt-lightbox.is-open .vt-lightbox__dialog {
    opacity: 1;
    transform: scale(1);
}

.vt-lightbox__top,
.vt-lightbox__bottom {
    flex-shrink: 0;
}

.vt-lightbox__top {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: #fff;
}

.vt-lightbox__headline {
    margin: 0;
    font-family: 'CabinetGrotesk-Variable', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    line-height: 1.1;
    color: var(--vt-color-primary);
}

.vt-lightbox__close {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--vt-color-accent);
    cursor: pointer;
}

.vt-lightbox__close-text {
    display: inline-block;
    font-weight: 600;
}

.vt-lightbox__close-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    color: var(--vt-color-surface);
    background-color: var(--vt-color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    line-height: 1;
    transition: transform 0.3s cubic-bezier(.4, 0, .2, 1);
}

.vt-lightbox__close:hover .vt-lightbox__close-icon {
    transform: scale(1.1) rotate(90deg);
}

.vt-lightbox__close:active .vt-lightbox__close-icon {
    transform: scale(0.9);
}

.vt-lightbox__close:focus-visible,
.vt-lightbox__nav:focus-visible,
.vt-lightbox__thumbnail:focus-visible {
    outline: 2px solid var(--vt-color-primary);
    outline-offset: 4px;
}

.vt-lightbox__figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.vt-lightbox__gallery-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 1 1 auto;
    min-height: 0;

    overflow: hidden;
    padding: 0 1.5rem;
    gap: 1rem;
}

.vt-lightbox__image-wrap {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vt-lightbox__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100dvh - var(--vt-lightbox-reserved-height));
    object-fit: contain;
}

.vt-lightbox__nav {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    z-index: 3;
    transition: color 0.2s ease;
}

.vt-lightbox__nav svg {
    display: block;
    width: 2.3125rem;
    height: auto;
}

.vt-lightbox__nav svg path {
    fill: currentColor;
    transition: fill 0.2s ease;
}

.vt-lightbox__nav:hover,
.vt-lightbox__nav:focus-visible {
    color: var(--vt-color-accent);
}

.vt-lightbox__nav[disabled],
.vt-lightbox__nav.is-disabled {
    opacity: 0;
    pointer-events: none;
}

.vt-lightbox__bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem;
    background: #fff;
}

.vt-lightbox__caption {
    margin: 0;
    font-family: 'CabinetGrotesk-Variable', sans-serif;
    font-weight: 800;
    line-height: 1.1;
    color: var(--vt-color-primary);
    font-size: 1.66rem;
}

.vt-lightbox__credit {
    margin: 0;
    color: var(--vt-color-text);
    font-size: 1rem;
}

.vt-lightbox__thumbnails {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 1.5rem 1.5rem;
    flex: 0 0 auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-x;
}

.vt-lightbox__thumbnails.is-pointer-down,
.vt-lightbox__thumbnails.is-dragging {
    cursor: grabbing;
}

.vt-lightbox__thumbnails.is-dragging {
    scroll-behavior: auto;
}

.vt-lightbox__thumbnail {
    position: relative;
    flex: 0 0 auto;
    width: 140px;
    height: 100px;
    border: 0;
    padding: 0;
    margin: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.vt-lightbox__thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.vt-lightbox__thumbnail::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-radius: 0.75rem;
    pointer-events: none;
    transition: border-color 0.2s ease;
}

.vt-lightbox__thumbnail.is-active::after {
    border-color: var(--vt-color-accent);
}

@media (max-width: 991.98px) {
    .vt-lightbox__bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .vt-lightbox__close-text {
        display: none;
    }

    .vt-lightbox__caption,
    .vt-lightbox__headline,
    .vt-lightbox__credit {
        font-size: clamp(18px, 2vw, 36px);
    }

    .vt-lightbox__close-icon {
        width: 22px;
        height: 22px;
        font-size: 1.25rem;
    }
}

@media (max-width: 767.98px) {
    .vt-lightbox__gallery-stage {
        padding: 0;
        gap: 0;
    }

    .vt-lightbox__nav {
        position: absolute;
        top: 50%;
        width: 3rem;
        height: 3rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transform: translateY(-50%);
        border-radius: 999px;
        color: var(--vt-color-primary);
    }

    .vt-lightbox__nav--prev {
        left: 0.75rem;
    }

    .vt-lightbox__nav--next {
        right: 0.75rem;
    }

    .vt-lightbox__nav svg {
        width: 1.25rem;
    }

    .vt-lightbox__thumbnail {
        width: 110px;
        height: 78px;
    }
}
