/* ==========================================================================
   Prism.js Tomahawk Dark Theme
   Custom syntax highlighting theme matching the Tomahawk portal dark theme
   ========================================================================== */

code[class*="language-"],
pre[class*="language-"] {
    color: #E0E0E0;
    background: none;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.6;
    tab-size: 4;
    hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
    padding: 1.25rem;
    margin: 1.5rem 0;
    overflow: auto;
    border-radius: 8px;
    background-color: #1E1E1E;
    border: 1px solid #333333;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
    background: #1E1E1E;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
    padding: 0.2em 0.4em;
    border-radius: 4px;
    white-space: normal;
    background-color: #252525;
    border: 1px solid #333333;
}

/* Token Colors - VS Code Dark+ inspired with Tomahawk accent */

/* Comments */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6A9955;
    font-style: italic;
}

/* Punctuation */
.token.punctuation {
    color: #9E9E9E;
}

/* Namespace */
.token.namespace {
    opacity: 0.7;
}

/* Strings */
.token.string,
.token.attr-value {
    color: #CE9178;
}

/* Operators, entities */
.token.operator,
.token.entity,
.token.url {
    color: #D4D4D4;
}

/* Keywords */
.token.keyword {
    color: #569CD6;
    font-weight: 500;
}

/* Control flow keywords */
.token.control-flow {
    color: #C586C0;
}

/* Booleans, numbers, constants */
.token.boolean,
.token.number,
.token.constant {
    color: #B5CEA8;
}

/* Symbols, deleted */
.token.symbol,
.token.deleted {
    color: #EF5350;
}

/* Functions */
.token.function {
    color: #DCDCAA;
}

/* Built-in functions */
.token.builtin {
    color: #4EC9B0;
}

/* Classes, types */
.token.class-name,
.token.type-name {
    color: #4EC9B0;
}

/* Tags (HTML/XML) */
.token.tag {
    color: #569CD6;
}

/* Attribute names */
.token.attr-name {
    color: #9CDCFE;
}

/* Selectors (CSS) */
.token.selector {
    color: #D7BA7D;
}

/* Properties (CSS) */
.token.property {
    color: #9CDCFE;
}

/* Variables */
.token.variable {
    color: #9CDCFE;
}

/* Regex */
.token.regex {
    color: #D16969;
}

/* Important, bold */
.token.important,
.token.bold {
    font-weight: bold;
}

/* Italic */
.token.italic {
    font-style: italic;
}

/* Entity */
.token.entity {
    cursor: help;
}

/* Inserted */
.token.inserted {
    color: #B5CEA8;
}

/* Atrule */
.token.atrule {
    color: #C586C0;
}

/* Char */
.token.char {
    color: #CE9178;
}

/* Annotation, decorator */
.token.annotation,
.token.decorator {
    color: #DCDCAA;
}

/* =========================================================================
   Language-specific overrides
   ========================================================================= */

/* JSON */
.language-json .token.property {
    color: #9CDCFE;
}

.language-json .token.string {
    color: #CE9178;
}

.language-json .token.number {
    color: #B5CEA8;
}

.language-json .token.boolean,
.language-json .token.null {
    color: #569CD6;
}

/* CSS */
.language-css .token.selector {
    color: #D7BA7D;
}

.language-css .token.property {
    color: #9CDCFE;
}

.language-css .token.function {
    color: #DCDCAA;
}

.language-css .token.string {
    color: #CE9178;
}

.language-css .token.number,
.language-css .token.unit {
    color: #B5CEA8;
}

/* HTML/Markup */
.language-markup .token.tag,
.language-html .token.tag {
    color: #569CD6;
}

.language-markup .token.attr-name,
.language-html .token.attr-name {
    color: #9CDCFE;
}

.language-markup .token.attr-value,
.language-html .token.attr-value {
    color: #CE9178;
}

/* JavaScript/TypeScript */
.language-javascript .token.template-string,
.language-typescript .token.template-string {
    color: #CE9178;
}

