/* Full-screen image gallery opened from a pin's pictures. */

.image-preview--view {
    cursor: pointer;
}

.image-gallery {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0e0ce6;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    z-index: 50;
    padding: 0 64px;
    box-sizing: border-box;
    touch-action: pan-y;
}

.image-gallery.is-open {
    opacity: 1;
    pointer-events: auto;
}

.image-gallery-img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 82vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    object-fit: contain;
    pointer-events: none;
}

.image-gallery-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #ffffff1f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-gallery-close:hover {
    background: #ffffff38;
}

.image-gallery-close svg {
    width: 18px;
    height: 18px;
}

.image-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: #ffffff1f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-gallery-nav:hover {
    background: #ffffff38;
}

.image-gallery-nav svg {
    width: 22px;
    height: 22px;
}

.image-gallery-prev {
    left: 10px;
}

.image-gallery-next {
    right: 10px;
}

.image-gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%);
    z-index: 2;
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    background: #ffffff1f;
    padding: 4px 12px;
    border-radius: 999px;
}

@media (max-width: 600px) {
    .image-gallery {
        padding: 0 52px;
    }

    .image-gallery-nav {
        width: 40px;
        height: 40px;
    }

    .image-gallery-nav svg {
        width: 18px;
        height: 18px;
    }

    .image-gallery-prev {
        left: 6px;
    }

    .image-gallery-next {
        right: 6px;
    }
}
