/* prism-twilight.css
   Custom Twilight-style theme for Prism.js based on original SyntaxHighlighter Twilight palette */

.outer-pre {
  background: transparent !important;
  padding: 0 !important;
}

code[class*="language-"],
pre[class*="language-"] {
  color: #ffffff;
  background: #1e1e1e;
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 14px;
  line-height: 0.9 !important;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  tab-size: 4;
  hyphens: none;
  border: none;
  border-radius: 4px;
}

/* Consistent spacing fix */
pre[class*="language-"] {
  overflow: auto !important;
  white-space: pre-wrap !important;
  line-height: 0.9 !important;
  margin: 1.5em 0;
  padding: .875em .75em .875em .75em;
  z-index: 0;
}

code[class*="language-"] {
  display: block;
  padding: .75em;
}

/* Prevent inline token spacing issues */
code span.token {
  display: inline;
  line-height: inherit;
  margin: 0;
  padding: 0;
}

/* Syntax highlighting */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #666666;
}

.token.punctuation {
  color: #ffffff;
}

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

.token.boolean,
.token.number {
  color: #c16d50;
}

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

.token.operator,
.token.entity,
.token.url,
.token.variable {
  color: #ffffff;
}

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

.token.keyword {
  color: #ffffff;
}

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

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

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

/* Selection styling */
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
  background: #264f78;
}

pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"]::selection {
  background: #264f78;
}

/* Line numbers plugin (optional) */
pre[class*="language-"][data-line] {
  position: relative;
  padding-left: 3.8em;
  counter-reset: linenumber;
}

pre[class*="language-"][data-line]>code {
  position: relative;
}

.line-numbers .line-numbers-rows {
  border-right: 1px solid #444;
}

.line-numbers-rows>span:before {
  color: #666666;
}


/* Copy button styling */
div.code-toolbar {
  position: relative;
}

div.code-toolbar>.toolbar {
  position: absolute;
  display: block;
  top: 0.5em !important;
  right: 0.5em !important;
  /*opacity: 0;*/
  /*transition: opacity 0.3s ease-in-out;*/
  z-index: 1;
}

div.code-toolbar:hover>.toolbar {
  opacity: 1;
}

div.code-toolbar>.toolbar .toolbar-item {
  background: transparent;
  color: #fff;
  border-radius: 0;
  padding: 0;
  font-size: 14px;
  cursor: pointer;
}

div.code-toolbar>.toolbar>.toolbar-item>a,
div.code-toolbar>.toolbar>.toolbar-item>button,
div.code-toolbar>.toolbar>.toolbar-item>span {
  color: #cccccc !important;
  font-size: 14px !important;
  padding: 0.5em .5em !important;
  background: rgb(56, 56, 56) !important;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .5) !important;
  border-radius: 1.5em !important;
  min-width: 80px !important;
}

div.code-toolbar>.toolbar>.toolbar-item>a:hover,
div.code-toolbar>.toolbar>.toolbar-item>button:hover,
div.code-toolbar>.toolbar>.toolbar-item>span:hover {
  color: #eeeeee !important;
  background: rgb(73, 73, 73) !important;
}

/* Pseudocode-specific styling */
.language-pseudocode .token.keyword {
  color: #ffcc66;
  /* Soft yellow for algorithmic keywords like IF, THEN, WHILE */
}

.language-pseudocode .token.function {
  color: #aaffaa;
  /* Soft green for procedure names */
}

.language-pseudocode .token.string {
  color: #ccccff;
  /* Light purple for any "text" used */
}

.language-pseudocode .token.comment {
  color: #888888;
  /* Dim grey for comments */
}

.language-pseudocode .token.operator {
  color: #ffffff;
  /* Keep operators like := readable */
}

.language-pseudocode .token.variable {
  color: #ffffff;
  /* White for general variables */
}

