/* rich-text-content-v1
 * Возвращает отображение HTML-форматирования TinyMCE после Tailwind Preflight.
 * Inline-стили редактора (размер, цвет, фон и выравнивание) сохраняют приоритет.
 */

.rich-text-content {
    width: 100%;
}

.rich-text-content > p,
.rich-text-content > h1,
.rich-text-content > h2,
.rich-text-content > h3,
.rich-text-content > h4,
.rich-text-content > h5,
.rich-text-content > h6,
.rich-text-content > ul,
.rich-text-content > ol,
.rich-text-content > blockquote,
.rich-text-content > pre,
.rich-text-content > table,
.rich-text-content > figure,
.rich-text-content > hr {
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
}

.rich-text-content h1,
.rich-text-content h2,
.rich-text-content h3,
.rich-text-content h4,
.rich-text-content h5,
.rich-text-content h6 {
    font-weight: 700;
    line-height: 1.25;
}

.rich-text-content h1 {
    font-size: 2rem;
}

.rich-text-content h2 {
    font-size: 1.5rem;
}

.rich-text-content h3 {
    font-size: 1.25rem;
}

.rich-text-content h4 {
    font-size: 1.125rem;
}

.rich-text-content h5 {
    font-size: 1rem;
}

.rich-text-content h6 {
    font-size: 0.875rem;
}

.rich-text-content strong,
.rich-text-content b {
    font-weight: 700;
}

.rich-text-content em,
.rich-text-content i {
    font-style: italic;
}

.rich-text-content u {
    text-decoration: underline;
}

.rich-text-content s,
.rich-text-content strike,
.rich-text-content del {
    text-decoration: line-through;
}

.rich-text-content ul,
.rich-text-content ol {
    padding-left: 1.75rem;
    text-align: left;
}

.rich-text-content ul {
    list-style: disc outside;
}

.rich-text-content ol {
    list-style: decimal outside;
}

.rich-text-content ul ul {
    list-style-type: circle;
}

.rich-text-content ul ul ul {
    list-style-type: square;
}

.rich-text-content li {
    display: list-item;
    margin: 0.25rem 0;
}

.rich-text-content a {
    color: #ce2c1f;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rich-text-content a:hover {
    text-decoration-thickness: 2px;
}

.rich-text-content blockquote {
    border-left: 4px solid #ce2c1f;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.04);
    font-style: italic;
}

.rich-text-content pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 1rem;
    border-radius: 4px;
    background: #f1f1f1;
    color: #222;
    white-space: pre-wrap;
}

.rich-text-content code,
.rich-text-content kbd,
.rich-text-content samp {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.rich-text-content :not(pre) > code,
.rich-text-content kbd {
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    background: #f1f1f1;
}

.rich-text-content hr {
    height: 1px;
    border: 0;
    background: #d7d7d7;
}

.rich-text-content table {
    border-collapse: collapse;
    table-layout: auto;
}

.rich-text-content th,
.rich-text-content td {
    border: 1px solid #d7d7d7;
    padding: 0.5rem 0.75rem;
    text-align: inherit;
    vertical-align: top;
}

.rich-text-content th {
    background: rgba(0, 0, 0, 0.05);
    font-weight: 700;
}

.rich-text-content caption,
.rich-text-content figcaption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.rich-text-content img,
.rich-text-content video,
.rich-text-content iframe,
.rich-text-content figure {
    max-width: 100%;
}

.rich-text-content img,
.rich-text-content video {
    height: auto;
}

.rich-text-content iframe {
    width: 100%;
}

.rich-text-content sub,
.rich-text-content sup {
    position: relative;
    font-size: 0.75em;
    line-height: 0;
    vertical-align: baseline;
}

.rich-text-content sup {
    top: -0.5em;
}

.rich-text-content sub {
    bottom: -0.25em;
}

.rich-text-content mark {
    background: #fff3a3;
    color: inherit;
}

.rich-text-content small {
    font-size: 0.875em;
}

.rich-text-content dl {
    width: 100%;
}

.rich-text-content dt {
    font-weight: 700;
}

.rich-text-content dd {
    margin-left: 1.5rem;
}

@media (max-width: 767px) {
    .rich-text-content h1 {
        font-size: 1.75rem;
    }

    .rich-text-content h2 {
        font-size: 1.375rem;
    }

    .rich-text-content h3 {
        font-size: 1.125rem;
    }

    .rich-text-content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }
}
