/*
    Block: Full Bleed Video
    Note: Selectors must start with .block-full-bleed-video
*/

@layer blocks {
    .block-full-bleed-video .main-wrapper {
        --height: 100vh;
        --height: 100svh;
        --height: 100dvh;
        position: relative;
        height: calc(var(--height) - 2.5rem);
        isolation: isolate;
    }

    .block-full-bleed-video .main-wrapper > .media-wrapper::after {
        content: '';
        position: absolute;
        inset: 0;
        background-color: #0000004D;
        mix-blend-mode: multiply;
    }

    .block-full-bleed-video .video-open-wrapper {
        --transition-dur: 140ms;
        --transition-func: ease-in-out;
        position: absolute;
        bottom: 1.25rem;
        right: 1.25rem;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        -webkit-box-align: end;
            -ms-flex-align: end;
                align-items: flex-end;
        -webkit-box-pack: end;
            -ms-flex-pack: end;
                justify-content: flex-end;
        width: 21.25rem;
        height: 13.125rem;
        padding: 1.375rem;
        border: 1px solid rgb(from var(--c-white) r g b / .3);
        isolation: isolate;
        overflow: hidden;
    }

    .block-full-bleed-video .video-open-wrapper .bg-image {
        position: absolute;
        inset: 0;
        -o-object-fit: cover;
           object-fit: cover;
        width: 100%;
        height: 100%;
        z-index: -2;
        pointer-events: none;
        -webkit-user-select: none;
           -moz-user-select: none;
            -ms-user-select: none;
                user-select: none;
        -webkit-transition: -webkit-transform var(--transition-dur) var(--transition-func);
        transition: -webkit-transform var(--transition-dur) var(--transition-func);
        transition: transform var(--transition-dur) var(--transition-func);
        transition: transform var(--transition-dur) var(--transition-func), -webkit-transform var(--transition-dur) var(--transition-func);
    }

    .block-full-bleed-video .video-open-wrapper::after {
        content: '';
        position: absolute;
        inset: 0;
        background:-webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.7)));
        background:linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
        z-index: -1;
        pointer-events: none;
    }

    .block-full-bleed-video .video-open-wrapper:is(:hover, :focus-within) .bg-image {
        -webkit-transform: scale(1.05);
            -ms-transform: scale(1.05);
                transform: scale(1.05);
    }

    @media screen and (width <= 1024px) {
        .block-full-bleed-video .video-open-wrapper {
            width: 17.5rem;
            height: 10.8125rem;
        }
    }

    @media screen and (width <= 620px) {
        .block-full-bleed-video .video-open-wrapper {
            width: auto;
            height: auto;
            border-color: rgb(from var(--c-white) r g b / .2);
            border-radius: 100vw;
            padding: 1rem 1.375rem;
            right: unset;
            left: 1.5rem;
            bottom: 1.5rem;
            background-color: rgb(from var(--c-white) r g b / .05);
            backdrop-filter: blur(40px);
            -webkit-backdrop-filter: blur(40px);
        }

        .block-full-bleed-video .video-open-wrapper .bg-image,
        .block-full-bleed-video .video-open-wrapper::after {
            display: none;
        }
    }

    @media screen and (orientation: portrait) {
        .block-full-bleed-video .main-wrapper {
            height: auto;
            max-height: calc(var(--height) * .75);
            aspect-ratio: .651;
        }
    }
}
