[data-content-type="video"] {
    .pagebuilder-video-wrapper {
        position: relative;
    }

    .pagebuilder-video-link {
        position: absolute;
        inset: 0;
        z-index: 2;
        display: block;
        text-decoration: none;
    }

    .pagebuilder-mobile-hidden {
        display: none;
    }

    .pagebuilder-mobile-only {
        display: block;
    }
}

@media (min-width: 768px) {
    [data-content-type="video"] {
        .pagebuilder-mobile-hidden {
            display: block;
        }

        .pagebuilder-mobile-only {
            display: none;
        }
    }
}

/**
 * Drop Magento/Hyvä fixed 16:9 padding hack so uploaded HTML5 videos
 * keep their intrinsic aspect ratio (desktop and mobile).
 * Iframes (YouTube/Vimeo) keep a 16:9 box via aspect-ratio.
 * :not(#\#) chain matches Hyvä-boosted theme specificity.
 */
[data-content-type="video"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
    .pagebuilder-video-container {
        padding-top: 0;
        height: auto;
    }

    video {
        position: static;
        width: 100%;
        height: auto;
        display: block;
    }

    iframe {
        position: static;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        display: block;
    }
}
