/* ============================================
   wangeditor v5 富文本内容公共样式
   用于渲染 wangeditor v5 编辑器输出的 HTML 内容
   页面内容容器添加 class="wang-editor-content" 即可生效
   ============================================ */

/* --- 段落 --- */
.wang-editor-content p {
  margin: 0.75em 0;
  white-space: pre-wrap;
}

/* --- 标题：恢复浏览器默认 --- */
.wang-editor-content h1,
.wang-editor-content h2,
.wang-editor-content h3,
.wang-editor-content h4,
.wang-editor-content h5,
.wang-editor-content h6 {
  margin: revert;
  padding: revert;
  font-weight: revert;
  font-size: revert;
  line-height: revert;
  color: revert;
  font-family: revert;
}

/* --- 斜体 --- */
.wang-editor-content em,
.wang-editor-content i {
  font-style: italic;
}

/* --- 加粗 --- */
.wang-editor-content b,
.wang-editor-content strong {
  font-weight: bold;
}

/* --- 下划线 --- */
.wang-editor-content u {
  text-decoration: underline;
}

/* --- 删除线 --- */
.wang-editor-content s {
  text-decoration: line-through;
}

/* --- 行内代码 --- */
.wang-editor-content code {
  padding: 2px 4px;
  overflow: auto;
  font-family: monospace;
  background-color: #eee;
  border-radius: 3px;
}

/* --- 代码块 --- */
.wang-editor-content pre > code {
  display: block;
  padding: 1em;
  margin: 0.5em 0;
  overflow: auto;
  font-size: 0.875em;
  hyphens: none;
  line-height: 1.5;
  text-align: left;
  text-indent: 0;
  text-shadow: 0 1px #fff;
  word-break: normal;
  word-wrap: normal;
  tab-size: 4;
  white-space: pre;
  background-color: #f5f2f0;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  word-spacing: normal;
}

/* --- 引用块 --- */
.wang-editor-content blockquote {
  padding: 10px 15px;
  margin: 10px 0;
  background-color: #f1f1f1;
  border-left: 4px solid #d0e5f2;
}

/* --- 无序列表 --- */
.wang-editor-content ul {
  padding-left: 2em;
  list-style: disc;
}

/* --- 有序列表 --- */
.wang-editor-content ol {
  padding-left: 2em;
  list-style: decimal;
}

/* --- 列表项 --- */
.wang-editor-content li {
  margin: 0.25em 0;
  white-space: pre-wrap;
}

/* --- 表格 --- */
.wang-editor-content table {
  border-collapse: collapse;
}

.wang-editor-content td,
.wang-editor-content th {
  min-width: 30px;
  padding: 3px 5px;
  border: 1px solid #ccc;
  text-align: left;
}

.wang-editor-content th {
  background-color: #f1f1f1;
}

/* --- 媒体 --- */
.wang-editor-content img,
.wang-editor-content video,
.wang-editor-content audio {
  max-width: 100%;
}

/* --- 隐藏图片/视频后紧跟的 <br> --- */
.wang-editor-content img + br,
.wang-editor-content video + br {
  display: none;
}

/* --- 复选框 --- */
.wang-editor-content input[type="checkbox"] {
  margin-right: 5px;
}
