/* Custom Theme by Kran
C++, C# colours from Rider, Python colours from VSCode. The idea is to more or less match my own dev environment as I'm the one using the code previews anyway :)
https://github.com/PrismJS/prism-themes/blob/master/themes/prism-vsc-dark-plus.css
https://prismjs.com/download.html?themes#themes=prism-okaidia&languages=markup+clike+c+csharp+cpp+python+rust&plugins=line-numbers+match-braces
*/
pre,
code {
    color: #bdbdbd;
    font-size: 14px;
    text-shadow: none;
    font-family: "JetBrains Mono", monospace;
    direction: ltr;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: 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;
}

pre[class*="language-py"],
code[class*="language-py"] {
    color: #9cdcfe;
}

pre[class*="language-"]::selection,
code[class*="language-"]::selection,
pre[class*="language-"] *::selection,
code[class*="language-"] *::selection {
    text-shadow: none;
    background: #264f78;
}

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

pre {
    padding: 1em;
    margin: 0.5em 0;
    overflow: auto;
    background: #1f1f1f;
    border-radius: var(--bs-border-radius-lg) !important;
}

:not(pre) > code {
    padding: 0.1em 0.3em;
    border-radius: 0.3em;
    color: #bdbdbd;
    background: #1f1f1f;
}

.namespace {
    opacity: 0.7;
}

.token.doctype .token.doctype-tag {
    color: #569cd6;
}

.token.doctype .token.name {
    color: #9cdcfe;
}

.token.comment,
.token.prolog {
    color: #83c16a;
}

[class*="language-py"] .token.comment {
    color: #6a9955;
}

.token.boolean,
.token.constant,
.token.inserted,
.token.number,
.token.symbol,
.token.tag,
.token.unit {
    color: #e991bd;
}

[class*="language-py"] .token.number {
    color: #b5cea8;
}

.token.attr-name,
.token.builtin,
.token.char,
.token.deleted,
.token.selector,
.token.string {
    color: #c69f6b;
}

[class*="language-py"] .token.string {
    color: #ce9178;
}

.language-css .token.string.url {
    text-decoration: underline;
}

.token.entity,
.token.operator {
    color: #bdbdbd;
}

[class*="language-py"] .token.operator {
    color: #d4d4d4;
}

.token.operator.arrow {
    color: #569cd6;
}

.token.atrule {
    color: #ce9178;
}

.token.atrule .token.rule {
    color: #c586c0;
}

.token.atrule .token.url {
    color: #9cdcfe;
}

.token.atrule .token.url .token.function {
    color: #dcdcaa;
}

.token.atrule .token.url .token.punctuation,
.token.punctuation {
    color: #bdbdbd;
}

[class*="language-py"] .token.punctuation {
    color: #d4d4d4;
}

.token.property,
.token.keyword {
    color: #6a92e8;
}

[class*="language-py"] .token.keyword {
    color: #c586c0;
}

.token.keyword.control-flow,
.token.keyword.module {
    color: #c586c0;
}

.token.function,
.token.function .token.maybe-class-name {
    color: #38ca99;
}

[class*="language-py"] .token.function,
[class*="language-py"] .token.builtin {
    color: #dcdcaa;
}

.token.regex {
    color: #d16969;
}

.token.important {
    color: #569cd6;
}

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

.token.constant {
    color: #9cdcfe;
}

.token.class-name,
.token.maybe-class-name {
    color: #c191ff;
}

[class*="language-py"] .token.class-name,
[class*="language-py"] .token.maybe-class-name {
    color: #4ec9b0;
}

.token.console {
    color: #9cdcfe;
}

.token.parameter {
    color: #9cdcfe;
}

.token.interpolation {
    color: #66c3cc;
    font-weight: bold;
}

[class*="language-py"] .token.interpolation {
    color: #9cdcfe;
    font-weight: normal;
}

.token.punctuation {
    font-weight: normal;
}

.token.boolean {
    color: #569cd6;
}

.token.exports .token.maybe-class-name,
.token.imports .token.maybe-class-name,
.token.variable {
    color: #9cdcfe;
}

.token.selector {
    color: #d7ba7d;
}

.token.escape {
    color: #ce81c2;
}

.token.tag {
    color: #569cd6;
}

.token.tag .token.punctuation {
    color: #808080;
}

.token.cdata {
    color: #808080;
}

