#iv2-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: 9990;
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 390px;
    background: #000;
    transform: translateX(-50%);
}

#iv2-overlay.is-open {
    display: flex;
}

.iv2-header {
    position: absolute;
    top: env(safe-area-inset-top);
    right: 0;
    left: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    padding: 0 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, .4) 0%, transparent 100%);
}

.iv2-close,
.iv2-download,
.iv2-share {
    display: flex;
    align-items: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.iv2-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.iv2-stage {
    width: 100%;
    height: 100%;
    touch-action: none;
}

.iv2-stage .swiper-wrapper {
    height: 100%;
}

.iv2-stage .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.iv2-stage .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.iv2-footer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-bottom: 27px;
    background: linear-gradient(0deg, rgba(0, 0, 0, .4) 0%, transparent 100%);
}

.iv2-footer.hidden {
    display: none;
}

.iv2-thumbs {
    display: flex;
    gap: 5px;
    padding: 0 calc(50% - 25px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    touch-action: pan-x;
}

.iv2-thumbs::-webkit-scrollbar {
    display: none;
}

.iv2-thumb {
    position: relative;
    flex-shrink: 0;
    width: 50px;
    height: 80px;
    padding: 0;
    border: none;
    border-radius: 5px;
    background: none;
    overflow: hidden;
    scroll-snap-align: center;
    cursor: pointer;
}

.iv2-thumb.is-active::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid var(--primary3-color);
    border-radius: 5px;
}

.iv2-thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.iv2-counter {
    color: var(--white-color);
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}
