/* Slider container modifications */
.wcpvg-video-slide-container {
    position: relative !important;
}

/* Play button overlay */
.wcpvg-play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    z-index: 10;
    cursor: pointer;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wcpvg-play-button-overlay:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Premium styled play button */
.wcpvg-play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
}

.wcpvg-play-button-overlay:hover .wcpvg-play-icon {
    transform: scale(1.15);
    background: #ffffff;
    color: #000;
}

.wcpvg-play-icon svg {
    margin-left: 4px; /* Adjust centering since play icon triangle is offset */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Hide play button when video is playing */
.wcpvg-play-button-overlay.wcpvg-playing {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Lazy loaded player layout */
.wcpvg-player-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: #000;
    overflow: hidden;
    animation: wcpvgFadeIn 0.4s ease forwards;
}

.wcpvg-iframe-player {
    padding-bottom: 75%; /* Blocksy default WooCommerce single ratio is usually 3:4 */
}

/* Hide original image/media */
.wcpvg-hidden-media {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Thumbnail Pill Video Badge */
.wcpvg-video-pill {
    position: relative !important;
}

.wcpvg-pill-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    border: 1.5px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.wcpvg-video-pill:hover .wcpvg-pill-play-indicator {
    background: #000000;
    transform: translate(-50%, -50%) scale(1.1);
}

.wcpvg-pill-play-indicator svg {
    margin-left: 2px;
}

/* Lightbox Modal (Glassmorphism dark theme) */
.wcpvg-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-sizing: border-box;
}

.wcpvg-modal-open {
    overflow: hidden !important;
}

.wcpvg-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 9999999;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.wcpvg-modal-close:hover {
    color: #ff4a4a;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.wcpvg-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: #000000;
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.wcpvg-modal-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.wcpvg-modal-video-wrapper iframe,
.wcpvg-modal-video-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
}

/* Fade in animation */
@keyframes wcpvgFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile responsive fixes */
@media screen and (max-width: 768px) {
    .wcpvg-play-icon {
        width: 56px;
        height: 56px;
    }
    
    .wcpvg-play-icon svg {
        width: 28px;
        height: 28px;
    }

    .wcpvg-modal-close {
        top: 15px;
        right: 15px;
        font-size: 32px;
    }

    .wcpvg-modal-content {
        width: 95%;
    }
}
