.image-viewer-overlay {
    --navbar-height: 60px;
    display: none;
    position: fixed;
    top: var(--navbar-height); /* высота навбара */
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.image-viewer-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-viewer-media img,
.image-viewer-media video,
.image-viewer-media iframe {
    max-width: 90%;
    max-height: calc(100vh - var(--navbar-height) - 40px);
    object-fit: contain;
    transition: transform 0.2s;
}

.image-viewer-media {
    overflow: hidden;
}

.image-viewer-media.grabbable img {
    cursor: grab;
}

.image-viewer-media.dragging img {
    cursor: grabbing;
}

.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
}

.image-viewer-nav-buttons {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.image-viewer-prev,
.image-viewer-next {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.image-viewer-prev:hover,
.image-viewer-next:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.image-viewer-zoom {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1001;
}

.image-viewer-zoom input[type=range] {
    width: 200px;
}

@media (max-width: 768px) {
    .image-viewer-prev,
    .image-viewer-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}
