/* Only inline Video.js players with a single editorial Cloud MP4 source. */
body.single-post .content-text .video-js:not(.vjs-fullscreen, :fullscreen, .vjs-fluid, .vjs-ad-playing):has(
    > video.vjs-tech:not([src]:not([src^="https://cloud.realitatea.group/" i]))
    > source:only-of-type[type="video/mp4" i][src^="https://cloud.realitatea.group/" i]
) {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: auto;
    /* Focusing controls must not scroll the native frame inside the player. */
    overflow: clip;
}

/* The native video sizes the wrapper; controls and poster stay overlaid.
   16:9 reserves space only until the browser knows the file's actual ratio. */
body.single-post .content-text .video-js:not(.vjs-fullscreen, :fullscreen, .vjs-fluid, .vjs-ad-playing)
> video.vjs-tech:not([src]:not([src^="https://cloud.realitatea.group/" i])):has(
    > source:only-of-type[type="video/mp4" i][src^="https://cloud.realitatea.group/" i]
) {
    position: static;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: auto 16 / 9;
    object-fit: contain;
}

/* Override the legacy mobile height only while this player is fullscreen. */
body.single-post .content-text .video-js:is(.vjs-fullscreen, :fullscreen):has(
    > video.vjs-tech:not([src]:not([src^="https://cloud.realitatea.group/" i]))
    > source:only-of-type[type="video/mp4" i][src^="https://cloud.realitatea.group/" i]
) {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto;
}
