/* 
 * Nord Theme for Prism.js
 * Based on the Nord color palette: https://www.nordtheme.com/
 * Maintains the blackboard aesthetic with proper Nord colors
 */

/* Code blocks */
code[class*="language-"],
pre[class*="language-"] {
    color: #d8dee9; /* nord4 - snow storm */
    background: none;
    text-shadow: 0 1px rgba(0, 0, 0, 0.3);
    font-family: 'Fira Code', 'JetBrains Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 1em;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.5;
    -moz-tab-size: 4;
    -o-tab-size: 4;
    tab-size: 4;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
}

@media print {
    code[class*="language-"],
    pre[class*="language-"] {
        text-shadow: none;
    }
}

/* Code blocks */
pre[class*="language-"] {
    padding: 1em;
    margin: 0.5em 0;
    overflow: auto;
    border-radius: 6px;
    background: #2e3440; /* nord0 - polar night */
    border: 1px solid #434c5e; /* nord2 */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Inline code */
:not(pre) > code[class*="language-"] {
    padding: 0.1em 0.3em;
    border-radius: 3px;
    white-space: normal;
    background: #3b4252; /* nord1 */
    border: 1px solid #4c566a; /* nord3 */
}

/* Tokens */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #616e88; /* nord3 + lighter */
    font-style: italic;
}

.token.punctuation {
    color: #d8dee9; /* nord4 */
    opacity: 0.8;
}

.token.namespace {
    opacity: 0.7;
}

.token.property {
    color: #88c0d0; /* nord8 - frost blue (softer for map keys) */
}

.token.tag,
.token.boolean,
.token.number,
.token.constant {
    color: #d8dee9; /* nord4 - snow storm (same as regular text) */
}

.token.symbol {
    color: #5e81ac; /* nord10 - darker frost blue for hash keys */
}

.token.deleted {
    color: #bf616a; /* nord11 - aurora red (keep red only for deletions) */
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #eceff4; /* nord6 - snow storm (standard white) */
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
    color: #81a1c1; /* nord9 - frost */
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #5e81ac; /* nord10 - frost (for keywords like def, module, class) */
}

.token.function,
.token.class-name {
    color: #88c0d0; /* nord8 - lighter frost blue (for actual names) */
}

.token.regex,
.token.important {
    color: #ebcb8b; /* nord13 - aurora yellow */
}

.token.important,
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}

.token.entity {
    cursor: help;
}

/* Language-specific overrides */
.language-json .token.property {
    color: #8fbcbb; /* nord7 - frost teal (even softer for JSON keys) */
}

.language-json .token.string {
    color: #eceff4; /* nord6 - snow storm (standard white) */
}

.language-markdown .token.title {
    color: #5e81ac; /* nord10 - frost */
    font-weight: bold;
}

.language-markdown .token.code {
    color: #d08770; /* nord12 - aurora orange */
}

/* Python-specific styling */
.language-python .token.keyword {
    color: #5e81ac; /* nord10 - darker frost (keywords) */
}

.language-python .token.function {
    color: #88c0d0; /* nord8 - lighter frost (function names) */
}

.language-python .token.class-name {
    color: #88c0d0; /* nord8 - lighter frost (class names) */
}

/* JavaScript-specific styling */
.language-javascript .token.keyword {
    color: #5e81ac; /* nord10 - darker frost (keywords) */
}

.language-javascript .token.function {
    color: #88c0d0; /* nord8 - lighter frost (function names) */
}

/* CSS-specific styling */
.language-css .token.property {
    color: #88c0d0; /* nord8 - frost */
}

.language-css .token.function {
    color: #5e81ac; /* nord10 - frost */
}

/* Shell/bash styling */
.language-bash .token.function {
    color: #88c0d0; /* nord8 - frost blue */
}

.language-bash .token.keyword {
    color: #5e81ac; /* nord10 - frost */
}

/* Diff styling */
.token.inserted {
    background: rgba(163, 190, 140, 0.2); /* nord14 with transparency */
    color: #a3be8c; /* nord14 */
}

.token.deleted {
    background: rgba(191, 97, 106, 0.2); /* nord11 with transparency */
    color: #bf616a; /* nord11 */
}

/* Line highlighting */
.line-highlight {
    background: rgba(129, 161, 193, 0.08); /* nord9 with low transparency */
    border-left: 3px solid #81a1c1; /* nord9 */
    margin-left: -1em;
    padding-left: calc(1em - 3px);
}

/* Line numbers */
.line-numbers .line-numbers-rows {
    border-right: 1px solid #4c566a; /* nord3 */
}

.line-numbers-rows > span:before {
    color: #616e88; /* nord3 + lighter */
}