.language-javascript .token.template-punctuation,
.language-typescript .token.template-punctuation {
    color: #569CD6;
}

/* C# */
.language-csharp .token.keyword {
    color: #569CD6;
}

.language-csharp .token.class-name {
    color: #4EC9B0;
}

.language-csharp .token.string {
    color: #CE9178;
}

.language-csharp .token.function {
    color: #DCDCAA;
}

/* SQL */
.language-sql .token.keyword {
    color: #569CD6;
    text-transform: uppercase;
}

.language-sql .token.function {
    color: #DCDCAA;
}

/* Bash/Shell */
.language-bash .token.function {
    color: #DCDCAA;
}

.language-bash .token.variable {
    color: #9CDCFE;
}

/* Python */
.language-python .token.builtin {
    color: #4EC9B0;
}

.language-python .token.decorator {
    color: #DCDCAA;
}

/* Markdown */
.language-markdown .token.title {
    color: #569CD6;
    font-weight: bold;
}

.language-markdown .token.bold {
    font-weight: bold;
    color: #E0E0E0;
}

.language-markdown .token.italic {
    font-style: italic;
    color: #B0BEC5;
}

.language-markdown .token.url {
    color: #64B5F6;
}

.language-markdown .token.code {
    color: #CE9178;
}

/* =========================================================================
   Line numbers (if using line-numbers plugin)
   ========================================================================= */
pre[class*="language-"].line-numbers {
    position: relative;
    padding-left: 3.8em;
    counter-reset: linenumber;
}

pre[class*="language-"].line-numbers > code {
    position: relative;
    white-space: inherit;
}

.line-numbers .line-numbers-rows {
    position: absolute;
    pointer-events: none;
    top: 0;
    font-size: 100%;
    left: -3.8em;
    width: 3em;
    letter-spacing: -1px;
    border-right: 1px solid #333333;
    user-select: none;
}

.line-numbers-rows > span {
    display: block;
    counter-increment: linenumber;
}

.line-numbers-rows > span:before {
    content: counter(linenumber);
    color: #4a4a4a;
    display: block;
    padding-right: 0.8em;
    text-align: right;
}

/* =========================================================================
   Toolbar (if using toolbar plugin)
   ========================================================================= */
div.code-toolbar {
    position: relative;
}

div.code-toolbar > .toolbar {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}

div.code-toolbar:hover > .toolbar {
    opacity: 1;
}

div.code-toolbar > .toolbar .toolbar-item {
    display: inline-block;
}

div.code-toolbar > .toolbar a,
div.code-toolbar > .toolbar button,
div.code-toolbar > .toolbar span {
    color: #9E9E9E;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: #252525;
    border: 1px solid #333333;
    border-radius: 4px;
    cursor: pointer;
}

div.code-toolbar > .toolbar a:hover,
div.code-toolbar > .toolbar button:hover,
div.code-toolbar > .toolbar span:hover {
    color: #E0E0E0;
    background: #333333;
}

/* =========================================================================
   Diff highlighting
   ========================================================================= */
pre.diff-highlight > code .token.deleted:not(.prefix),
pre > code.diff-highlight .token.deleted:not(.prefix) {
    background-color: rgba(239, 83, 80, 0.15);
    display: inline-block;
    width: 100%;
}

pre.diff-highlight > code .token.inserted:not(.prefix),
pre > code.diff-highlight .token.inserted:not(.prefix) {
    background-color: rgba(102, 187, 106, 0.15);
    display: inline-block;
    width: 100%;
}

/* =========================================================================
   Selection
   ========================================================================= */
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection,
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection {
    background: rgba(100, 181, 246, 0.3);
    color: inherit;
}

code[class*="language-"]::selection,
code[class*="language-"] ::selection,
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection {
    background: rgba(100, 181, 246, 0.3);
    color: inherit;
}

/* =========================================================================
   Print
   ========================================================================= */
@media print {
    code[class*="language-"],
    pre[class*="language-"] {
        text-shadow: none;
    }
}