.token.attr-name {
    color: #9cdcfe;
}

.token.attr-value,
.token.attr-value .token.punctuation {
    color: #ce9178;
}

.token.entity {
    color: #569cd6;
}

.token.namespace {
    color: #4ec9b0;
}

[class*="language-py"] .token.format-spec,
[class*="language-py"] .token.conversion-option {
    color: #569cd6;
}

pre[class*="language-javascript"],
code[class*="language-javascript"],
pre[class*="language-jsx"],
code[class*="language-jsx"],
pre[class*="language-typescript"],
code[class*="language-typescript"],
pre[class*="language-tsx"],
code[class*="language-tsx"] {
    color: #9cdcfe;
}

pre[class*="language-css"],
code[class*="language-css"] {
    color: #ce9178;
}

pre[class*="language-html"],
code[class*="language-html"] {
    color: #bdbdbd;
}

.language-regex .token.anchor {
    color: #dcdcaa;
}

.language-html .token.punctuation {
    color: #808080;
}

pre[class*="language-"] > code[class*="language-"] {
    position: relative;
    z-index: 1;
}

.line-highlight.line-highlight {
    background: #f7ebc6;
    box-shadow: inset 5px 0 0 #f7d87c;
    z-index: 0;
}

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;
    min-width: 3em;
    letter-spacing: -1px;
    border-right: 1px solid #404040;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    padding-right: 10px;
}

.line-numbers-rows > span {
    display: block;
    counter-increment: linenumber;
}

.line-numbers-rows > span:before {
    content: counter(linenumber);
    color: #7e7e7e;
    display: block;
    text-align: right;
}

.rainbow-braces [class*="language-py"] .token.punctuation.brace-level-1,
.rainbow-braces [class*="language-py"] .token.punctuation.brace-level-4,
.rainbow-braces [class*="language-py"] .token.punctuation.brace-level-7 {
    color: #ffd700;
    opacity: 1;
}
.rainbow-braces [class*="language-py"] .token.punctuation.brace-level-2,
.rainbow-braces [class*="language-py"] .token.punctuation.brace-level-5,
.rainbow-braces [class*="language-py"] .token.punctuation.brace-level-8 {
    color: #da70d6;
    opacity: 1;
}
.rainbow-braces [class*="language-py"] .token.punctuation.brace-level-3,
.rainbow-braces [class*="language-py"] .token.punctuation.brace-level-6,
.rainbow-braces [class*="language-py"] .token.punctuation.brace-level-9 {
    color: #179fff;
    opacity: 1;
}

div.code-toolbar {
    position: relative;
}

div.code-toolbar > .toolbar {
    position: absolute;
    z-index: 10;
    top: 0.3em;
    right: 0.2em;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}

div.code-toolbar:hover > .toolbar {
    opacity: 1;
}

/* Separate line b/c rules are thrown out if selector is invalid.
   IE11 and old Edge versions don't support :focus-within. */
div.code-toolbar:focus-within > .toolbar {
    opacity: 1;
}

div.code-toolbar > .toolbar > .toolbar-item {
    display: inline-block;
}

div.code-toolbar > .toolbar > .toolbar-item > a {
    cursor: pointer;
}

div.code-toolbar > .toolbar > .toolbar-item > button {
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    line-height: normal;
    overflow: visible;
    padding: 0;
    -webkit-user-select: none; /* for button */
    -moz-user-select: none;
    -ms-user-select: none;
}

div.code-toolbar > .toolbar > .toolbar-item > a,
div.code-toolbar > .toolbar > .toolbar-item > button,
div.code-toolbar > .toolbar > .toolbar-item > span {
    color: #bbb;
    font-size: 0.8em;
    padding: 0.5em;
    background: #f5f2f0;
    background: rgba(224, 224, 224, 0.2);
    box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2);
    border-radius: 0.5em;
    margin: 0.8em;
}

div.code-toolbar > .toolbar > .toolbar-item > a:hover,
div.code-toolbar > .toolbar > .toolbar-item > a:focus,
div.code-toolbar > .toolbar > .toolbar-item > button:hover,
div.code-toolbar > .toolbar > .toolbar-item > button:focus,
div.code-toolbar > .toolbar > .toolbar-item > span:hover,
div.code-toolbar > .toolbar > .toolbar-item > span:focus {
    color: inherit;
    text-decoration: none;
}
