/**
 * Prism.js Custom Dark Theme - All-in-one
 * Includes: syntax highlighting, line numbers, toolbar, copy button
 */

/* Base */
code[class*="language-"],
pre[class*="language-"] {
  color: #d4d4d4;
  background: none;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  tab-size: 2;
}

/* Syntax tokens */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #54614b; font-style: italic; }
.token.punctuation { color: #808080; }
.token.property, .token.tag, .token.boolean, .token.number, .token.constant, .token.symbol { color: #b5cea8; }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin { color: #ce9178; }
.token.operator, .token.entity, .token.url { color: #d4d4d4; }
.token.atrule, .token.attr-value, .token.keyword { color: #569cd6; }
.token.function, .token.class-name { color: #dcdcaa; }
.token.regex, .token.important, .token.variable { color: #9cdcfe; }

/* Toolbar wrapper (added by copy-to-clipboard plugin) */
div.code-toolbar {
  position: relative;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  margin: 20px 0;
}

/* The pre element */
div.code-toolbar > pre[class*="language-"],
pre[class*="language-"] {
  margin: 0;
  padding: 20px 20px 20px 3.8em;
  position: relative;
  overflow: auto;
  background: transparent;
  border: none;
  border-radius: 0;
}

/* --- Line numbers (inline, no separate CSS needed) --- */
.line-numbers .line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3em;
  font-size: 12px;
  letter-spacing: -1px;
  border-right: 1px solid #2a2a2a;
  user-select: none;
  padding-top: 20px;
  padding-bottom: 20px;
  box-sizing: border-box;
}
.line-numbers-rows > span {
  display: block;
  counter-increment: linenumber;
}
.line-numbers-rows > span:before {
  content: counter(linenumber);
  color: #444;
  display: block;
  padding-right: 0.8em;
  text-align: right;
  height: 21px;
  line-height: 21px;
}

/* --- Copy button (toolbar) --- */
div.code-toolbar > .toolbar {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 10;
}
div.code-toolbar > .toolbar > .toolbar-item > button {
  background: #21262d;
  color: #8b949e;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
}
div.code-toolbar:hover > .toolbar > .toolbar-item > button {
  opacity: 1;
}
div.code-toolbar > .toolbar > .toolbar-item > button:hover {
  background: #30363d;
  color: #c9d1d9;
  border-color: #8b949e;
}
