/* Video Gallery for WooCommerce - Frontend styles */

/* ------------------------------------------------------------------ *
 * Play-icon overlay on video slides
 * ------------------------------------------------------------------ */
.vgfw-video-slide {
    position: relative;
}

.vgfw-video-slide .vgfw-video-link {
    display: block;
    position: relative;
}

.vgfw-video-slide .vgfw-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--vgfw-icon-size, 60px);
    height: var(--vgfw-icon-size, 60px);
    background: var(--vgfw-icon-bg, rgba(0, 0, 0, .6));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: transform .2s ease, background .2s ease;
    z-index: 2;
}

.vgfw-video-slide:hover .vgfw-play-icon {
    transform: translate(-50%, -50%) scale(1.08);
}

.vgfw-video-slide .vgfw-play-icon svg,
.vgfw-video-slide .vgfw-play-icon img {
    width: 60%;
    height: 60%;
    display: block;
}

.vgfw-video-slide .vgfw-play-icon svg path,
.vgfw-video-slide .vgfw-play-icon svg circle,
.vgfw-video-slide .vgfw-play-icon svg rect {
    fill: var(--vgfw-icon-color, #ffffff);
}

/* Small thumbnail below the main gallery: show a tiny play indicator */
.flex-control-thumbs li .vgfw-video-thumb,
.flex-control-thumbs li img[src*=""].vgfw-video-thumb {
    position: relative;
}

/* ------------------------------------------------------------------ *
 * Inline player (replaces the slide contents while playing)
 * ------------------------------------------------------------------ */
.vgfw-video-slide.is-playing .vgfw-play-icon,
.vgfw-video-slide.is-playing .vgfw-video-thumb {
    display: none;
}

.vgfw-video-slide .vgfw-video-player {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

/* ------------------------------------------------------------------ *
 * Lightbox
 * ------------------------------------------------------------------ */
.vgfw-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 24px;
}

.vgfw-lightbox.is-open {
    display: flex;
}

.vgfw-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 0;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background .15s ease;
}

.vgfw-lightbox-close:hover {
    background: rgba(255, 255, 255, .25);
}

.vgfw-lightbox-inner {
    width: 100%;
    max-width: 1100px;
    max-height: calc(100vh - 96px);
}

.vgfw-lightbox-inner video {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 96px);
    display: block;
    background: #000;
}

body.vgfw-lightbox-open {
    overflow: hidden;
}

/* ------------------------------------------------------------------ *
 * Keep flexslider thumbs visually consistent for video slides
 * ------------------------------------------------------------------ */
.flex-control-thumbs li {
    position: relative;
}

.woocommerce-product-gallery .vgfw-video-slide img {
    display: block;
    max-width: 100%;
    height: auto;
}
