@use "../utils" as utils;

/* https://highlightjs.readthedocs.io/en/latest/css-classes-reference.html */

$popup-colors: (
  "theme-popup-bg": #1e2030,
  "theme-popup-border": #6e738d
);

:root {
  --bg: #24273a;
  --fg: #cad3f5;
  --sidebar-bg: #1e2030;
  --sidebar-fg: #cad3f5;
  --sidebar-non-existant: #6e738d;
  --sidebar-active: #8aadf4;
  --sidebar-spacer: #6e738d;
  --scrollbar: #6e738d;
  --icons: #6e738d;
  --icons-hover: #939ab7;
  --links: #8aadf4;
  --inline-code-color: #f5a97f;
  --theme-hover: #363a4f;
  --quote-bg: #1e2030;
  --quote-border: #181926;
  --table-border-color: #363a4f;
  --table-header-bg: #1e2030;
  --table-alternate-bg: #1e2030;
  --searchbar-border-color: #363a4f;
  --searchbar-bg: #1e2030;
  --searchbar-fg: #cad3f5;
  --searchbar-shadow-color: #181926;
  --searchresults-header-fg: #cad3f5;
  --searchresults-border-color: #363a4f;
  --searchresults-li-bg: #24273a;
  --search-mark-bg: #f5a97f;
  --warning-border: #f5a97f;
  --color-scheme: dark;

  @include utils.convert-hsl($popup-colors, -8%);
}

.hljs-keyword {
  color: #c6a0f6;
}

.hljs-built_in {
  color: #ed8796;
}

.hljs-type {
  color: #eed49f;
}

.hljs-literal {
  color: #f5a97f;
}

.hljs-number {
  color: #f5a97f;
}

.hljs-operator {
  color: #91d7e3;
}

.hljs-punctuation {
  color: #b8c0e0;
}

.hljs-property {
  color: #8bd5ca;
}

.hljs-regexp {
  color: #f5bde6;
}

.hljs-string {
  color: #a6da95;
}

.hljs-char.escape_ {
  color: #a6da95;
}

.hljs-subst {
  color: #a5adcb;
}

.hljs-symbol {
  color: #f0c6c6;
}

.hljs-variable {
  color: #c6a0f6;
}

.hljs-variable.language_ {
  color: #c6a0f6;
}

.hljs-variable.constant_ {
  color: #f5a97f;
}

.hljs-title {
  color: #8aadf4;
}

.hljs-title.class_ {
  color: #eed49f;
}

.hljs-title.function_ {
  color: #8aadf4;
}

.hljs-params {
  color: #cad3f5;
}

.hljs-comment {
  color: #939ab7;
}

.hljs-doctag {
  color: #ed8796;
}

.hljs-meta {
  color: #f5a97f;
}

.hljs-section {
  color: #8aadf4;
}

.hljs-tag {
  color: #8bd5ca;
}

.hljs-name {
  color: #c6a0f6;
}

.hljs-attr {
  color: #8aadf4;
}

.hljs-attribute {
  color: #a6da95;
}

.hljs-bullet {
  color: #8bd5ca;
}

.hljs-code {
  color: #a6da95;
}

.hljs-emphasis {
  color: #ed8796;
  font-style: italic;
}

.hljs-strong {
  color: #ed8796;
  font-weight: bold;
}

.hljs-formula {
  color: #8bd5ca;
}

.hljs-link {
  color: #7dc4e4;
  font-style: italic;
}

.hljs-quote {
  color: #a6da95;
  font-style: italic;
}

.hljs-selector-tag {
  color: #eed49f;
}

.hljs-selector-id {
  color: #8aadf4;
}

.hljs-selector-class {
  color: #8bd5ca;
}

.hljs-selector-attr {
  color: #c6a0f6;
}

.hljs-selector-pseudo {
  color: #8bd5ca;
}

.hljs-template-tag {
  color: #f0c6c6;
}

.hljs-template-variable {
  color: #f0c6c6;
}

.hljs-addition {
  color: #a6da95;
  background: rgba(166, 218, 149, 0.15);
}

.hljs-deletion {
  color: #ed8796;
  background: rgba(237, 135, 150, 0.15);
}

pre code {
  color: #cad3f5;
  background: #1e2030;
}

blockquote blockquote {
  border-top: 0.1em solid #5b6078;
  border-bottom: 0.1em solid #5b6078;
}

hr {
  border-color: #5b6078;
  border-style: solid;
}

del {
  color: #939ab7;
}

.tooltiptext {
  background: #1e2030;
  color: #cad3f5;
}

