/**
 * WooCommerce Product Gallery Video - Modal Styles
 */

/* Video thumbnail styling */
.wcpvg-video-thumb {
    border: 3px solid #4a90e2 !important;
    cursor: pointer !important;
    transition: border-color 0.3s ease;
}

.wcpvg-video-thumb:hover {
    border-color: #2a70c2 !important;
}

/* Play icon on thumbnails */
.wcpvg-video-play-icon {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 28px !important;
    color: #fff !important;
    background: rgba(0, 0, 0, 0.7) !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    pointer-events: none !important;
    z-index: 999 !important;
    line-height: 1 !important;
}

/* Ensure parent containers are positioned */
.flex-control-thumbs li,
.woocommerce-product-gallery__image {
    position: relative !important;
}

/* Hover effect */
.flex-control-thumbs li:hover .wcpvg-video-play-icon,
.woocommerce-product-gallery__image:hover .wcpvg-video-play-icon,
.wcpvg-has-video:hover .wcpvg-video-play-icon {
    background: rgba(0, 0, 0, 0.9) !important;
    transform: translate(-50%, -50%) scale(1.1) !important;
}

/* Modal/Popup Styles */
.wcpvg-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wcpvg-fade-in 0.3s ease;
}

@keyframes wcpvg-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wcpvg-modal-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background: #000;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: wcpvg-slide-up 0.3s ease;
}

@keyframes wcpvg-slide-up {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wcpvg-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.wcpvg-modal-close:hover {
    background: #f44336;
    color: #fff;
    transform: rotate(90deg);
}

.wcpvg-modal-content {
    width: 100%;
    max-width: 100%;
}

.wcpvg-modal-content video,
.wcpvg-modal-content iframe {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 400px;
    border-radius: 4px;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .wcpvg-modal-container {
        width: 95%;
        padding: 15px;
    }
    
    .wcpvg-modal-content video,
    .wcpvg-modal-content iframe {
        min-height: 300px;
    }
    
    .wcpvg-modal-close {
        top: -10px;
        right: -10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}
