/* stylelint-disable no-duplicate-selectors */

@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,400;0,700;1,300;1,700&display=swap');

code[class*='language-'],
pre[class*='language-'] {
  background: none;
  font-family: 'Source Code Pro', Consolas, Monaco, 'Ubuntu Mono', monospace;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: 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;
}

/* Code blocks */
pre[class*='language-'] {
  padding: var(--ld-sp-16);
  overflow: auto;
}

/* Inline code */
:not(pre) > code[class*='language-'] {
  padding: 0.1em;
  white-space: normal;
}

.namespace {
  opacity: 0.7;
}

.token.important,
.token.bold {
  font-weight: 700;
}

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

.token.entity {
  cursor: help;
}

/* line numbers */
pre {
  counter-reset: lineNumber;
}
code .highlight-line::before {
  content: none !important;
}
.highlight-line.highlight-line-active {
  border-radius: var(--ld-br-m);
  padding-right: var(--ld-sp-8);
}

/* ------------------------------------- Colors ------------------------------------- */

@define-mixin docs-code-ui-light {
  code[class*='language-'],
  pre[class*='language-'] {
    color: var(--ld-col-neutral-900);
  }
  :not(pre) > code[class*='language-'],
  pre[class*='language-'] {
    background-color: var(--ld-col-neutral-010);
  }
  .token.comment,
  .token.prolog,
  .token.doctype,
  .token.cdata,
  .token.punctuation {
    color: var(--ld-col-neutral-600);
  }
  .token.property,
  .token.tag,
  .token.constant,
  .token.symbol,
  .token.boolean,
  .token.deleted {
    color: var(--ld-col-vm-600);
  }
  .token.number,
  .token.selector,
  .token.attr-name,
  .token.string,
  .token.char,
  .token.builtin,
  .token.inserted {
    color: var(--ld-col-rg);
  }
  .token.atrule,
  .token.attr-value,
  .token.function,
  .token.class-name {
    color: var(--ld-col-vc-600);
  }
  .token.keyword,
  .token.regex,
  .token.important {
    color: var(--ld-col-rp-600);
  }
  code .highlight-line::before {
    border-right: var(--ld-sp-1) solid var(--ld-col-neutral-100);
    color: var(--ld-col-neutral-300);
  }
  .highlight-line.highlight-line-active {
    background-color: var(--ld-col-vy-100);
  }
}

@define-mixin docs-code-ui-dark {
  code[class*='language-'],
  pre[class*='language-'] {
    color: var(--ld-col-wht);
  }
  :not(pre) > code[class*='language-'],
  pre[class*='language-'] {
    background: var(--ld-col-neutral-900);
  }
  .token.comment,
  .token.prolog,
  .token.doctype,
  .token.cdata,
  .token.punctuation {
    color: var(--ld-col-neutral-300);
  }
  .token.property,
  .token.tag,
  .token.constant,
  .token.symbol,
  .token.boolean,
  .token.deleted {
    color: var(--ld-col-vm);
  }
  .token.number,
  .token.selector,
  .token.attr-name,
  .token.string,
  .token.char,
  .token.builtin,
  .token.inserted {
    color: var(--ld-col-vg);
  }
  .token.atrule,
  .token.attr-value,
  .token.function,
  .token.class-name {
    color: var(--ld-col-vc);
  }
  .token.keyword,
  .token.regex,
  .token.important {
    color: var(--ld-col-rp-300);
  }
  code .highlight-line::before {
    border-right: var(--ld-sp-1) solid var(--ld-col-neutral-800);
    color: var(--ld-col-neutral-600);
  }
  .highlight-line.highlight-line-active {
    background-color: var(--ld-col-vy-100);
    color: var(--ld-col-neutral-900);

    .token.comment,
    .token.prolog,
    .token.doctype,
    .token.cdata,
    .token.punctuation {
      color: var(--ld-col-neutral-600);
    }
    .token.property,
    .token.tag,
    .token.constant,
    .token.symbol,
    .token.boolean,
    .token.deleted {
      color: var(--ld-col-vm-600);
    }
    .token.number,
    .token.selector,
    .token.attr-name,
    .token.string,
    .token.char,
    .token.builtin,
    .token.inserted {
      color: var(--ld-col-rg);
    }
    .token.atrule,
    .token.attr-value,
    .token.function,
    .token.class-name {
      color: var(--ld-col-vc-600);
    }
    .token.keyword,
    .token.regex,
    .token.important {
      color: var(--ld-col-rp-600);
    }
    code .highlight-line::before {
      border-right: var(--ld-sp-1) solid var(--ld-col-neutral-100);
      color: var(--ld-col-neutral-300);
    }
  }
}

@mixin docs-code-ui-light;
@media (prefers-color-scheme: dark) {
  @mixin docs-code-ui-dark;
}
.docs-ui-light {
  @mixin docs-code-ui-light;
}
.docs-ui-dark {
  @mixin docs-code-ui-dark;
}
