/* CodeVox 文件管理代码预览 Prism 主题
   基于项目 CSS 变量（--bg3, --fg, --fg2, --accent, --mono, --border），浅色苹果风 */

pre[class*="language-"],
code[class*="language-"] {
  font-family: var(--mono, "SF Mono", ui-monospace, Menlo, Consolas, monospace);
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg);
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  tab-size: 4;
  hyphens: none;
  background: transparent;
}

pre[class*="language-"] {
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  background: var(--bg3);
}

:not(pre) > code[class*="language-"] {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg3);
  white-space: normal;
}

/* Tokens */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: var(--fg2);
  font-style: italic;
}

.token.punctuation,
.token.operator {
  color: var(--fg2);
}

.token.namespace {
  opacity: 0.7;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
  color: #c2185b;
}

.token.boolean,
.token.number {
  color: #8b5cf6;
}

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

.token.url,
.token.entity,
.language-css .token.string,
.style .token.string,
.token.variable {
  color: #d97706;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
  color: #d97706;
}

.token.keyword,
.token.important,
.token.rule {
  color: var(--accent, #007aff);
  font-weight: 600;
}

.token.regex {
  color: #a855f7;
}

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

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

.token.entity {
  cursor: help;
}

/* Line numbers plugin */
pre[class*="language-"].line-numbers {
  position: relative;
  padding-left: 3.2em;
  counter-reset: linenumber;
}

pre[class*="language-"].line-numbers > code {
  position: relative;
  white-space: inherit;
}

.line-numbers .line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: 14px;
  font-size: 100%;
  left: -3.2em;
  width: 3em;
  letter-spacing: -1px;
  border-right: 1px solid var(--border);
  user-select: none;
}

.line-numbers-rows > span {
  display: block;
  counter-increment: linenumber;
}

.line-numbers-rows > span:before {
  content: counter(linenumber);
  color: var(--fg2);
  display: block;
  padding-right: 0.8em;
  text-align: right;
}
