:where(.component-background-video-wrapper > .component-wrapper) {
    display: grid;
    grid-template-areas: "same";
    isolation: isolate;

    :where(& > *) {
        grid-area: same;
    }

    :where( .background-video) {
        background: #eee;
        overflow: hidden;
        padding: 0;
        position: relative;
        container: video-container / size;

        :where( & > iframe) {
            box-sizing: border-box;
            left: 50%;
            min-height: 100%;
            min-width: 100%;
            transform: translate(-50%, -50%);
            position: absolute;
            top: 50%;
            width: 100%;
            aspect-ratio: 16 / 9;
            height: auto;
        }
    }

    :where(& > .region) {
        z-index: 2;
        width: 100%;
    }
}

/* This stops black bars from appearing because the video can't fill the area properly */
@container video-container (aspect-ratio < 16 / 9) {
    .component-background-video-wrapper :where( .background-video > iframe) {
        min-width: 200dvw;
    }
}
