/* =============================================================
   Claude Code Course — Design System
   prism.css: Self-contained Syntax Highlighting (Dark Theme)
   No external dependency — token colors only.
   ============================================================= */

/* ---------------------------------------------------------------
   Base Code Block Reset
   (Prism adds .language-* class to <code> and <pre>)
--------------------------------------------------------------- */
code[class*="language-"],
pre[class*="language-"] {
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", "SF Mono",
    "Consolas", "Liberation Mono", "Menlo", monospace;
  font-size: 0.875rem;
  line-height: 1.7;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  tab-size: 2;
  hyphens: none;
  color: #c9d1d9;
  background: none;
}

pre[class*="language-"] {
  overflow: auto;
  padding: 1.25rem 1.5rem;
  margin: 0;
}

/* Inline code with language class */
:not(pre) > code[class*="language-"] {
  padding: 0.125em 0.375em;
  border-radius: 4px;
  background-color: #161b22;
  white-space: nowrap;
}

/* ---------------------------------------------------------------
   Tokens
--------------------------------------------------------------- */

/* Comments — gray */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #8b949e;
  font-style: italic;
}

/* Punctuation — light gray */
.token.punctuation {
  color: #c9d1d9;
}

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

/* Keywords — red/orange */
.token.keyword,
.token.tag,
.token.deleted,
.token.important {
  color: #ff7b72;
}

/* Control flow / reserved words */
.token.control,
.token.directive,
.token.unit,
.token.statement {
  color: #ff7b72;
}

/* Strings — light blue */
.token.string,
.token.attr-value,
.token.regex,
.token.char {
  color: #a5d6ff;
}

/* Template literal expressions */
.token.template-string .token.interpolation .token.interpolation-punctuation {
  color: #ff7b72;
}

/* Functions — purple */
.token.function,
.token.function-name,
.token.method {
  color: #d2a8ff;
}

/* Numbers — blue */
.token.number,
.token.boolean,
.token.constant,
.token.hexcode,
.token.color {
  color: #79c0ff;
}

/* Operators — red/orange (same as keyword) */
.token.operator,
.token.entity,
.token.url {
  color: #ff7b72;
}

/* Class names / types — orange */
.token.class-name,
.token.type,
.token.type-definition {
  color: #ffa657;
}

/* Variables / symbols */
.token.variable,
.token.symbol {
  color: #c9d1d9;
}

/* Properties / attributes */
.token.property,
.token.attr-name,
.token.selector,
.token.id {
  color: #79c0ff;
}

/* Inserted (diff) */
.token.inserted {
  color: #3fb950;
  background-color: rgba(63, 185, 80, 0.08);
}

/* Deleted (diff) */
.token.deleted {
  color: #f85149;
  background-color: rgba(248, 81, 73, 0.08);
}

/* Bold / Italic (Markdown) */
.token.bold {
  font-weight: 700;
  color: #c9d1d9;
}

.token.italic {
  font-style: italic;
  color: #8b949e;
}

/* ---------------------------------------------------------------
   Shell / Bash Specific
--------------------------------------------------------------- */

/* Prompt character */
.language-bash .token.punctuation,
.language-shell .token.punctuation {
  color: #8b949e;
}

/* Flags (e.g. --flag) */
.language-bash .token.parameter,
.language-shell .token.parameter {
  color: #ffa657;
}

/* ---------------------------------------------------------------
   JSON
--------------------------------------------------------------- */
.language-json .token.property {
  color: #79c0ff;
}

.language-json .token.string {
  color: #a5d6ff;
}

.language-json .token.boolean,
.language-json .token.null.keyword {
  color: #ff7b72;
}

/* ---------------------------------------------------------------
   CSS
--------------------------------------------------------------- */
.language-css .token.property {
  color: #79c0ff;
}

.language-css .token.function {
  color: #d2a8ff;
}

.language-css .token.url .token.string {
  color: #a5d6ff;
}

/* ---------------------------------------------------------------
   HTML / JSX / TSX
--------------------------------------------------------------- */
.language-html .token.tag .token.tag,
.language-jsx .token.tag .token.tag,
.language-tsx .token.tag .token.tag {
  color: #7ee787;
}

.language-html .token.tag .token.attr-name,
.language-jsx .token.tag .token.attr-name,
.language-tsx .token.tag .token.attr-name {
  color: #ffa657;
}

/* ---------------------------------------------------------------
   Diff
--------------------------------------------------------------- */
.language-diff .token.coord {
  color: #79c0ff;
}

.language-diff .token.deleted {
  color: #f85149;
}

.language-diff .token.inserted {
  color: #3fb950;
}

/* ---------------------------------------------------------------
   Line Highlighting (Prism line-highlight plugin)
--------------------------------------------------------------- */
.line-highlight {
  background: rgba(247, 129, 102, 0.07);
  border-left: 2px solid var(--accent, #f78166);
  margin-left: -1.5rem;
  padding-left: 1.25rem;
}

/* ---------------------------------------------------------------
   Line Numbers (Prism line-numbers plugin)
--------------------------------------------------------------- */
.line-numbers .line-numbers-rows {
  border-right: 1px solid #30363d;
  padding-right: 0.5rem;
}

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

/* ---------------------------------------------------------------
   Light Theme Overrides
   Applied when html.light is set
--------------------------------------------------------------- */
html.light code[class*="language-"],
html.light pre[class*="language-"] {
  color: #24292f;
}

html.light .token.comment,
html.light .token.prolog,
html.light .token.doctype,
html.light .token.cdata {
  color: #6e7781;
}

html.light .token.punctuation {
  color: #24292f;
}

html.light .token.keyword,
html.light .token.tag,
html.light .token.deleted,
html.light .token.important {
  color: #cf222e;
}

html.light .token.string,
html.light .token.attr-value,
html.light .token.regex,
html.light .token.char {
  color: #0a3069;
}

html.light .token.function,
html.light .token.function-name,
html.light .token.method {
  color: #8250df;
}

html.light .token.number,
html.light .token.boolean,
html.light .token.constant {
  color: #0550ae;
}

html.light .token.operator,
html.light .token.entity,
html.light .token.url {
  color: #cf222e;
}

html.light .token.class-name,
html.light .token.type,
html.light .token.type-definition {
  color: #953800;
}

html.light .token.property,
html.light .token.attr-name,
html.light .token.selector {
  color: #0550ae;
}

html.light .token.inserted {
  color: #116329;
  background-color: rgba(17, 99, 41, 0.08);
}

html.light .token.deleted {
  color: #82071e;
  background-color: rgba(130, 7, 30, 0.08);
}

html.light .line-numbers-rows > span::before {
  color: #9198a1;
}
