.psa-video {
    container: psa-video / inline-size;
}

.psa-video__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: clamp(20px, 4vw, 48px);
}

.psa-video__frame {
    box-sizing: border-box;
    justify-self: center;
    min-width: 0;
    width: min(100%, var(--psa-video-width));
    padding: 5px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 10px 24px rgba(0, 0, 0, 0.09);
}

.psa-video .psa-video__player {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    max-height: none;
    aspect-ratio: var(--psa-video-ratio, auto);
    object-fit: contain;
}

.psa-video__text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.psa-video__text > :first-child {
    margin-top: 0;
}

.psa-video__text > :last-child {
    margin-bottom: 0;
}

@container psa-video (min-width: 720px) {
    .psa-video__layout--text-left > .psa-video__frame,
    .psa-video__layout--text-right > .psa-video__frame {
        width: 100%;
    }

    .psa-video__layout--text-right {
        grid-template-columns: min(var(--psa-video-width), 60%) minmax(0, 1fr);
    }

    .psa-video__layout--text-left {
        grid-template-columns: minmax(0, 1fr) min(var(--psa-video-width), 60%);
    }
}
