/* https://github.com/antfu/prism-theme-vars */
@use './base.scss';

:root {
  --prism-font-family: 'IBM Plex Mono',source-code-pro,Menlo,Monaco,Consolas,'Courier New',monospace;
  --prism-font-size: 0.85rem;
  --prism-marker-opacity: 0;
}

html:not(.dark) {
  --prism-foreground: #393a34;
  --prism-background: #fafafa;
  --prism-inline-background: #f5f5f5;
  --prism-comment: #a0ada0;
  --prism-string: #b56959;
  --prism-literal: #2f8a89;
  --prism-number: #296aa3;
  --prism-keyword: #1c6b48;
  --prism-function: #6c7834;
  --prism-boolean: #1c6b48;
  --prism-constant: #a65e2b;
  --prism-deleted: #a14f55;
  --prism-class: #2993a3;
  --prism-builtin: #ab5959;
  --prism-property: #b58451;
  --prism-namespace: #b05a78;
  --prism-punctuation: #8e8f8b;
  --prism-decorator: #bd8f8f;
  --prism-regex: #ab5e3f;
  --prism-json-property: #698c96;
}

html.dark {
  --prism-scheme: dark;
  --prism-foreground: #d4cfbf;
  --prism-background: #181818;
  --prism-comment: #758575;
  --prism-string: #d48372;
  --prism-literal: #429988;
  --prism-keyword: #4d9375;
  --prism-boolean: #1c6b48;
  --prism-number: #6394bf;
  --prism-variable: #c2b36e;
  --prism-function: #a1b567;
  --prism-deleted: #bc6066;
  --prism-class: #54b1bf;
  --prism-builtin: #e0a569;
  --prism-property: #dd8e6e;
  --prism-namespace: #db889a;
  --prism-punctuation: #858585;
  --prism-decorator: #bd8f8f;
  --prism-regex: #ab5e3f;
  --prism-json-property: #6b8b9e;
  --prism-line-number: #888888;
  --prism-line-number-gutter: #eeeeee;
  --prism-line-highlight-background: #444444;
  --prism-selection-background: #444444;
  --prism-inline-background: #2d2d2d;
}


.token.title {
  color: var(--prism-keyword);
}

/* Overrides */

:not(pre) > code {
  background: var(--prism-inline-background);
  padding: 1px 6px;
  border-radius: 3px;
}

a > code {
  color: var(--c-brand-dark);
}

div[class*='language-'] {
  position: relative;
}

div[class*='language-'] pre {
  margin: 0;
  z-index: 1;
}

div[class*='language-'] code {
  font-size: var(--prism-font-size);
  font-family: var(--prism-font-family);
}

/* Line highlighting */

.highlight-lines {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  padding: var(--prism-block-padding-y) 0;
  width: 100%;
  line-height: var(--prism-line-height);
  font-family: var(--prism-font-family);
  font-size: var(--prism-font-size);
  user-select: none;
  overflow: hidden;
  z-index: -1;
}

.highlight-lines .highlighted {
  background-color: var(--prism-line-highlight-background);
}