:is(.admonition):is(.admonish-hint, .admonish-important, .admonish-tip) {
  border-color: #eed49f;
}

:is(.admonish-hint, .admonish-important, .admonish-tip)> :is(.admonition-title, summary.admonition-title) {
  background-color: rgba(238, 212, 159, 0.2);
}

:is(.admonish-hint, .admonish-important, .admonish-tip)> :is(.admonition-title, summary.admonition-title)::before {
  background-color: #eed49f;
}

:is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) {
  border-color: #f0c6c6;
}

:is(.admonish-abstract, .admonish-summary, .admonish-tldr)> :is(.admonition-title, summary.admonition-title) {
  background-color: rgba(240, 198, 198, 0.2);
}

:is(.admonish-abstract, .admonish-summary, .admonish-tldr)> :is(.admonition-title, summary.admonition-title)::before {
  background-color: #f0c6c6;
}

:is(.admonition):is(.admonish-example) {
  border-color: #c6a0f6;
}

:is(.admonish-example)> :is(.admonition-title, summary.admonition-title) {
  background-color: rgba(198, 160, 246, 0.2);
}

:is(.admonish-example)> :is(.admonition-title, summary.admonition-title)::before {
  background-color: #c6a0f6;
}

:is(.admonition):is(.admonish-info, .admonish-todo) {
  border-color: #91d7e3;
}

:is(.admonish-info, .admonish-todo)> :is(.admonition-title, summary.admonition-title) {
  background-color: rgba(145, 215, 227, 0.2);
}

:is(.admonish-info, .admonish-todo)> :is(.admonition-title, summary.admonition-title)::before {
  background-color: #91d7e3;
}

:is(.admonition):is(.admonish-check, .admonish-done, .admonish-success) {
  border-color: #a6da95;
}

:is(.admonish-check, .admonish-done, .admonish-success)> :is(.admonition-title, summary.admonition-title) {
  background-color: rgba(166, 218, 149, 0.2);
}

:is(.admonish-check, .admonish-done, .admonish-success)> :is(.admonition-title, summary.admonition-title)::before {
  background-color: #a6da95;
}

:is(.admonition):is(.admonish-note) {
  border-color: #8aadf4;
}

:is(.admonish-note)> :is(.admonition-title, summary.admonition-title) {
  background-color: rgba(138, 173, 244, 0.2);
}

:is(.admonish-note)> :is(.admonition-title, summary.admonition-title)::before {
  background-color: #8aadf4;
}

:is(.admonition):is(.admonish-attention, .admonish-caution, .admonish-warning) {
  border-color: #f5a97f;
}

:is(.admonish-attention, .admonish-caution, .admonish-warning)> :is(.admonition-title, summary.admonition-title) {
  background-color: rgba(245, 169, 127, 0.2);
}

:is(.admonish-attention, .admonish-caution, .admonish-warning)> :is(.admonition-title, summary.admonition-title)::before {
  background-color: #f5a97f;
}

:is(.admonition):is(.admonish-faq, .admonish-help, .admonish-question) {
  border-color: #8bd5ca;
}

:is(.admonish-faq, .admonish-help, .admonish-question)> :is(.admonition-title, summary.admonition-title) {
  background-color: rgba(139, 213, 202, 0.2);
}

:is(.admonish-faq, .admonish-help, .admonish-question)> :is(.admonition-title, summary.admonition-title)::before {
  background-color: #8bd5ca;
}

:is(.admonition):is(.admonish-bug,
  .admonish-danger,
  .admonish-error,
  .admonish-fail,
  .admonish-failure,
  .admonish-missing) {
  border-color: #ed8796;
}

:is(.admonish-bug,
  .admonish-danger,
  .admonish-error,
  .admonish-fail,
  .admonish-failure,
  .admonish-missing)> :is(.admonition-title, summary.admonition-title) {
  background-color: rgba(237, 135, 150, 0.2);
}

:is(.admonish-bug,
  .admonish-danger,
  .admonish-error,
  .admonish-fail,
  .admonish-failure,
  .admonish-missing)> :is(.admonition-title, summary.admonition-title)::before {
  background-color: #ed8796;
}

:is(.admonition):is(.admonish-cite, .admonish-quote) {
  border-color: #f5bde6;
}

:is(.admonish-cite, .admonish-quote)> :is(.admonition-title, summary.admonition-title) {
  background-color: rgba(245, 189, 230, 0.2);
}

:is(.admonish-cite, .admonish-quote)> :is(.admonition-title, summary.admonition-title)::before {
  background-color: #f5bde6;
}
