/* Body-level host. Stays invisible (no background/shadow/clip) so the FLIP
   animation can transform the slide outside the host's bounds without being
   clipped. Visual styling lives on the slide-in-host instead. The aspect
   ratio is set inline by JS to match the source video, so non-16:9 clips
   are not cropped. We set a default 16:9 here as a fallback for browsers
   that haven't received the JS yet, plus a sensible max-height so very tall
   portrait clips never blow out the viewport. */
.vwg-pro-sticky-host {
    position: fixed;
    width: clamp(200px, 22vw, 320px);
    aspect-ratio: 16 / 9;
    max-height: 60vh;
    z-index: 99998;
    pointer-events: none;
}

.vwg-pro-sticky-bottom-right { right: 20px; bottom: 20px; }
.vwg-pro-sticky-bottom-left  { left: 20px;  bottom: 20px; }
.vwg-pro-sticky-top-right    { right: 20px; top: 60px; }
.vwg-pro-sticky-top-left     { left: 20px;  top: 60px; }

/* The slide that gets re-parented into the host fills it completely and
   carries the visual chrome (shadow, rounded corners, clip). The inline
   transform from the FLIP animation overrides nothing here - no transform
   property is set in CSS, so the inline value wins. */
.vwg-pro-sticky-host > .woocommerce-product-gallery__image,
.vwg-pro-sticky-host .woocommerce-product-gallery__image.vwg-pro-sticky-active {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    inset: auto !important;
    float: none !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: #000 !important;
    border-radius: 4px !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden !important;
    pointer-events: auto !important;
    backface-visibility: hidden;
}

.vwg-pro-sticky-host .video-js,
.vwg-pro-sticky-host .vwg-video-wrapper,
.vwg-pro-sticky-host a.woocommerce-product-gallery__vwg_video,
.vwg-pro-sticky-host video {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
}

/* contain (not cover) so even if our detected aspect ratio is slightly off
   the video is never cropped - at worst a small letterbox appears. */
.vwg-pro-sticky-host .video-js video,
.vwg-pro-sticky-host video {
    object-fit: contain;
    background: #000;
}

.vwg-pro-sticky-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.vwg-pro-sticky-close:hover,
.vwg-pro-sticky-close:focus {
    background: rgba(0, 0, 0, 0.9);
    outline: none;
}

@media (max-width: 480px) {
    .vwg-pro-sticky-host {
        width: clamp(160px, 45vw, 220px);
    }
    .vwg-pro-sticky-bottom-right { right: 10px; bottom: 10px; }
    .vwg-pro-sticky-bottom-left  { left: 10px;  bottom: 10px; }
    .vwg-pro-sticky-top-right    { right: 10px; top: 50px; }
    .vwg-pro-sticky-top-left     { left: 10px;  top: 50px; }
}
