/* Match admin-front EditorialRichtexts.vue and CKEditor content styles. */
.editorial-content.rich-text-content {
    color: #333 !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    overflow-wrap: anywhere;
    word-break: break-all;
    overflow-x: auto;
}

.editorial-content.rich-text-content p {
    margin: 0 0 16px;
    color: #333;
    font-size: 13px;
    line-height: 1.8;
}

.editorial-content.rich-text-content :is(h1, h2, h3, h4, h5, h6) {
    padding: 0;
    border: 0;
    color: #1a1a1a;
    font-weight: 600;
    line-height: 1.4;
}
.editorial-content.rich-text-content h1 { margin: 24px 0 16px; font-size: 28px; }
.editorial-content.rich-text-content h2 { margin: 22px 0 14px; font-size: 24px; }
.editorial-content.rich-text-content h3 { margin: 20px 0 12px; font-size: 20px; }
.editorial-content.rich-text-content h4 { margin: 18px 0 12px; font-size: 18px; }
.editorial-content.rich-text-content h5 { margin: 16px 0 10px; font-size: 16px; }
.editorial-content.rich-text-content h6 { margin: 14px 0 10px; font-size: 14px; }
.editorial-content.rich-text-content :is(strong, b) { font-weight: 700; }
.editorial-content.rich-text-content :is(em, i) { font-style: italic; }
.editorial-content.rich-text-content :is(s, del) { text-decoration: line-through; }
.editorial-content.rich-text-content u { text-decoration: underline; }
.editorial-content.rich-text-content sup { vertical-align: super; font-size: smaller; }
.editorial-content.rich-text-content sub { vertical-align: sub; font-size: smaller; }
.editorial-content.rich-text-content .text-tiny { font-size: .7em; }
.editorial-content.rich-text-content .text-small { font-size: .85em; }
.editorial-content.rich-text-content .text-big { font-size: 1.4em; }
.editorial-content.rich-text-content .text-huge { font-size: 1.8em; }

.editorial-content.rich-text-content blockquote {
    overflow: hidden;
    margin: 16px 0;
    padding: 8px 16px;
    border: 0;
    border-left: 4px solid #d0d0d0;
    border-radius: 0;
    background: #f7f7f7;
    color: #666;
    font-size: 15px;
    font-style: italic;
    line-height: 1.8;
}
.editorial-content.rich-text-content blockquote p { margin: 0; }
.editorial-content.rich-text-content[dir="rtl"] blockquote { border-left: 0; border-right: 4px solid #d0d0d0; }

.editorial-content.rich-text-content table {
    display: table;
    width: 100%;
    max-width: 100%;
    margin: 16px 0;
    border: 0;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: auto;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
}
.editorial-content.rich-text-content :is(th, td) {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    text-align: left;
    /* Tool-result tables use nowrap globally; editor cells must wrap to fit 100%. */
    white-space: normal;
    overflow-wrap: break-word;
    vertical-align: middle;
}
.editorial-content.rich-text-content th { background: #f5f5f5; color: #333; font-weight: 600; }
.editorial-content.rich-text-content figure.table {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: .9em auto;
    overflow-x: auto;
}
.editorial-content.rich-text-content figure.table table {
    height: 100%;
    margin: 0;
    border: 1px double #b3b3b3;
}
.editorial-content.rich-text-content figure.table :is(th, td) {
    min-width: 2em;
    padding: .4em;
    border: 1px solid #bfbfbf;
}
.editorial-content.rich-text-content figure.table th { background: rgba(0, 0, 0, .05); font-weight: 700; }
.editorial-content.rich-text-content table.ck-table-resized { table-layout: fixed; }
.editorial-content.rich-text-content figure.table > figcaption {
    order: -1;
    margin: 8px 0 0;
    padding: .6em;
    background: #f7f7f7;
    color: #888;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    word-break: break-word;
}

.editorial-content.rich-text-content :is(ul, ol) { margin: 16px 0; padding-left: 24px; color: #333; line-height: 1.8; }
.editorial-content.rich-text-content ul { list-style-type: disc; }
.editorial-content.rich-text-content ul ul { list-style-type: circle; }
.editorial-content.rich-text-content ul ul ul { list-style-type: square; }
.editorial-content.rich-text-content ol { list-style-type: decimal; }
.editorial-content.rich-text-content li { margin: 4px 0; }
.editorial-content.rich-text-content a { color: #1677ff; text-decoration: none; transition: color .2s; }
.editorial-content.rich-text-content a:hover { color: #0958d9; text-decoration: underline; }
.editorial-content.rich-text-content hr { height: 0; margin: 24px 0; border: 0; border-top: 1px solid #e0e0e0; }

.editorial-content.rich-text-content img { max-width: 100%; height: auto; border-radius: 0; }
.editorial-content.rich-text-content figure.image { display: table; clear: both; min-width: 50px; max-width: 100%; margin: .9em auto; text-align: center; }
.editorial-content.rich-text-content figure.image:not(.image-style-align-left):not(.image-style-align-right):not(.image-style-align-block-left):not(.image-style-align-block-right):not(.image-style-block-align-left):not(.image-style-block-align-right):not(.image-style-side) {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 16px auto;
}
.editorial-content.rich-text-content figure.image img { display: block; margin: 0 auto; }
.editorial-content.rich-text-content .image-inline { display: flex; flex-direction: column; align-items: center; margin: 16px auto; }
.editorial-content.rich-text-content p > img:only-child { display: block; margin: 16px auto; }
.editorial-content.rich-text-content figure.image:is(.image-style-align-left, .image-style-align-right) { clear: none; }
.editorial-content.rich-text-content figure.image.image-style-align-left { float: left; margin-right: 1.5em; }
.editorial-content.rich-text-content figure.image:is(.image-style-align-right, .image-style-side) { float: right; margin-left: 1.5em; }
.editorial-content.rich-text-content figure.image.image-style-side { max-width: 50%; }
.editorial-content.rich-text-content figure.image:is(.image-style-align-block-left, .image-style-block-align-left) { margin-left: 0; margin-right: auto; }
.editorial-content.rich-text-content figure.image:is(.image-style-align-block-right, .image-style-block-align-right) { margin-right: 0; margin-left: auto; }
.editorial-content.rich-text-content figcaption { margin-top: 8px; color: #888; font-size: 13px; line-height: 1.6; text-align: center; }
.editorial-content.rich-text-content figure.image > figcaption { padding: .6em; background: #f7f7f7; }
.editorial-content.rich-text-content figure.video { display: flex; flex-direction: column; align-items: center; margin: 16px 0; }
.editorial-content.rich-text-content :is(video, iframe) { display: block; max-width: 100%; margin: 0 auto; }
.editorial-content.rich-text-content video { height: auto; }