/* Alias to match the shortcode [pseudo] */
.language-pseudo .token.keyword,
.language-pseudo .token.function,
.language-pseudo .token.string,
.language-pseudo .token.comment,
.language-pseudo .token.operator,
.language-pseudo .token.variable {
  /* inherit the same colors as .language-pseudocode */
}

/* JSON-specific styling */
.token.key {
  color: #f7eda3;
}

.token.string {
  color: #939e70;
}

.token.number {
  color: #c16d50;
}

.token.boolean {
  color: #c16d50;
}

/* SQL-specific styling */
.language-sql .token.keyword {
  color: #ffcc66;
  /* SELECT, INSERT, CREATE, etc. */
}

.language-sql .token.function {
  color: #a3d2ff;
  /* COUNT, SUM, NOW, etc. */
}

.language-sql .token.string {
  color: #939e70;
}

.language-sql .token.number,
.language-sql .token.boolean {
  color: #c16d50;
}

.language-sql .token.comment {
  color: #888888;
}

.language-sql .token.operator {
  color: #ffffff;
}

.language-sql .token.variable {
  color: #f7eda3;
  /* e.g., :id, @var */
}

/* YANG-specific styling */
.language-yang .token.keyword {
  color: #ffcc66;
  /* module, container, leaf, type, uses, when, must, etc. */
}

.language-yang .token.builtin {
  color: #aaffaa;
  /* built-in types: string, int32, boolean */
}

.language-yang .token.string {
  color: #ccccff;
}

.language-yang .token.number {
  color: #c16d50;
}

.language-yang .token.operator {
  color: #ffffff;
}

.language-yang .token.comment {
  color: #888888;
}

.language-yang .token.class-name {
  color: #ffffff;
  /* identifiers like module names */
}

.language-yang .token.property {
  color: #f7eda3;
}

/* Cypher-specific styling */
.language-cypher .token.keyword {
  color: #ffcc66;
  /* MATCH, RETURN, CREATE, MERGE, WHERE, ORDER BY, LIMIT, etc. */
}

.language-cypher .token.function {
  color: #a3d2ff;
  /* size(), labels(), id(), toLower(), etc. */
}

.language-cypher .token.string {
  color: #939e70;
}

.language-cypher .token.number,
.language-cypher .token.boolean {
  color: #c16d50;
}

.language-cypher .token.operator {
  color: #ffffff;
}

.language-cypher .token.comment {
  color: #888888;
}

.language-cypher .token.variable {
  color: #f7eda3;
  /* $param, variables like n, p, r */
}

.language-cypher .token.property {
  color: #f7eda3;
  /* node.property */
}

.language-cypher .token.class-name {
  color: #ffffff;
  /* labels & relationship types e.g., :Person, :FRIEND_OF */
}

/* Ensure preserved whitespace and prevent hyphenation/ligatures */
pre[class*="language-"],
code[class*="language-"] {
  white-space: pre;
  /* preserve exact spaces/newlines */
  -webkit-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
  font-variant-ligatures: none;
}

/* Normalize vertical rhythm inside Prism blocks */
pre[class*="language-"],
code[class*="language-"] {
  line-height: 1.5;
  /* consistent, readable leading */
}

pre[class*="language-"] .token {
  line-height: inherit;
  /* ensure tokens don't override */
}

/* Final spacing overrides */
pre[class*="language-"],
pre[class*="language-"] code[class*="language-"],
code[class*="language-"] {
  white-space: pre !important;
  /* preserve exact spaces/newlines */
  line-height: 1.4 !important;
  /* normalize vertical rhythm */
  font-variant-ligatures: none !important;
  -webkit-hyphens: none !important;
  -ms-hyphens: none !important;
  hyphens: none !important;
}

pre[class*="language-"] .token,
code[class*="language-"] .token {
  display: inline !important;
  line-height: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Enforce whitespace inheritance so indentation is preserved inside tokens */
pre[class*="language-"] *,
code[class*="language-"] * {
  white-space: inherit !important;
}