/* PrismJS custom theme for KX documentation */

[class*="language-"] ::selection {
  color: #000;
  background: hsl(214, 100%, 85%);
}

pre[class*="language-"] {
  overflow: auto;
  margin: 0;
  background-color: transparent;
  padding: 1em;
}

code[class*="language-"] {
  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.5;
  tab-size: 4;
  hyphens: none;
}

/* Dark mode colors (Okaidia colors without background) */
[data-theme="dark"] code[class*="language-"],
[data-theme="dark"] pre[class*="language-"] {
  color: #f8f8f2;  /* Okaidia text color */
  background: #22252c;
}

/* Token styling for dark mode */
[data-theme="dark"] .token.comment,
[data-theme="dark"] .token.block-comment,
[data-theme="dark"] .token.prolog,
[data-theme="dark"] .token.doctype,
[data-theme="dark"] .token.cdata {
  color: #8292a2;
}

[data-theme="dark"] .token.punctuation {
  color: #f8f8f2;
}

[data-theme="dark"] .token.tag,
[data-theme="dark"] .token.attr-name,
[data-theme="dark"] .token.namespace,
[data-theme="dark"] .token.deleted {
  color: #f92672;
}

[data-theme="dark"] .token.function-name,
[data-theme="dark"] .token.function {
  color: #e6db74;
}

[data-theme="dark"] .token.boolean,
[data-theme="dark"] .token.number {
  color: #ae81ff;
}

[data-theme="dark"] .token.property,
[data-theme="dark"] .token.class-name,
[data-theme="dark"] .token.constant,
[data-theme="dark"] .token.symbol {
  color: #f92672;
}

[data-theme="dark"] .token.selector,
[data-theme="dark"] .token.important,
[data-theme="dark"] .token.atrule,
[data-theme="dark"] .token.keyword,
[data-theme="dark"] .token.builtin {
  color: #66d9ef;
}

[data-theme="dark"] .token.string,
[data-theme="dark"] .token.char,
[data-theme="dark"] .token.attr-value,
[data-theme="dark"] .token.regex,
[data-theme="dark"] .token.variable {
  color: #a6e22e;
}

[data-theme="dark"] .token.operator,
[data-theme="dark"] .token.entity,
[data-theme="dark"] .token.url {
  color: #f8f8f2;
}

[data-theme="dark"] .token.important,
[data-theme="dark"] .token.bold {
  font-weight: bold;
}

[data-theme="dark"] .token.italic {
  font-style: italic;
}

[data-theme="dark"] .token.entity {
  cursor: help;
}

[data-theme="dark"] .token.inserted {
  color: #a6e22e;
}

/* Add borders to code blocks and inline code with language classes by default */
pre[class*="language-"],
code[class*="language-"]:not(pre *) {
  border: 1px solid var(--border-neutral-default);
  border-radius: 4px;
  padding: 2px 6px;
}

/* Remove borders when inside code snippet containers */
.code-snippet pre[class*="language-"],
.code-snippets pre[class*="language-"],
.code-response pre[class*="language-"],
.codeSnippet pre[class*="language-"],
.code-snippet code[class*="language-"],
.code-snippets code[class*="language-"],
.code-response code[class*="language-"],
.codeSnippet code[class*="language-"] {
  border: none;
  padding: 0 0 6px 0;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

.token.inserted {
  color: green;
}

/* Light mode token styling */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: slategray;
}

.token.punctuation {
    color: #404651;
}

.token.namespace {
    opacity: .7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #2159b2;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #176752;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #404651;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color:  #2159b2;
}

.token.function,
.token.class-name {
    color:  #404651;
}

.token.regex,
.token.important,
.token.variable {
    color:  #176752;
}

.token.important,
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}

.token.entity {
    cursor: help;
}
