/* KSP Syntax Highlighting - DarkMonokai Theme
 * For use with mkdocs-ksp-highlight plugin
 * Based on the Sublime Text DarkMonokai KSP theme
 */

/* Code block container - high specificity to override Material theme */
.ksp-code-wrapper .ksp-code {
    background-color: #1c2127 !important;
    color: #E3E3E3 !important;
    font-family: "Fira Code", "Consolas", "Monaco", "Menlo", monospace;
    font-size: 0.9em;
    line-height: 1.5;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0;
}

.ksp-code-wrapper {
    margin: 1em 0;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.ksp-code-wrapper .ksp-code code {
    background: transparent !important;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

/* Syntax highlighting spans - use !important to override Material theme */
.ksp-code .ksp-keyword {
    color: #3399cc !important;
}

.ksp-code .ksp-operator {
    color: #88B4D4 !important;
}

.ksp-code .ksp-variable {
    color: #CCDDDD !important;
}

.ksp-code .ksp-function-def {
    color: #00ff80 !important;
}

.ksp-code .ksp-function-call {
    color: #33FFFF !important;
}

.ksp-code .ksp-function-special {
    color: #FF4444 !important;
}

.ksp-code .ksp-number {
    color: #B891FA !important;
}

.ksp-code .ksp-string {
    color: #CE9178 !important;
}

/* F-string prefix (f) */
.ksp-code .ksp-string-special {
    color: #3399cc !important;
}

.ksp-code .ksp-comment {
    color: #8c9499 !important;
    font-style: italic;
}

.ksp-code .ksp-constant {
    color: #B891FA !important;
}

.ksp-code .ksp-namespace {
    color: #CCDDDD !important;
}

.ksp-code .ksp-property {
    color: #EEEE99 !important;
}

.ksp-code .ksp-punctuation {
    color: #E3E3E3 !important;
}

/* Function parameters */
.ksp-code .ksp-param {
    color: #EEEE99 !important;
}

/* Preprocessor - macros, structs */
.ksp-code .ksp-macro {
    color: #00ff80 !important;
}

.ksp-code .ksp-macro-param {
    color: #FFA500 !important;
    font_style: italic;
}

.ksp-code .ksp-type {
    color: #66D9EF !important;
}

/* ALL_CAPS constants (ENGINE_PAR_*, NI_*, BROWSER_ENTRIES, etc.) */
.ksp-code .ksp-constant-caps {
    color: #FFFF99 !important;
}

/* Python highlighting inside run<< >> / read<< >> blocks
 * Colors from DarkMonokai KSP.sublime-color-scheme (lines 109-152) */
.ksp-code .py-keyword {
    color: #3399cc !important;
}

.ksp-code .py-operator {
    color: #D6E6F2 !important;
}

.ksp-code .py-function {
    color: #FFFF99 !important;
}

.ksp-code .py-builtin {
    color: #00FF80 !important;
}

.ksp-code .py-variable {
    color: #80EFFF !important;
}

.ksp-code .py-type {
    color: #00FF80 !important;
}

.ksp-code .py-string {
    color: #CE9178 !important;
}

.ksp-code .py-number {
    color: #B891FA !important;
}

.ksp-code .py-comment {
    color: #8c9499 !important;
    font-style: italic;
}

/* Define directive names (MODRIX.ROUTE, Polycore.NUM_SOUNDS in define context) */
.ksp-code .ksp-define-name {
    color: #F6A6AF !important;
}

/* Selection styling */
.ksp-code ::selection {
    background-color: #44475a;
}

.ksp-code ::-moz-selection {
    background-color: #44475a;
}

/* Inline KSP code highlighting */
code.ksp-inline {
    background-color: #1c2127 !important;
    color: #E3E3E3 !important;
    font-family: "Fira Code", "Consolas", "Monaco", "Menlo", monospace;
    padding: 0.15em 0.35em;
    border-radius: 3px;
    font-size: 0.9em;
}

code.ksp-inline .ksp-keyword { color: #3399cc !important; }
code.ksp-inline .ksp-operator { color: #88B4D4 !important; }
code.ksp-inline .ksp-variable { color: #CCDDDD !important; }
code.ksp-inline .ksp-function-def { color: #00ff80 !important; }
code.ksp-inline .ksp-function-call { color: #33FFFF !important; }
code.ksp-inline .ksp-function-special { color: #FF4444 !important; }
code.ksp-inline .ksp-number { color: #B891FA !important; }
code.ksp-inline .ksp-string { color: #CE9178 !important; }
code.ksp-inline .ksp-string-special { color: #3399cc !important; }
code.ksp-inline .ksp-comment { color: #8c9499 !important; font-style: italic; }
code.ksp-inline .ksp-constant { color: #B891FA !important; }
code.ksp-inline .ksp-namespace { color: #CCDDDD !important; }
code.ksp-inline .ksp-property { color: #EEEE99 !important; }
code.ksp-inline .ksp-punctuation { color: #E3E3E3 !important; }
code.ksp-inline .ksp-param { color: #EEEE99 !important; }
code.ksp-inline .ksp-macro { color: #00ff80 !important; }
code.ksp-inline .ksp-macro-param { color: #FFA500 !important; font-style: italic; }
code.ksp-inline .ksp-type { color: #66D9EF !important; }
code.ksp-inline .ksp-constant-caps { color: #FFFF99 !important; }
code.ksp-inline .ksp-define-name { color: #F6A6AF !important; }
