/* PrismJS 主题（TinyMCE codesample 编辑器内 + 页面展示共用）
   仅负责代码块外观与 token 配色；高亮逻辑由 Prism JS 在编辑器/展示时执行。 */

code[class*="language-"],
pre[class*="language-"] {
  color: #393a34;
  background: none;
  font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;
  font-size: 13px;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  line-height: 1.5;
  tab-size: 4;
  hyphens: none;
}

/* 代码块容器：带底色与边框，和正文明显区分，避免“像两段文本” */
pre[class*="language-"] {
  position: relative;
  margin: 0.6em 0;
  padding: 0.9em 1em;
  overflow: auto;
  border-radius: 6px;
  background: #f6f8fa;
  border: 1px solid #e5e7eb;
}

/* 行内 code 不应用代码块底色（与 rich-content code 区分） */
:not(pre) > code[class*="language-"] {
  padding: 0.15em 0.3em;
  border-radius: 3px;
  background: #f6f8fa;
  white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #6a737d;
  font-style: italic;
}

.token.punctuation {
  color: #999;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
  color: #905;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #22863a;
}

.token.operator,
.token.entity,
.token.url,
.token.variable {
  color: #9a6e3a;
  background: rgba(255, 255, 255, 0.5);
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #d73a49;
  font-weight: 600;
}

.token.function,
.token.class-name {
  color: #6f42c1;
}

.token.regex,
.token.important {
  color: #e90;
}

.token.important,
.token.bold {
  font-weight: 700;
}

.token.italic {
  font-style: italic;
}

.token.namespace {
  opacity: 0.7;
}
