/* PrismJS Syntax Highlighting - Cursor Dark Mode Style */
/* Uses existing oklch color variables from main.css */

/* Base code block styling */
pre[class*="language-"],
code[class*="language-"] {
    color: var(--color-content);
    font-family: var(--font-mono);
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: var(--leading-150);
    tab-size: 4;
    hyphens: none;
}

pre[class*="language-"] {
    background: var(--color-background);
    border-radius: var(--radius-8);
}

code[class*="language-"] {
    padding: 0.1em 0.3em;
    border-radius: var(--radius-2);
}

/* When code is inside pre, preserve whitespace */
pre[class*="language-"] > code[class*="language-"] {
    padding: 0;
    white-space: pre;
    display: block;
}

/* Comments */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: var(--color-code-comment);
    font-style: italic;
}

/* Strings */
.token.string,
.token.attr-value {
    color: var(--color-code-magenta);
}

/* Keywords */
.token.keyword,
.token.operator,
.token.boolean,
.token.number,
.token.constant,
.token.atrule {
    color: var(--color-code-teal);
}

/* Functions and methods */
.token.function,
.token.function-name {
    color: var(--color-code-orange);
}

/* Punctuation and brackets */
.token.punctuation,
.token.bracket {
    color: var(--color-code-yellow-bright);
}

/* Variables and parameters */
.token.variable,
.token.parameter {
    color: var(--color-code-purple);
}

/* Built-in types (Array, Object, etc.) */
.token.class-name {
    color: var(--color-code-blue);
}

/* Global objects (console, document, window, etc.) */
.token.builtin {
    color: var(--color-headline);
}

/* Properties and method calls on objects */
.token.property {
    color: var(--color-code-yellow);
}

/* Selectors and tags */
.token.selector,
.token.tag {
    color: var(--color-code-yellow);
}

/* Namespace */
.token.namespace {
    color: var(--color-code-blue);
}

/* Important/at-rules */
.token.important {
    color: var(--color-code-red);
    font-weight: bold;
}

/* Regex */
.token.regex {
    color: var(--color-code-green);
}

/* Inserted/deleted (for diff syntax) */
.token.inserted {
    background-color: oklch(var(--lch-code-green) / 0.2);
    color: var(--color-code-green);
}

.token.deleted {
    background-color: oklch(var(--lch-code-red) / 0.2);
    color: var(--color-code-red);
}

/* Make the + and - characters unselectable for copy/paste */
.token.prefix.unchanged,
.token.prefix.inserted,
.token.prefix.deleted {
    -webkit-user-select: none;
    user-select: none;
}

/* Optional: full-width background color for diff */
.token.inserted:not(.prefix),
.token.deleted:not(.prefix) {
    display: block;
}

/* Selection */
pre[class*="language-"]::selection,
code[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"] ::selection {
    background: oklch(var(--lch-highlight) / 0.3);
}

/* Line numbers (if used) */
.line-numbers .line-numbers-rows > span:before {
    color: var(--color-code-comment);
}

