/* =============================================================
   GALLERY VIEWER
   ============================================================= */

.gallery-viewer {
    position: fixed;
    inset: 0;
    z-index: 9999;

    width: 100vw;
    height: 100vh;
    height: 100dvh;

    background: rgba(0, 0, 0, .96);

    display: none;
    align-items: center;
    justify-content: center;
}

.gallery-viewer.is-active {
    display: flex;
}

/* =============================================================
   INNER LAYOUT
   ============================================================= */

.gallery-viewer-inner {
    position: relative;

    width: 100vw;
    height: 100vh;
    height: 100dvh;

    display: block;
}

/* =============================================================
   IMAGE STAGE
   ============================================================= */

.gallery-viewer-stage {
    width: 100vw;
    height: 100vh;
    height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
    padding: 0;
}

.gallery-viewer-stage img {
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;

    object-fit: contain;
    display: block;
}

.gallery-viewer-stage img {
    transition: transform .25s ease;
    cursor: zoom-in;
}

.gallery-viewer.is-zoomed .gallery-viewer-stage img {
    transform: scale(2);
    cursor: zoom-out;
}

/* =============================================================
   CONTROLS
   ============================================================= */

.gallery-viewer-close,
.gallery-viewer-prev,
.gallery-viewer-next {
    position: fixed;
    z-index: 10001;

    border: 0;
    color: rgba(255,255,255,.92);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;

    line-height: 1;
    text-align: center;

    transition:
        background .2s ease,
        opacity .2s ease;
}

.gallery-viewer-close:hover,
.gallery-viewer-prev:hover,
.gallery-viewer-next:hover {
    background: rgba(0, 0, 0, .65);
}

/* CLOSE */

.gallery-viewer-close {
    top: 18px;
    right: 18px;

    width: 35px;
    height: 35px;

    border-radius: 6px;

    font-size: 25px;
    font-weight: 200;

    padding: 0 0 1.5px 0;
}

/* PREV / NEXT */

.gallery-viewer-prev,
.gallery-viewer-next {
    width: 35px;
    height: 45px;

    border-radius: 6px;


    font-size: 30px;
    font-weight: 200;

    padding: 0 0 1px 0;
}

.gallery-viewer-prev,
.gallery-viewer-next,
.gallery-viewer-close {

    background: rgba(0, 0, 0, 0.20);

    color: rgba(255,255,255,1);

}

.gallery-viewer-prev {
    left: 18px;
}

.gallery-viewer-next {
    right: 18px;
}

/* =============================================================
   INFO UNTEN ALS OVERLAY
   ============================================================= */

.gallery-viewer-footer {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 10000;

    color: #fff;

    padding: 14px 22px 18px;

    background: linear-gradient(
        to top,
        rgba(0,0,0,.72),
        transparent
    );
}

.gallery-viewer-info {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 14px;

    flex-wrap: nowrap;

    text-align: center;
}

.gallery-viewer-title {
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
}

.gallery-viewer-meta,
.gallery-viewer-counter {
    font-size: .9em;
    color: #ccc;
}

/* =============================================================
   MOBILE
   ============================================================= */

@media (max-width: 700px) {

    .gallery-viewer-close {
        top: 12px;
        right: 12px;

        width: 40px;
        height: 40px;

        font-size: 26px;
    }

    .gallery-viewer-prev,
    .gallery-viewer-next {
        width: 44px;
        height: 44px;

        font-size: 28px;
    }

    .gallery-viewer-prev {
        left: 8px;
    }

    .gallery-viewer-next {
        right: 8px;
    }

    .gallery-viewer-footer {
        padding: 12px 16px 14px;
    }

    .gallery-viewer-info {
        flex-direction: column;
        gap: 3px;
    }

    .gallery-viewer-title,
    .gallery-viewer-meta,
    .gallery-viewer-counter {
        font-size: .85em;
    }
	
	@media (max-width: 900px) and (orientation: landscape) {

    .gallery-viewer-prev {
        left: 24px;
    }

    .gallery-viewer-next {
        right: 24px;
    }

    .gallery-viewer-close {
        right: 24px;
    }
}

	@media (max-width: 700px) {

    .gallery-viewer-close,
    .gallery-viewer-prev,
    .gallery-viewer-next {
        background: rgba(0, 0, 0, 0.04);
        color: rgba(255,255,255,.95);
    }

    .gallery-viewer-close:hover,
    .gallery-viewer-prev:hover,
    .gallery-viewer-next:hover {
        background: rgba(0, 0, 0, 0.12);
    }
}
}