/* Блок з відео (вертикальна галерея) */
.yt-product-videos {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.yt-product-video-items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: calc(80px * 3 + 10px * 2);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.yt-product-video-items-wrapper::-webkit-scrollbar {
    display: none;
}

.yt-product-video-items-wrapper--auto {
    height: auto;
    overflow: visible;
}

.yt-product-video-item {
    flex: 0 0 80px;
    position: relative;
    width: 80px;
    height: 80px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.yt-product-video-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yt-product-video-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.25);
}

.yt-product-video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 24px;
    background: #ff0000;
    border-radius: 6px;
}

.yt-product-video-play::after {
    content: "";
    position: absolute;
    left: 13px;
    top: 6px;
    border-style: solid;
    border-width: 6px 0 6px 10px;
    border-color: transparent transparent transparent #fff;
}

/* Ширина відео в поп-апі */
.fancybox-slide--iframe .fancybox-content {
    width: min(1000px, 100vw) !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
    overflow: hidden;
}

/* (!) Протестувати підтримку псевдо-класу :has у Safari */
/*
.fancybox-slide--iframe .fancybox-content:has(iframe[src*="youtube"]) {
    width: min(1000px, 100vw) !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
}
*/

/* Стрілки */
.yt-product-video-nav {
    width: 80px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

.yt-product-video-nav.disabled {
    opacity: .35;
    cursor: default;
    pointer-events: none;
}

/* Ефекти при наведенні */
.yt-product-video-item:hover, .yt-product-video-nav:hover {
    border-color: var(--yt-accent-color);
}