/* BLOCK: Demo Phone */

.block-demo-phone .content-wrapper {
    --size: calc(var(--page-size) - 2 * var(--pad));
    display: flex;
    justify-content: space-around;
    background-color: #F1EEFF;
    border-radius: 2.5rem;
    width: calc(100% - 2 * var(--pad, 0px) - 3rem);
}

.block-demo-phone .text-wrapper {
    flex-basis: 34%;
    align-self: center;
}

.block-demo-phone .phone-frame {
    flex-basis: 36%;
    align-self: flex-end;
    margin-top: 5rem;
    aspect-ratio: 0.725;
    border: 0.625rem solid var(--c-secondary);
    border-bottom: 0;
    border-radius: 16% / 12%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.block-demo-phone .phone-frame::before {
    content: '';
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    aspect-ratio: 4;
    width: 27%;
    height: auto;
    background-color: var(--c-secondary);
    border-radius: 15% / 45%;
}

.block-demo-phone .phone-frame .media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    user-select: none;
}

.block-demo-phone .phone-frame .media--image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.block-demo-phone .phone-frame .media--video .wp-video {
    pointer-events: none;
    user-select: none;
}

.block-demo-phone .phone-frame .media--video :is(.wp-video, .mejs-container, .mejs-inner, .mejs-medialement, mediaelementwrapper, video) {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.block-demo-phone .phone-frame .media--video .wp-video :where(br, .mejs-controls, .mejs-overlay) {
    display: none !important;
}

.block-demo-phone .phone-frame .media--embed iframe {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.block-demo-phone .text-content {
    text-align: center;
}

.block-demo-phone .text-content:not(:last-child) {
    margin-bottom: 3.75rem;
}

.block-demo-phone .text-content > * {
    margin: 0;
}

.block-demo-phone .text-content > :not(:last-child) {
    margin-bottom: 2.5rem;
}

.block-demo-phone .text-content > :is(h1, h2, .h1, .h2):not(:last-child) {
    margin-bottom: 3.75rem;
}

.block-demo-phone .cta-buttons {
    gap: 0.9375rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

@media screen and (width <= 820px) {
    .block-demo-phone .content-wrapper {
        border-radius: 1.5rem;
    }
    .block-demo-phone .text-wrapper,
    .block-demo-phone .phone-frame {
        flex-basis: 45%;
    }
    .block-demo-phone .text-content:not(:last-child) {
        margin-bottom: 2.5rem;
    }
    .block-demo-phone .text-content > :not(:last-child) {
        margin-bottom: 1.5rem;
    }
    .block-demo-phone .text-content > :is(h1, h2, .h1, .h2):not(:last-child) {
        margin-bottom: 2.5rem;
    }
}

@media screen and (width <= 620px) {
    .block-demo-phone .content-wrapper {
        --pad: 2.5rem;
        flex-direction: column;
        gap: 2.5rem;
        align-items: center;
        padding-top: 2.5rem;
    }
    .block-demo-phone .text-wrapper {
        flex-basis: unset;
    }
    .block-demo-phone .phone-frame {
        flex-basis: unset;
        width: 100%;
        height: auto;
        margin-top: 0;
    }
    .block-demo-phone .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}