/*
 * 正文富文本样式 —— 单一来源（Single Source of Truth）
 *
 * 帖子详情页的 `.rich-content` 容器，与 TinyMCE 编辑器 iframe（body_class="rich-content"）
 * 共用本文件。取值以富文本编辑器最终渲染效果为准，即：
 *   TinyMCE 默认 content.css（skins/content/default/content.min.css）
 *   + 原 content_style 内联样式 叠加后的结果。
 *
 * 以后调整正文排版只改这里，编辑器和详情页会同步变化；
 * 不要再在 community.css 里单独覆盖正文标签（p/div/h1-h6/ul/ol/blockquote/hr/figure/table/pre/code）。
 */

.rich-content {
  font-family: Arial, 'Microsoft YaHei', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: #25314c;
}

/* 段落（p / div）换行由浏览器块级元素原生处理，不额外设置 margin / min-height */

/* 标题：h1-h3 取自 content_style；h4-h6 走浏览器默认字号（1em / 0.83em / 0.67em），与编辑器 blocks 下拉一致 */
.rich-content h1 { font-size: 30px; font-weight: bold; line-height: 1.3; margin: 8px 0 12px; color: #1b2d4a; text-align: center; }
.rich-content h2 { font-size: 24px; font-weight: bold; line-height: 1.35; margin: 8px 0 12px; color: #1b2d4a; text-align: center; }
.rich-content h3 { font-size: 20px; font-weight: bold; line-height: 1.4; margin: 8px 0 12px; color: #1b2d4a; }

/* 列表 */
.rich-content ul,
.rich-content ol {
  margin: 0 0 12px 22px;
  padding: 0;
}
.rich-content li { margin-bottom: 8px; }

/* 引用：编辑器最终效果 = 默认 content.css（左边线 #ccc 2px、margin-left 1.5rem、padding-left 1rem）
   + content_style（背景 / 文字色 / 上下边距） */
.rich-content blockquote {
  margin: 10px 0 14px 1.5rem;
  padding: 10px 14px 10px 1rem;
  border-left: 2px solid #ccc;
  background: #f7faff;
  color: #33405d;
}

/* 分割线 */
.rich-content hr {
  border: 0;
  border-top: 1px solid #dce5ff;
  margin: 14px 0;
}

/* 视频（取自 content_style） */
.rich-content video { max-width: 100%; display: block; margin: 10px 0; }
.rich-content video:not([height]) { height: auto; }

/* figure / figcaption（取自 TinyMCE 默认 content.css） */
.rich-content figure { display: table; margin: 1rem auto; }
.rich-content figcaption { color: #999; display: block; margin-top: .25rem; text-align: center; }

/* 表格（取自 TinyMCE 默认 content.css） */
.rich-content table { border-collapse: collapse; }
.rich-content table:not([cellpadding]) td,
.rich-content table:not([cellpadding]) th { padding: .4rem; }
.rich-content table[border]:not([border="0"]):not([style*=border-width]) td,
.rich-content table[border]:not([border="0"]):not([style*=border-width]) th { border-width: 1px; }
.rich-content table[border]:not([border="0"]):not([style*=border-style]) td,
.rich-content table[border]:not([border="0"]):not([style*=border-style]) th { border-style: solid; }
.rich-content table[border]:not([border="0"]):not([style*=border-color]) td,
.rich-content table[border]:not([border="0"]):not([style*=border-color]) th { border-color: #ccc; }

/* 代码（取自 TinyMCE 默认 content.css；pre 走浏览器默认，无深色背景） */
.rich-content code { background-color: #e8e8e8; border-radius: 3px; padding: .1rem .2rem; }
