/*
 * VS Code "Dark+" theme for Prism.
 * Colours taken from the default dark_plus token colours so highlighted code
 * on the site matches what you see in the editor.
 */

code[class*="language-"],
pre[class*="language-"] {
  color: #d4d4d4;
  background: none;
  font-family: 'DM Mono', 'Cascadia Code', 'Fira Code', Consolas, Monaco, monospace;
  font-size: 13.5px;
  line-height: 1.7;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  tab-size: 2;
  hyphens: none;
}

pre[class*="language-"] {
  position: relative;
  margin: 22px 0;
  padding: 20px 22px;
  overflow: auto;
  background: #1e1e1e;
  border: 1px solid #2d2d2d;
  border-radius: 10px;
}

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

/* ── Tokens ──
   Grouped by VS Code's dark_plus colour rather than by Prism's naming, so it is
   obvious which things are meant to look alike. */

/* Comments — green, italic */
.token.comment,
.token.prolog,
.token.cdata               { color: #6a9955; font-style: italic; }

/* Plain punctuation and operators stay foreground grey */
.token.doctype,
.token.punctuation,
.token.operator,
.token.entity,
.token.url                 { color: #d4d4d4; background: none; }
.token.namespace           { opacity: .8; }

/* Identifiers, properties, parameters — light blue */
.token.property,
.token.constant,
.token.symbol,
.token.parameter,
.token.attr-name,
.token.char,
.token.builtin,
.token.interpolation,
.token.deleted,
.token.inserted            { color: #9cdcfe; }

/* Numbers — pale green */
.token.number,
.token.boolean             { color: #b5cea8; }

/* Strings — terracotta */
.token.string,
.token.regex               { color: #ce9178; }

/* Keywords and language delimiters (<?php ?>) — blue */
.token.atrule,
.token.keyword,
.token.delimiter,
.token.important           { color: #569cd6; }

/* Functions — yellow */
.token.function,
.token.function-definition { color: #dcdcaa; }

/* Types and class names — teal */
.token.class-name,
.token.maybe-class-name    { color: #4ec9b0; }

/* Variables — light blue, matching VS Code rather than Prism's default red */
.token.variable            { color: #9cdcfe; }

/* CSS/SCSS selectors — sand */
.token.selector            { color: #d7ba7d; }

.token.important,
.token.bold                { font-weight: bold; }
.token.italic              { font-style: italic; }
.token.entity              { cursor: help; }

/* HTML/JSX tags and attributes */
.token.tag                 { color: #569cd6; }
.token.tag .token.punctuation { color: #808080; }
.token.attr-name           { color: #9cdcfe; }
.token.attr-value          { color: #ce9178; }
.token.attr-value .token.punctuation { color: #ce9178; }

/* ── Language label + copy button ── */
.code-block-wrap { position: relative; }
.code-block-wrap .code-lang {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  font-family: 'DM Mono', monospace; font-size: 10.5px;
  letter-spacing: .06em; text-transform: uppercase;
  color: #858585; pointer-events: none;
}
.code-block-wrap .code-copy-btn {
  position: absolute; top: 8px; right: 10px; z-index: 3;
  display: none; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 6px; cursor: pointer;
  background: #2d2d2d; border: 1px solid #3d3d3d; color: #cccccc;
  font-family: 'Outfit', sans-serif; font-size: 11.5px; font-weight: 600;
}
.code-block-wrap:hover .code-copy-btn { display: inline-flex; }
.code-block-wrap:hover .code-lang { opacity: 0; }
.code-block-wrap .code-copy-btn:hover { background: #37373d; color: #fff; }
.code-block-wrap .code-copy-btn.done { color: #4ec9b0; border-color: #4ec9b0; }

/* Scrollbar inside code blocks */
pre[class*="language-"]::-webkit-scrollbar { height: 10px; width: 10px; }
pre[class*="language-"]::-webkit-scrollbar-track { background: #1e1e1e; }
pre[class*="language-"]::-webkit-scrollbar-thumb { background: #424242; border-radius: 5px; }
pre[class*="language-"]::-webkit-scrollbar-thumb:hover { background: #4f4f4f; }
