/**
 * TinyMCE 自定义内容样式
 * 用于编辑器内容区域的基础样式
 * 编辑器 body 元素的类名为: .tinymce-editor-content
 */

/* 基础样式 */
.tinymce-editor-content {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  font-size: 14px;
  padding: 8px;
  padding-left: 0;
  color: #333;
  margin: 0;
}

.tinymce-editor-content.is-tinymce {
  padding-left: 8px;
}


.tinymce-editor-content p {
  line-height: 1.5;
  color: #282828;
  margin-bottom: 10px;
}

/* 图片样式 */
.tinymce-editor-content img {
  max-width: 100%;
  height: auto;
}

/* 表格样式 */
.tinymce-editor-content table {
  border-collapse: collapse;
  width: 100%;
}

.tinymce-editor-content table td,
.tinymce-editor-content table th {
  border: 1px solid #ddd;
  padding: 8px;
}

.tinymce-editor-content table th {
  background-color: #f5f7fa;
  font-weight: 600;
}

/* 代码样式 */
.tinymce-editor-content code {
  background-color: #e8e8e8;
  border-radius: 3px;
  padding: 0.1rem 0.2rem;
  font-family: 'Courier New', Courier, monospace;
}

.tinymce-editor-content pre {
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
}

.tinymce-editor-content pre code {
  background-color: transparent;
  padding: 0;
}

/* 引用样式 */
.tinymce-editor-content blockquote {
  border-left: 2px solid #ccc;
  margin-left: 1.5rem;
  padding-left: 1rem;
  color: #666;
}

/* 分隔线样式 */
.tinymce-editor-content hr {
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1rem 0;
}

/* 列表样式 */
.tinymce-editor-content ul,
.tinymce-editor-content ol {
  padding-left: 2rem;
}

/* 链接样式 */
.tinymce-editor-content a {
  color: #409eff;
  text-decoration: none;
}

.tinymce-editor-content a:hover {
  text-decoration: underline;
}

/* 标题样式 */
.tinymce-editor-content h1,
.tinymce-editor-content h2,
.tinymce-editor-content h3,
.tinymce-editor-content h4,
.tinymce-editor-content h5,
.tinymce-editor-content h6 {
  font-weight: 600;
  line-height: normal;
  margin-bottom: 10px;
}

.tinymce-editor-content h1 {
  font-size: 28px;
}

.tinymce-editor-content h2 {
  font-size: 22px;
}

.tinymce-editor-content h3 {
  font-size: 1.17em;
}

.tinymce-editor-content h4 {
  font-size: 1.05em;
}

.tinymce-editor-content h5 {
  font-size: 0.9em;
}

.tinymce-editor-content h6 {
  font-size: 0.8em;
}

/* Figure 和 Figcaption 样式（用于图片说明） */
.tinymce-editor-content figure {
  text-align: center;
  margin: 0;
  margin-bottom: 10px;
}

.tinymce-editor-content figure figcaption {
  line-height: normal !important;
  text-align: center;
  font-size: 0.9em;
}

.tinymce-editor-content table {
  border-collapse: collapse;
  width: 100%;
  border-width: 1px;
}

.tinymce-editor-content table td,
.tinymce-editor-content table th {
  border: 1px solid #ddd;
  padding: 8px;
}

/* mathjax公式 */
.tinymce-editor-content .math-block,
.tinymce-editor-content .math-block mjx-container[jax="CHTML"]{
  display: block;
  text-align: center;
}
.tinymce-editor-content .math-inline{
  display: inline-flex !important;
  overflow-x: auto;
  max-width: 93%;
}
.tinymce-editor-content .math-inline mjx-container[jax="CHTML"],
.tinymce-editor-content .math-inline .math-tex-original{
  display: inline !important;
  overflow-y: hidden;
}
.tinymce-editor-content .math-block .math-tex-original {
  display: block;
  overflow-y: hidden;
}
.tinymce-editor-content .math-inline,
.tinymce-editor-content .math-tex-original{
  text-indent: 0em;
  white-space: normal !important;
}
.tinymce-editor-content mjx-container > mjx-assistive-mml{
  height: 100%;
  padding: 0 !important;
  width: 100% !important;
}
.tinymce-editor-content .math-block .math-tex-original {
  overflow-x: auto;
  max-width: 100%;
}