/**
 * WooCommerce Video Product Gallery - Frontend Styles
 */

/* Video slide container */
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .yt-video-slide {
    position: relative !important;
    overflow: hidden !important;
    background: #000000 !important;
    border-radius: 8px;
    box-sizing: border-box;
}

.yt-gallery-slide-card {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050505;
    overflow: hidden;
}

@media (max-width: 768px) {
    .yt-gallery-slide-card {
        min-height: 280px;
    }
}

/* Poster view with Play button */
.yt-gallery-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    user-select: none;
    -webkit-user-select: none;
    z-index: 2;
}

.yt-gallery-poster-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.yt-gallery-poster:hover .yt-gallery-poster-img {
    transform: scale(1.02);
}

.yt-gallery-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    z-index: 5;
    cursor: pointer;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6));
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.25s ease;
}

.yt-gallery-poster:hover .yt-gallery-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
    filter: drop-shadow(0 8px 20px rgba(255, 0, 0, 0.5));
}

.yt-gallery-play-btn svg path.yt-play-bg {
    fill: #ff0000;
    transition: fill 0.2s ease;
}

.yt-gallery-poster:hover .yt-gallery-play-btn svg path.yt-play-bg {
    fill: #cc0000;
}

/* Player Wrap & Embed */
.yt-gallery-player-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10;
}

.yt-gallery-iframe-holder {
    width: 100%;
    height: 100%;
}

.yt-gallery-iframe-holder iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Close Button */
.yt-gallery-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: background-color 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.yt-gallery-close-btn:hover {
    background: rgba(220, 38, 38, 0.95);
    border-color: #ff0000;
    transform: scale(1.1);
}

/* Thumbnail Strip Overlay Badge */
.flex-control-thumbs li.yt-video-nav-thumb {
    position: relative !important;
    cursor: pointer;
}

.flex-control-thumbs li.yt-video-nav-thumb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background-color: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-size: 12px 12px;
    background-repeat: no-repeat;
    background-position: center center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
    z-index: 3;
}

.flex-control-thumbs li.yt-video-nav-thumb:hover::after,
.flex-control-thumbs li.yt-video-nav-thumb.flex-active::after {
    transform: translate(-50%, -50%) scale(1.15);
    background-color: #ff0000;
}
