/* Core — Product Video Button */
a.popup-video.direct_video.mhr-core-video-button {
    box-sizing: border-box;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

a.popup-video.direct_video.mhr-core-video-button .mhr-core-video-label {
    display: none;
}

/* Make the anchor itself receive the click. Some theme popup handlers inspect event.target. */
a.popup-video.direct_video.mhr-core-video-button svg,
a.popup-video.direct_video.mhr-core-video-button svg *,
a.popup-video.direct_video.mhr-core-video-button .mhr-core-video-label {
    pointer-events: none !important;
}

/* Desktop: keep original theme markup, only restyle it. */
@keyframes mhr-core-video-desktop-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(185, 28, 28, .28);
    }
    50% {
        box-shadow: 0 6px 15px rgba(185, 28, 28, .34);
    }
}

@keyframes mhr-core-video-icon-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@media (min-width: 768px) {
    /* Desktop hotfix: style only the video anchor itself. Never paint a border/outline
       that can visually merge with the gallery or its parent container. */
    a.popup-video.direct_video.mhr-core-video-desktop {
        position: relative !important;
        z-index: 20 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 34px !important;
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        padding: 0 !important;
        margin: 0 !important;
        color: #fff !important;
        background: linear-gradient(145deg, #ef4444 0%, #dc2626 55%, #b91c1c 100%) !important;
        border: 0 !important;
        outline: 0 !important;
        border-radius: 50% !important;
        box-shadow: 0 4px 12px rgba(185, 28, 28, .28) !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow: hidden !important;
        cursor: pointer !important;
        animation: mhr-core-video-desktop-pulse 2.2s ease-in-out infinite;
        transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
        will-change: transform, box-shadow;
    }

    a.popup-video.direct_video.mhr-core-video-desktop::before,
    a.popup-video.direct_video.mhr-core-video-desktop::after {
        content: none !important;
        display: none !important;
        border: 0 !important;
        outline: 0 !important;
    }

    a.popup-video.direct_video.mhr-core-video-desktop:hover {
        transform: translateY(-1px) scale(1.03);
        background: linear-gradient(145deg, #f05252 0%, #dc2626 55%, #b91c1c 100%) !important;
        box-shadow: 0 6px 15px rgba(185, 28, 28, .34) !important;
    }

    a.popup-video.direct_video.mhr-core-video-desktop:focus,
    a.popup-video.direct_video.mhr-core-video-desktop:focus-visible,
    a.popup-video.direct_video.mhr-core-video-desktop:active {
        border: 0 !important;
        outline: 0 !important;
    }

    a.popup-video.direct_video.mhr-core-video-desktop svg.pack-theme {
        display: block !important;
        width: 16px !important;
        height: 16px !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #fff !important;
        fill: #fff !important;
        stroke: #fff !important;
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
        animation: mhr-core-video-icon-breathe 2.2s ease-in-out infinite;
        transform-origin: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    a.popup-video.direct_video.mhr-core-video-desktop,
    a.popup-video.direct_video.mhr-core-video-desktop svg.pack-theme {
        animation: none !important;
    }
}

/* Mobile: compact, polished full-width CTA below thumbnails. */
@media (max-width: 767px) {
    a.popup-video.direct_video.mhr-core-video-mobile {
        position: relative !important;
        inset: auto !important;
        float: none !important;
        clear: both;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: calc(100% - 16px) !important;
        min-height: 52px !important;
        margin: 12px 8px 16px !important;
        padding: 0 16px 0 60px !important;
        color: #fff !important;
        background: linear-gradient(100deg, #4f8ff7 0%, #3978e8 58%, #2f68d6 100%) !important;
        border: 1px solid rgba(255,255,255,.20) !important;
        border-radius: 13px !important;
        box-shadow: 0 6px 18px rgba(42, 103, 210, .20), inset 0 1px 0 rgba(255,255,255,.22) !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow: hidden !important;
        z-index: 8;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.35 !important;
        text-align: right !important;
        direction: rtl !important;
        cursor: pointer;
        transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
    }

    /* Neutralize theme decorations that can show up as a stray dot beside the icon. */
    a.popup-video.direct_video.mhr-core-video-mobile::before,
    a.popup-video.direct_video.mhr-core-video-mobile::after {
        content: none !important;
        display: none !important;
    }

    a.popup-video.direct_video.mhr-core-video-mobile .mhr-core-video-label {
        display: block !important;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        color: #fff !important;
        text-align: right !important;
        direction: rtl !important;
        white-space: nowrap;
        letter-spacing: -.1px;
    }

    a.popup-video.direct_video.mhr-core-video-mobile svg.pack-theme {
        position: absolute !important;
        left: 5px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        display: block !important;
        width: 42px !important;
        height: 42px !important;
        margin: 0 !important;
        padding: 11px !important;
        box-sizing: border-box;
        color: #fff !important;
        fill: #fff !important;
        stroke: #fff !important;
        background: linear-gradient(145deg, #6aa6ff 0%, #357adf 55%, #245bc0 100%) !important;
        border: 1px solid rgba(255,255,255,.58) !important;
        border-radius: 50% !important;
        box-shadow: 0 3px 9px rgba(17, 64, 154, .27), inset 0 1px 2px rgba(255,255,255,.35) !important;
        z-index: 2;
    }

    a.popup-video.direct_video.mhr-core-video-mobile:active {
        transform: scale(.992);
        filter: brightness(.98);
        box-shadow: 0 3px 10px rgba(42, 103, 210, .18), inset 0 1px 0 rgba(255,255,255,.18) !important;
    }

    .swiper.product-thumbs + a.popup-video.direct_video.mhr-core-video-mobile {
        margin-top: 12px !important;
    }
}

/* Core 1.0.4 — Full-screen product video modal (mobile + desktop)
   The theme still opens/closes the popup; Core only expands the already-open popup. */
html.mhr-core-video-fullscreen-open,
body.mhr-core-video-fullscreen-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.mhr-core-video-fullscreen-open .mfp-bg {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 1 !important;
    background: #000 !important;
    z-index: 2147483000 !important;
}

body.mhr-core-video-fullscreen-open .mfp-wrap {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
    z-index: 2147483001 !important;
}

body.mhr-core-video-fullscreen-open .mfp-container,
body.mhr-core-video-fullscreen-open .mfp-content {
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    inset: auto !important;
    background: #000 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.mhr-core-video-fullscreen-open .mfp-container::before {
    display: none !important;
    height: 0 !important;
}

body.mhr-core-video-fullscreen-open #popup-video {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    inset: auto !important;
    overflow: hidden !important;
    background: #000 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Expand common wrappers used around self-hosted/embedded videos. */
body.mhr-core-video-fullscreen-open #popup-video > div,
body.mhr-core-video-fullscreen-open #popup-video .video-wrap,
body.mhr-core-video-fullscreen-open #popup-video .video-wrapper,
body.mhr-core-video-fullscreen-open #popup-video .wp-video,
body.mhr-core-video-fullscreen-open #popup-video .wp-video-shortcode,
body.mhr-core-video-fullscreen-open #popup-video .mejs-container,
body.mhr-core-video-fullscreen-open #popup-video .mejs-inner,
body.mhr-core-video-fullscreen-open #popup-video .mejs-mediaelement,
body.mhr-core-video-fullscreen-open #popup-video .fluid-width-video-wrapper,
body.mhr-core-video-fullscreen-open #popup-video .responsive-video,
body.mhr-core-video-fullscreen-open #popup-video .mfp-iframe-scaler {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    border-radius: 0 !important;
}

body.mhr-core-video-fullscreen-open #popup-video video,
body.mhr-core-video-fullscreen-open #popup-video iframe,
body.mhr-core-video-fullscreen-open #popup-video .wp-video-shortcode video,
body.mhr-core-video-fullscreen-open #popup-video .mejs-mediaelement video,
body.mhr-core-video-fullscreen-open .mfp-iframe {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    background: #000 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Keep close control visible over the movie on every screen size. */
body.mhr-core-video-fullscreen-open .mfp-close,
body.mhr-core-video-fullscreen-open #popup-video .mfp-close,
body.mhr-core-video-fullscreen-open #popup-video .close,
body.mhr-core-video-fullscreen-open #popup-video [class*="close"] {
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    left: auto !important;
    z-index: 2147483646 !important;
}

@media (max-width: 767px) {
    body.mhr-core-video-fullscreen-open .mfp-close,
    body.mhr-core-video-fullscreen-open #popup-video .mfp-close,
    body.mhr-core-video-fullscreen-open #popup-video .close,
    body.mhr-core-video-fullscreen-open #popup-video [class*="close"] {
        top: max(8px, env(safe-area-inset-top)) !important;
        right: max(8px, env(safe-area-inset-right)) !important;
    }
}

/* Core fullscreen video UX: percentage loader and clear close */
body.mhr-core-video-fullscreen-open #popup-video > .mhr-core-video-ui {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    pointer-events: none !important;
    z-index: 2147483645 !important;
}

/* Hide the theme's duplicate close button only after Core's own close control exists. */
body.mhr-core-video-fullscreen-open .mfp-wrap.mhr-core-video-ui-active .mfp-close {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.mhr-core-video-fullscreen-open .mhr-core-video-close {
    position: fixed !important;
    top: max(12px, env(safe-area-inset-top)) !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    background: rgba(220, 38, 38, .94) !important;
    border: 1px solid rgba(255,255,255,.45) !important;
    border-radius: 50% !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.34) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 1 !important;
    visibility: visible !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 2147483647 !important;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease !important;
}

body.mhr-core-video-fullscreen-open .mhr-core-video-close span {
    display: block;
    margin-top: -3px;
    font-family: Arial, sans-serif;
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
    color: #fff;
    pointer-events: none;
}

@media (hover:hover) and (pointer:fine) {
    body.mhr-core-video-fullscreen-open .mhr-core-video-close:hover {
        transform: scale(1.06);
        background: #ef4444 !important;
        box-shadow: 0 10px 30px rgba(0,0,0,.42) !important;
    }
}




body.mhr-core-video-fullscreen-open .mhr-core-video-loader {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 13px !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    background: rgba(0,0,0,.34) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: 2147483646 !important;
    transition: opacity .18s ease, visibility .18s ease !important;
}

body.mhr-core-video-fullscreen-open .mhr-core-video-loader[hidden] {
    display: none !important;
}

body.mhr-core-video-fullscreen-open .mhr-core-video-loader.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
}

body.mhr-core-video-fullscreen-open .mhr-core-video-loader-ring {
    --mhr-video-progress: 0deg;
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    width: 82px !important;
    height: 82px !important;
    border-radius: 50% !important;
    background: conic-gradient(#fff var(--mhr-video-progress), rgba(255,255,255,.18) 0) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,.28) !important;
}

body.mhr-core-video-fullscreen-open .mhr-core-video-loader-ring::after {
    content: "" !important;
    position: absolute !important;
    inset: 5px !important;
    border-radius: 50% !important;
    background: rgba(10,10,12,.90) !important;
}

body.mhr-core-video-fullscreen-open .mhr-core-video-loader-percent {
    position: relative !important;
    z-index: 2 !important;
    direction: ltr !important;
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: -.2px !important;
}

body.mhr-core-video-fullscreen-open .mhr-core-video-loader-text {
    position: relative !important;
    z-index: 2 !important;
    color: rgba(255,255,255,.92) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    text-shadow: 0 2px 10px rgba(0,0,0,.42) !important;
}

/* The player already occupies the whole viewport; a second fullscreen control is redundant. */
body.mhr-core-video-fullscreen-open #popup-video video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}
body.mhr-core-video-fullscreen-open #popup-video .mejs-fullscreen-button,
body.mhr-core-video-fullscreen-open #popup-video [data-plyr="fullscreen"] {
    display: none !important;
}

@media (max-width: 767px) {
    body.mhr-core-video-fullscreen-open .mhr-core-video-close {
        top: max(9px, env(safe-area-inset-top)) !important;
        right: max(9px, env(safe-area-inset-right)) !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }

    body.mhr-core-video-fullscreen-open .mhr-core-video-close span {
        font-size: 31px;
    }


    body.mhr-core-video-fullscreen-open .mhr-core-video-loader-ring {
        width: 74px !important;
        height: 74px !important;
    }

    body.mhr-core-video-fullscreen-open .mhr-core-video-loader-percent {
        font-size: 16px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.mhr-core-video-fullscreen-open .mhr-core-video-close,
    body.mhr-core-video-fullscreen-open .mhr-core-video-loader {
        transition: none !important;
    }
}


/* Core 1.2.5 — remove download controls completely inside the product video popup */
body.mhr-core-video-fullscreen-open #popup-video video::-webkit-media-controls-download-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
body.mhr-core-video-fullscreen-open #popup-video .mhr-core-video-download,
body.mhr-core-video-fullscreen-open #popup-video .mejs-download-button,
body.mhr-core-video-fullscreen-open #popup-video .plyr__control[data-plyr="download"],
body.mhr-core-video-fullscreen-open #popup-video a[download] {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}
