.ysl-editor-video,
.ysl-richtext-video {
    margin: 1rem 0;
}

.ysl-richtext-video--youtube,
.ysl-editor-video:not(.ysl-richtext-video--file) {
    border: 1px solid #dbeafe;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    width: 100%;
}

.ysl-richtext-video--file,
.ysl-editor-video.ysl-richtext-video--file,
.ysl-richtext-video:has(> .ysl-richtext-video__file) {
    display: inline-block;
    width: auto;
    max-width: 100%;
    border: 0;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    vertical-align: top;
}

.ysl-editor-video__frame,
.ysl-richtext-video__frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
}

.ysl-editor-video__frame iframe,
.ysl-richtext-video__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ysl-editor-video__file,
.ysl-richtext-video__file {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(72vh, 560px);
    background: transparent;
    border-radius: 12px;
    vertical-align: top;
}

.ysl-editor-video--missing,
.ysl-richtext-video--missing {
    display: block;
    width: 100%;
    padding: 1rem;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #dbeafe;
    text-align: center;
}

.fi-fo-rich-editor .ysl-editor-video {
    max-width: 100%;
}

.fi-fo-rich-editor .ysl-editor-video.ysl-richtext-video--file {
    width: auto;
}

.student-course__richtext .ysl-richtext-video {
    margin: 1.25rem 0;
}

.student-course__richtext .ysl-richtext-video + p,
.student-course__richtext p + .ysl-richtext-video {
    margin-top: 1rem;
}
