/* ============================================================
 * 富文本内容展示样式（管理员后台编辑的富文本展示在前台）
 * 用于 .rich-text / .article .rich-text / .detail-block .rich-text
 * ============================================================ */
.rich-text {
    color: #334155;
    font-size: 15px;
    line-height: 1.85;
    word-wrap: break-word;
}
.rich-text p { margin: 0 0 14px; }
.rich-text h1, .rich-text h2, .rich-text h3, .rich-text h4, .rich-text h5, .rich-text h6 {
    color: #1e293b;
    font-weight: 700;
    line-height: 1.4;
    margin: 24px 0 12px;
}
.rich-text h1 { font-size: 26px; }
.rich-text h2 { font-size: 22px; }
.rich-text h3 { font-size: 19px; }
.rich-text h4 { font-size: 17px; }
.rich-text h5 { font-size: 15px; }
.rich-text h6 { font-size: 14px; }

.rich-text ul, .rich-text ol { margin: 0 0 14px; padding-left: 24px; }
.rich-text li { margin-bottom: 6px; }
/* 列表 marker 已在 frontend.css 全局重置为 none（默认无点）。
   需要保留项目符号 / 数字编号时，可在使用处追加 list-style: disc/decimal */

.rich-text img { max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 6px; }
.rich-text figure { margin: 14px 0; }
.rich-text figcaption { color: #94a3b8; font-size: 13px; text-align: center; margin-top: 6px; }

.rich-text blockquote {
    margin: 14px 0;
    padding: 12px 18px;
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    color: #475569;
    border-radius: 0 6px 6px 0;
}
.rich-text blockquote p:last-child { margin-bottom: 0; }

.rich-text table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.rich-text table th, .rich-text table td {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    text-align: left;
    font-size: 14px;
}
.rich-text table th { background: #f8fafc; }

.rich-text a { color: #2563eb; text-decoration: none; }
.rich-text a:hover { text-decoration: underline; }

.rich-text code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
    font-size: 13px;
    color: #be185d;
}
.rich-text pre {
    background: #1e293b;
    color: #f1f5f9;
    padding: 14px 18px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 14px 0;
    font-size: 13px;
    line-height: 1.6;
}
.rich-text pre code { background: transparent; color: inherit; padding: 0; }

.rich-text hr { border: none; border-top: 1px solid #e2e8f0; margin: 24px 0; }

.rich-text strong { color: #1e293b; font-weight: 700; }
.rich-text em { font-style: italic; }

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

/* ============================================================
 * 富文本编辑器工具栏（后台 case_edit / news_edit / product_edit）
 *   .hlz-rt-toolbar
 *   .hlz-rt-sep
 * ============================================================ */
.hlz-rt-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}
.hlz-rt-toolbar button {
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: #334155;
    line-height: 1;
    transition: all .15s;
}
.hlz-rt-toolbar button:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.hlz-rt-toolbar button b, .hlz-rt-toolbar button i, .hlz-rt-toolbar button u {
    font-style: normal;
    text-decoration: none;
    font-weight: 700;
}
.hlz-rt-toolbar button i { font-style: italic; }
.hlz-rt-toolbar button u { text-decoration: underline; }
.hlz-rt-sep {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: #cbd5e1;
    margin: 0 4px;
}
textarea.hlz-rt-content {
    border-radius: 0 0 6px 6px !important;
    border-top: none !important;
    min-height: 320px;
    font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
    font-size: 13px;
    line-height: 1.7;
}
