.richtext-shell {
    margin-top: 6px;
    border: 1px solid #ccd5df;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

textarea[data-richtext].is-enhanced {
    display: none;
}

.richtext-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #e3e7ec;
    background: #f7f9fb;
}

.richtext-toolbar button,
.richtext-toolbar select {
    height: 34px;
    min-width: 34px;
    margin: 0;
    padding: 0 9px;
    border: 1px solid #d5dce4;
    border-radius: 4px;
    color: #263747;
    background: #fff;
    font-size: 14px;
    line-height: 1;
}

.richtext-toolbar button {
    cursor: pointer;
}

.richtext-toolbar button[aria-pressed="true"] {
    border-color: #6385ad;
    color: #183b65;
    background: #d9e8f9;
}

.richtext-toolbar button:focus-visible,
.richtext-toolbar select:focus-visible {
    outline: 2px solid #35679e;
    outline-offset: 1px;
}

.richtext-toolbar button:hover,
.richtext-toolbar select:hover {
    border-color: #7b94af;
    background: #eef4f9;
}

.richtext-toolbar .toolbar-divider {
    width: 1px;
    height: 24px;
    margin: 0 3px;
    background: #dce3ea;
}

.richtext-editor {
    padding: 14px;
    color: #1f2d3d;
    font-size: 16px;
    line-height: 1.55;
    outline: none;
    white-space: pre-wrap;
}

.richtext-editor:focus-visible {
    outline: 2px solid #7b94af;
    outline-offset: -2px;
}

.richtext-editor:empty::before {
    content: attr(data-placeholder);
    color: #718096;
}

.news-richtext {
    color: #263747;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.news-richtext h2,
.news-richtext h3 {
    margin: 18px 0 8px;
    line-height: 1.3;
}

.news-richtext p,
.news-richtext div,
.news-richtext blockquote,
.news-richtext ul,
.news-richtext ol {
    margin: 0 0 12px;
}

.news-richtext blockquote {
    padding-left: 16px;
    border-left: 3px solid #b9c8d7;
    color: #536579;
}

.news-richtext a {
    color: #1367a5;
    text-decoration: underline;
}

.richtext-editor table,
.news-richtext table {
    display: block;
    width: max-content;
    min-width: min(100%, 420px);
    max-width: 100%;
    margin: 14px 0;
    overflow-x: auto;
    border-collapse: collapse;
}

.richtext-editor th,
.richtext-editor td,
.news-richtext th,
.news-richtext td {
    min-width: 96px;
    padding: 8px 10px;
    border: 1px solid #bac8d7;
    vertical-align: top;
    white-space: normal;
}

.richtext-editor th,
.news-richtext th {
    font-weight: 700;
    background: #eef3f7;
}

.richtext-editor td:focus {
    background: #f1f7fc;
}

.richtext-editor iframe,
.news-richtext iframe {
    display: block;
    width: min(100%, 760px);
    aspect-ratio: 16 / 9;
    height: auto;
    margin: 16px 0;
    border: 0;
    background: #0f172a;
}

@media (max-width: 640px) {
    .richtext-toolbar {
        gap: 3px;
    }

    .richtext-toolbar button,
    .richtext-toolbar select {
        height: 32px;
        padding: 0 7px;
    }
}

.richtext-editor ul,
.richtext-editor ol {
    padding-inline-start: 2em;
}
