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

/* Responsive Video Container (16:9 Standard) */
.wpgv-video-slide {
    width: 100% !important;
}

.wpgv-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #090d16;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wpgv-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
}

.wpgv-html5-player {
    object-fit: contain;
    background: #000;
}

/* Flexslider / WooCommerce Gallery Thumbnail Play Badge */
.woocommerce-product-gallery .flex-control-thumbs li {
    position: relative;
}

.woocommerce-product-gallery .flex-control-thumbs li.wpgv-video-thumb {
    position: relative;
}

.woocommerce-product-gallery .flex-control-thumbs li.wpgv-video-thumb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    background-color: rgba(15, 23, 42, 0.75);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 55% center;
    background-size: 13px 13px;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    transition: transform 0.2s ease, background-color 0.2s ease;
    z-index: 5;
}

.woocommerce-product-gallery .flex-control-thumbs li.wpgv-video-thumb:hover::after,
.woocommerce-product-gallery .flex-control-thumbs li.wpgv-video-thumb .flex-active::after {
    background-color: #2563eb;
    transform: translate(-50%, -50%) scale(1.12);
}

/* Custom Gallery & Zocco Theme Adapter Styles */
.wpgv-custom-thumb {
    position: relative;
    cursor: pointer;
}

.wpgv-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background-color: rgba(15, 23, 42, 0.85);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 55% center;
    background-size: 14px 14px;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    transition: transform 0.2s ease, background-color 0.2s ease;
    z-index: 10;
}

.wpgv-custom-thumb:hover .wpgv-play-badge,
.wpgv-custom-thumb.active-video .wpgv-play-badge {
    background-color: #2563eb;
    transform: translate(-50%, -50%) scale(1.15);
}

.wpgv-custom-video-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    background: #000;
    border-radius: inherit;
    overflow: hidden;
}

.wpgv-custom-video-wrapper iframe,
.wpgv-custom-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
    object-fit: contain;
}
