/* ==========================================================================
   Prism Terminal Dark — prism-terminal.css
   Syntax highlighting theme for thedev.dev
   ========================================================================== */

code[class*='language-'],
pre[class*='language-'] {
  color: #cccccc;
  background: transparent;
  font-family: 'Fira Code', monospace;
  font-size: 0.875rem;
  line-height: 1.65;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  tab-size: 2;
  hyphens: none;
}

/* Code blocks */
pre[class*='language-'] {
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  overflow: auto;
  background: #111111;
  border: 1px solid #222222;
  border-radius: 6px;
}

/* Inline code */
:not(pre) > code[class*='language-'] {
  padding: 0.15em 0.45em;
  border-radius: 3px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.15);
  color: #00ff88;
}

/* Selection */
code[class*='language-']::-moz-selection,
code[class*='language-'] ::-moz-selection,
pre[class*='language-']::-moz-selection,
pre[class*='language-'] ::-moz-selection {
  background: rgba(68, 136, 255, 0.2);
}

code[class*='language-']::selection,
code[class*='language-'] ::selection,
pre[class*='language-']::selection,
pre[class*='language-'] ::selection {
  background: rgba(68, 136, 255, 0.2);
}

/* --- Token colours --- */

/* Comments: muted grey */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #555555;
  font-style: italic;
}

/* Punctuation */
.token.punctuation {
  color: #888888;
}

/* Namespace */
.token.namespace {
  opacity: 0.7;
}

/* Properties, tags, booleans, numbers: terminal green */
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted,
.token.class-name {
  color: #00ff88;
}

/* Strings, attribute values, selectors, char: warm yellow */
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #f0c674;
}

/* Operators, URLs, entity: blue */
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.atrule,
.token.attr-value {
  color: #4488ff;
}

/* Keywords: purple */
.token.keyword {
  color: #aa66ff;
  font-style: normal;
}

/* Control flow / important: purple */
.token.rule,
.token.important,
.token.regex {
  color: #aa66ff;
}

/* Functions, class names: blue */
.token.function {
  color: #4488ff;
}

/* Variables: text body */
.token.variable {
  color: #cccccc;
}

/* Italic */
.token.italic {
  font-style: italic;
}

/* Bold */
.token.bold {
  font-weight: 700;
}

/* --- Line highlighting --- */

.line-highlight {
  background: rgba(0, 255, 136, 0.06);
  border-left: 3px solid #00ff88;
  margin-left: -1.5rem;
  padding-left: calc(1.5rem - 3px);
}

/* --- Line numbers plugin --- */

pre[class*='language-'].line-numbers {
  padding-left: 3.5rem;
  position: relative;
  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: 1.25rem;
  left: 0;
  width: 2.75rem;
  letter-spacing: -1px;
  border-right: 1px solid #1a1a1a;
  user-select: none;
}

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

.line-numbers-rows > span::before {
  content: counter(linenumber);
  color: #555555;
  display: block;
  padding-right: 0.75rem;
  text-align: right;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
}

/* --- Toolbar plugin (copy button etc.) --- */

div.code-toolbar > .toolbar {
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

div.code-toolbar > .toolbar .toolbar-item > button,
div.code-toolbar > .toolbar .toolbar-item > a,
div.code-toolbar > .toolbar .toolbar-item > span {
  font-family: 'Fira Code', monospace;
  font-size: 0.7rem;
  color: #555555;
  background: #111111;
  border: 1px solid #222222;
  border-radius: 3px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

div.code-toolbar > .toolbar .toolbar-item > button:hover,
div.code-toolbar > .toolbar .toolbar-item > a:hover {
  color: #00ff88;
  border-color: #00ff88;
}

/* --- Diff highlight plugin --- */

.token.deleted {
  background: rgba(255, 80, 80, 0.12);
}

.token.inserted {
  background: rgba(0, 255, 136, 0.08);
}
