/**
 * TinyMCE 内容区样式(深色主题,匹配后台)
 * 在富文本编辑器内"所见即所得"显示时使用
 */

/* 基础排版 */
.mce-content-body {
    background-color: #1a1a2e !important;
    color: rgba(255, 255, 255, 0.92) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
}

/* 标题 */
.mce-content-body h1,
.mce-content-body h2,
.mce-content-body h3,
.mce-content-body h4,
.mce-content-body h5,
.mce-content-body h6 {
    color: #fff !important;
    margin: 1.2em 0 0.5em !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}
.mce-content-body h1 { font-size: 1.8em !important; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.3em; }
.mce-content-body h2 { font-size: 1.5em !important; }
.mce-content-body h3 { font-size: 1.25em !important; }
.mce-content-body h4 { font-size: 1.1em !important; }

/* 段落 */
.mce-content-body p {
    margin: 0 0 1em !important;
}

/* 链接 */
.mce-content-body a {
    color: #4f8cff !important;
    text-decoration: underline !important;
}

/* 列表 */
.mce-content-body ul,
.mce-content-body ol {
    margin: 0 0 1em 1.5em !important;
    padding-left: 0.5em !important;
}
.mce-content-body li {
    margin-bottom: 0.3em !important;
}

/* 图片 */
.mce-content-body img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 6px !important;
    margin: 0.5em 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* 引用块 */
.mce-content-body blockquote {
    border-left: 4px solid var(--primary, #4f8cff) !important;
    background: rgba(79, 140, 255, 0.08) !important;
    padding: 0.8em 1em !important;
    margin: 1em 0 !important;
    border-radius: 0 6px 6px 0 !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

/* 代码 */
.mce-content-body code {
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-family: 'SF Mono', Monaco, Consolas, monospace !important;
    font-size: 0.9em !important;
    color: #ffa940 !important;
}

.mce-content-body pre {
    background: rgba(0, 0, 0, 0.4) !important;
    padding: 1em !important;
    border-radius: 6px !important;
    overflow-x: auto !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.mce-content-body pre code {
    background: transparent !important;
    padding: 0 !important;
    color: #e0e0e0 !important;
}

/* 表格 */
.mce-content-body table {
    border-collapse: collapse !important;
    margin: 1em 0 !important;
    width: 100% !important;
}
.mce-content-body table td,
.mce-content-body table th {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 8px 12px !important;
}
.mce-content-body table th {
    background: rgba(255, 255, 255, 0.05) !important;
    font-weight: 600 !important;
}

/* 分隔线 */
.mce-content-body hr {
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 1.5em 0 !important;
}

/* 前台富文本产品描述 */
.rich-text-content {
    overflow-wrap: anywhere;
}
.rich-text-content p { margin: 0 0 0.8em; }
.rich-text-content p:last-child { 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 {
    color: inherit;
    margin: 1em 0 0.5em;
    line-height: 1.35;
}
.rich-text-content ul, .rich-text-content ol { margin: 0.5em 0 0.8em 1.5em; padding-left: 1em; }
.rich-text-content img { max-width: 100%; height: auto; display: inline-block; }
.rich-text-content table { max-width: 100%; border-collapse: collapse; }
.rich-text-content th, .rich-text-content td { border: 1px solid currentColor; padding: 6px 10px; }
.rich-text-content a { color: var(--biz-color, #4f8cff); text-decoration: underline; }

/* 选中文本 */
.mce-content-body ::selection {
    background: rgba(79, 140, 255, 0.4) !important;
    color: #fff !important;
}