/*
 * Code Highlight for SupportPal 6.1: dark mode for code blocks.
 *
 * Blocks are stored with inline light theme styles (so emails need no stylesheet), which is also what light mode
 * shows. In dark mode these rules override them, hence !important. Token colours are GitHub's dark theme, checked
 * for 4.5:1 contrast on the dark secondary background.
 */

.sp-theme-dark pre.sp-code-block {
    background: var(--sp-color-secondary, var(--color-background-secondary)) !important;
    border-color: var(--sp-color-tertiary, var(--color-background-tertiary)) !important;
    color: var(--sp-text-color-primary, var(--color-text-primary)) !important;
}

.sp-theme-dark pre.sp-code-block :is(.hljs-keyword, .hljs-doctag, .hljs-template-tag, .hljs-template-variable, .hljs-type) {
    color: #ff7b72 !important;
}

.sp-theme-dark pre.sp-code-block .hljs-title {
    color: #d2a8ff !important;
}

.sp-theme-dark pre.sp-code-block :is(.hljs-attr, .hljs-attribute, .hljs-literal, .hljs-meta, .hljs-number, .hljs-operator,
    .hljs-variable, .hljs-selector-attr, .hljs-selector-class, .hljs-selector-id, .hljs-section) {
    color: #79c0ff !important;
}

.sp-theme-dark pre.sp-code-block :is(.hljs-string, .hljs-regexp, .hljs-meta-string) {
    color: #a5d6ff !important;
}

.sp-theme-dark pre.sp-code-block :is(.hljs-built_in, .hljs-symbol) {
    color: #ffa657 !important;
}

.sp-theme-dark pre.sp-code-block :is(.hljs-comment, .hljs-code, .hljs-formula) {
    color: #a29cba !important;
}

.sp-theme-dark pre.sp-code-block :is(.hljs-name, .hljs-quote, .hljs-selector-tag, .hljs-selector-pseudo) {
    color: #7ee787 !important;
}

.sp-theme-dark pre.sp-code-block .hljs-bullet {
    color: #f2cc60 !important;
}

.sp-theme-dark pre.sp-code-block .hljs-addition {
    color: #aff5b4 !important;
    background: rgba(46, 160, 67, .15) !important;
}

.sp-theme-dark pre.sp-code-block .hljs-deletion {
    color: #ffdcd7 !important;
    background: rgba(248, 81, 73, .15) !important;
}
