/* Authored prose must fit the available column, including in TinyMCE. */
body#tinymce.mce-content-body,
body.parafeo-editor-flow main :is(.entry-content, .wp-block-post-content) {
    min-inline-size:0;
    overflow-wrap:anywhere;
}

:is(body#tinymce.mce-content-body, body.parafeo-editor-flow main :is(.entry-content, .wp-block-post-content))
:is(img,video,iframe,embed,object,figure) {
    max-inline-size:100%;
    min-inline-size:0;
}
:is(body#tinymce.mce-content-body, body.parafeo-editor-flow main :is(.entry-content, .wp-block-post-content)) :is(img,video) {
    block-size:auto;
}

:is(body#tinymce.mce-content-body, body.parafeo-editor-flow main :is(.entry-content, .wp-block-post-content))
:is(p,div,section,ul,ol,blockquote)[style*="width" i] {
    min-inline-size:0 !important;
    max-inline-size:100% !important;
    box-sizing:border-box;
}
:is(body#tinymce.mce-content-body, body.parafeo-editor-flow main :is(.entry-content, .wp-block-post-content))
:is(p,div,section,ul,ol,li,span)[style*="white-space" i] {
    white-space:normal !important;
}
@media(max-width:600px) {
    :is(body#tinymce.mce-content-body, body.parafeo-editor-flow main :is(.entry-content, .wp-block-post-content))
    :is(p,div,section,blockquote,figure)[style*="margin-left" i],
    :is(body#tinymce.mce-content-body, body.parafeo-editor-flow main :is(.entry-content, .wp-block-post-content))
    :is(p,div,section,blockquote,figure)[style*="margin-right" i] {
        margin-inline:0 !important;
    }
}

/* TinyMCE's own table stays editable. Scrolling the table does not widen the editor. */
body#tinymce.mce-content-body table:has(> :is(tbody,thead,tfoot) > tr > :nth-child(5)) {
    display:block;
    min-inline-size:0 !important;
    max-inline-size:100% !important;
    overflow-x:auto;
}
body#tinymce.mce-content-body table:has(> :is(tbody,thead,tfoot) > tr > :nth-child(5)) :is(td,th) {
    min-inline-size:6rem;
}

/* Keep wide editor tables readable without widening the article. */
.pawel-table-scroll {
    max-inline-size:100%;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
}
.pawel-table-scroll:focus-visible { outline:2px solid currentColor; outline-offset:-2px; }
.pawel-table-scroll > table {
    display:table !important;
    overflow:visible !important;
    max-inline-size:none !important;
    margin-block-end:0;
}
.pawel-table-scroll--wide > table { min-inline-size:100%; }
.pawel-table-scroll--wide > table :is(th,td) { min-inline-size:7rem; }
