/* ==========================================================================
   WooCommerce Product Video Popup – Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Floating Widget
   -------------------------------------------------------------------------- */

.wcpvp-widget {
    position: fixed;
    z-index: 999990;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        opacity 0.5s ease;
    opacity: 0;
    transform: translateY(40px);
    will-change: transform, opacity;
}

.wcpvp-widget.wcpvp-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Position Helpers */
.wcpvp-position-bottom-right {
    bottom: 24px;
    right: 24px;
}

.wcpvp-position-bottom-left {
    bottom: 24px;
    left: 24px;
}

.wcpvp-position-top-right {
    top: 24px;
    right: 24px;
}

.wcpvp-position-top-left {
    top: 24px;
    left: 24px;
}

/* Thumbnail background image */
.wcpvp-thumbnail {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: transform 0.35s ease;
}

/* Play‑icon dark overlay */
.wcpvp-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.wcpvp-play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--wcpvp-primary-color, #a46497);
    color: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, background 0.3s ease;
}

/* Hover Effects */
.wcpvp-widget:hover .wcpvp-thumbnail {
    transform: scale(1.08);
}

.wcpvp-widget:hover .wcpvp-overlay {
    background: rgba(0, 0, 0, 0.15);
}

.wcpvp-widget:hover .wcpvp-play-icon {
    transform: scale(1.12);
}

.wcpvp-widget:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.22);
}

/* --------------------------------------------------------------------------
   2. Popup Modal
   -------------------------------------------------------------------------- */

.wcpvp-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    visibility: hidden;
    opacity: 0;
    transition: background 0.35s ease,
        visibility 0s linear 0.35s,
        opacity 0.35s ease;
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
}

.wcpvp-popup-overlay.wcpvp-popup-active {
    background: rgba(0, 0, 0, 0.72);
    visibility: visible;
    opacity: 1;
    transition: background 0.35s ease,
        visibility 0s linear 0s,
        opacity 0.35s ease;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

/* Container */
.wcpvp-popup-container {
    position: relative;
    width: var(--wcpvp-popup-width, 800px);
    max-width: 94vw;
    background: #111;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transform: scale(0.85) translateY(30px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.35s ease;
}

.wcpvp-popup-active .wcpvp-popup-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Video Wrapper – maintains aspect ratio */
.wcpvp-popup-video-wrapper {
    position: relative;
    width: 100%;
    height: var(--wcpvp-popup-height, 450px);
    max-height: 80vh;
    background: #000;
}

.wcpvp-popup-video-wrapper iframe,
.wcpvp-popup-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Close Button */
.wcpvp-popup-close {
    position: absolute;
    top: -44px;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.wcpvp-popup-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.wcpvp-popup-close:focus {
    outline: 2px solid var(--wcpvp-primary-color, #a46497);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. Responsive
   -------------------------------------------------------------------------- */

/* Tablet */
@media (max-width: 768px) {
    .wcpvp-popup-container {
        max-width: 96vw;
        border-radius: 12px;
    }

    .wcpvp-popup-video-wrapper {
        height: 56vw;
        max-height: 70vh;
    }

    .wcpvp-popup-close {
        top: -40px;
        width: 36px;
        height: 36px;
    }

    .wcpvp-widget {
        bottom: 16px !important;
        right: 16px !important;
        left: auto !important;
    }

    .wcpvp-position-bottom-left {
        left: 16px !important;
        right: auto !important;
    }

    .wcpvp-position-top-right {
        top: 16px !important;
        right: 16px !important;
    }

    .wcpvp-position-top-left {
        top: 16px !important;
        left: 16px !important;
        right: auto !important;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .wcpvp-popup-container {
        max-width: 98vw;
        border-radius: 10px;
    }

    .wcpvp-popup-video-wrapper {
        height: 56vw;
        max-height: 60vh;
    }

    .wcpvp-popup-close {
        top: -38px;
        width: 32px;
        height: 32px;
    }

    .wcpvp-play-icon {
        width: 38px;
        height: 38px;
    }

    .wcpvp-play-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* --------------------------------------------------------------------------
   4. Device Visibility
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .wcpvp-hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .wcpvp-hide-desktop {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   5. Body scroll lock when popup is active
   -------------------------------------------------------------------------- */

body.wcpvp-scroll-locked {
    overflow: hidden !important;
}


/* Live Video Preview */
/* ===============================
   Live Preview
==================================*/

.wcpvp-live-preview {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
}

.wcpvp-preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===============================
   Common Button Style
==================================*/

.wcpvp-volume-toggle,
.wcpvp-popup-btn {

    position: absolute;
    width: 40px;
    height: 40px;

    border: none;
    border-radius: 50%;

    background: rgba(0, 0, 0, .55);

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    z-index: 100;
}

.wcpvp-volume-toggle .dashicons,
.wcpvp-popup-btn .dashicons {

    color: #fff;
    font-size: 20px;
    width: 20px;
    height: 20px;

}

.wcpvp-volume-toggle:hover,
.wcpvp-popup-btn:hover {

    background: rgba(0, 0, 0, .82);

    transform: scale(1.08);

}

/* ===============================
   Mute Button
==================================*/

.wcpvp-volume-toggle {

    top: 10px;
    right: 10px;

}

/* ===============================
   Expand Button
==================================*/

.wcpvp-popup-btn {

    bottom: 10px;
    right: 10px;

}

/* ===============================
   Icons
==================================*/

.wcpvp-volume-toggle svg,
.wcpvp-popup-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.wcpvp-volume-toggle svg *,
.wcpvp-popup-btn svg * {
    stroke: #fff;
    fill: none;
}

/* ===============================
   Speaker Slash Animation
==================================*/

.wcpvp-volume-toggle .slash {

    opacity: 1;
    transition: .25s;

}

.wcpvp-volume-toggle.unmuted .slash {

    opacity: 0;

}

.wcpvp-volume-toggle.muted .slash {

    opacity: 1;

}



/* ===============================
   Floating Widget
==================================*/

.wcpvp-widget {

    box-shadow: 0 10px 35px rgba(0, 0, 0, .28);

    overflow: hidden;

}

/* ===============================
   Popup Button
==================================*/

.wcpvp-popup-btn svg {

    transition: .25s;

}

.wcpvp-popup-btn:hover svg {

    transform: scale(1.15);

}

.wcpvp-widget {

    border-radius: 16px;

    overflow: hidden;

    background: #000;

}

.wcpvp-widget {

    transition: .3s ease;

}

.wcpvp-widget:hover {

    transform: translateY(-5px);

}