[data-theme="dark"] .vp-code span {
  color: var(--shiki-dark, rgba(235, 235, 245, 0.6));
}

html:not([data-theme="dark"]) .vp-code span {
  color: var(--shiki-light, rgba(60, 60, 67, 0.78));
}

.vp-doc div[class*="language-"],
.vp-block {
  position: relative;
  margin: 16px -24px;
  overflow-x: auto;
  background-color: var(--vp-code-block-bg);
  transition: background-color var(--vp-t-color);

  scrollbar-width: thin;
}

@media (min-width: 640px) {
  .vp-doc div[class*="language-"],
  .vp-block {
    margin: 16px 0;
    border-radius: 8px;
  }
}

@media (max-width: 639px) {
  .vp-doc li div[class*="language-"] {
    border-radius: 8px 0 0 8px;
  }
}

.vp-doc div[class*="language-"] + div[class*="language-"] {
  margin-top: -8px;
}

.vp-doc div[class*="language-"]::before {
  position: absolute;
  top: 5px;
  right: 1em;
  z-index: 3;
  font-size: 0.75rem;
  color: var(--vp-code-line-number-color);
  content: attr(data-title);
  transition: color var(--vp-t-color);
}

.vp-doc div[class*="language-"] code {
  display: block;
  width: fit-content;
  min-width: 100%;
  padding: 0 24px;
  font-size: var(--vp-code-font-size);
  line-height: var(--vp-code-line-height);
  color: var(--vp-code-block-color);
  transition: background-color var(--vp-t-color), color var(--vp-t-color);

  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

.vp-doc div[class*="language-"] pre {
  position: relative;
  z-index: 1;
  padding: 20px 0;
  margin: 0;
  overflow-x: auto;
  background: transparent;
}

@media (min-width: 640px) {
  .vp-doc div[class*="language-"] pre {
    border-radius: 6px;
  }
}

.vp-doc div[class*="language-"] pre,
.vp-doc div[class*="language-"] code {
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;

  /* rtl:ignore */
  text-align: left;
  word-break: normal;
  word-wrap: normal;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  white-space: pre;
  word-spacing: normal;

  /* rtl:ignore */
  direction: ltr;
}

.vp-doc div[class*="language-"]:not(.line-numbers-mode) .line-numbers {
  display: none;
}

.vp-doc div[class*="language-"].line-numbers-mode {
  /* rtl:ignore */
  padding-left: 32px;
}

.vp-doc div[class*="language-"].line-numbers-mode .line-numbers {
  position: absolute;
  top: 0;
  bottom: 0;

  /* rtl:ignore */
  left: 0;
  z-index: 3;
  width: 32px;
  padding-top: 20px;
  font-family: var(--vp-font-family-mono);
  font-size: var(--vp-code-font-size);
  line-height: var(--vp-code-line-height);
  color: var(--vp-code-line-number-color);
  text-align: center;

  /* rtl:ignore */
  border-right: 1px solid var(--vp-code-block-divider-color);
  transition: border-right var(--vp-t-color), color var(--vp-t-color);
}

.vp-doc div[class*="language-"].line-numbers-mode .line-numbers .line-number {
  position: relative;
  z-index: 3;
  user-select: none;
}

.vp-doc div[class*="language-"].line-numbers-mode .line-numbers .line-number::before {
  content: counter(line-number);
  counter-increment: line-number;
}

@media print {
  .vp-doc div[class*="language-"].line-numbers-mode {
    padding-left: 0;
  }

  .vp-doc div[class*="language-"].line-numbers-mode .line-numbers {
    display: none;
  }
}

@media (max-width: 639px) {
  .vp-doc li div[class*="language-"] {
    border-radius: 8px 0 0 8px;
  }
}

.vp-doc div[class*="language-"] code .highlighted {
  z-index: 2;
  display: inline-block;
  width: calc(100% + 48px);
  padding: 0 24px;
  margin: 0 -24px;
  background-color: var(--vp-code-line-highlight-color);
  transition: background-color 0.5s;
}

.vp-doc div[class*="language-"] code .highlighted.error {
  background-color: var(--vp-code-line-error-color);
}

.vp-doc div[class*="language-"] code .highlighted.warning {
  background-color: var(--vp-code-line-warning-color);
}

.vp-doc div[class*="language-"] code .highlighted-word {
  padding: 1px 3px;
  margin: -1px -3px;
  background-color: var(--vp-c-gray-soft);
  border: 1px solid var(--vp-c-border);
  border-radius: 4px;
}

.vp-doc div[class*="language-"] code .tab,
.vp-doc div[class*="language-"] code .space {
  position: relative;
}

.vp-doc div[class*="language-"] code .tab::before {
  position: absolute;
  content: "⇥";
  opacity: 0.3;
}

.vp-doc div[class*="language-"] code .space::before {
  position: absolute;
  content: "·";
  opacity: 0.3;
}

.vp-doc div[class*="language-"] code .diff {
  display: inline-block;
  width: calc(100% + 48px);
  padding: 0 24px;
  margin: 0 -24px;
  transition: background-color 0.5s;
}

.vp-doc div[class*="language-"] code .diff::before {
  position: absolute;
  left: 10px;
}

.vp-doc div[class*="language-"] code .diff.remove {
  background-color: var(--vp-code-line-diff-remove-color);
  opacity: 0.7;
}

.vp-doc div[class*="language-"] code .diff.remove::before {
  color: var(--vp-code-line-diff-remove-symbol-color);
  content: "-";
  transform: translateX(-6px);
}

.vp-doc div[class*="language-"] code .diff.add {
  background-color: var(--vp-code-line-diff-add-color);
}

.vp-doc div[class*="language-"] code .diff.add::before {
  color: var(--vp-code-line-diff-add-symbol-color);
  content: "+";
  transform: translateX(-6px);
}

.vp-doc div[class*="language-"] .has-focused-lines .line:not(.has-focus) {
  filter: blur(0.095rem);
  opacity: 0.7;
  transition: filter 0.35s, opacity 0.35s;
}

.vp-doc div[class*="language-"]:hover .has-focused-lines .line:not(.has-focus) {
  filter: blur(0);
  opacity: 1;
}

.vp-doc div[class*="language-"] button.copy {
  position: absolute;
  top: 12px;

  /* rtl:ignore */
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background-color: var(--vp-code-copy-code-bg);
  background-image: var(--vp-icon-copy);
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 20px;
  border: 1px solid var(--vp-code-copy-code-border-color);
  border-radius: 4px;
  opacity: 0;
  transition: border-color 0.25s, background-color 0.25s, opacity 0.25s;

  /* rtl:ignore */
  direction: ltr;
}

.vp-doc div[class*="language-"]:hover > button.copy,
.vp-doc div[class*="language-"] > button.copy:focus,
.vp-doc div[class*="language-"] > button.copy.copied {
  opacity: 1;
}

.vp-doc div[class*="language-"] > button.copy:hover,
.vp-doc div[class*="language-"] > button.copy.copied {
  background-color: var(--vp-code-copy-code-hover-bg);
  border-color: var(--vp-code-copy-code-hover-border-color);
}

.vp-doc div[class*="language-"] > button.copy.copied,
.vp-doc div[class*="language-"] > button.copy:hover.copied {
  background-color: var(--vp-code-copy-code-hover-bg);
  background-image: var(--vp-icon-copied);

  /* rtl:ignore */
  border-radius: 0 4px 4px 0;
}

.vp-doc div[class*="language-"] > button.copy.copied::before,
.vp-doc div[class*="language-"] > button.copy:hover.copied::before {
  position: relative;
  top: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: 40px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--vp-code-copy-code-active-text);
  text-align: center;
  white-space: nowrap;
  content: attr(data-copied);
  background-color: var(--vp-code-copy-code-hover-bg);
  border: 1px solid var(--vp-code-copy-code-hover-border-color);

  /* rtl:ignore */
  border-right: 0;
  border-radius: 4px 0 0 4px;

  /* rtl:ignore */
  transform: translateX(calc(-100% - 1px));
}

@media (max-width: 419px) {
  .vp-doc div[class*="language-"] > button.copy {
    display: none;
  }
}

/*
  Collapsed lines
  --------------------------------------------------------------------------
 */

.vp-doc div[class*="language-"].has-collapsed.collapsed {
  height: calc(var(--vp-collapsed-lines) * var(--vp-code-line-height) * var(--vp-code-font-size) + 62px);
  overflow-y: hidden;
}

@property --vp-code-bg-collapsed-lines {
  inherits: false;
  initial-value: #fff;
  syntax: "<color>";
}

.vp-doc div[class*="language-"].has-collapsed .collapsed-lines {
  --vp-code-bg-collapsed-lines: var(--vp-code-block-bg);

  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  cursor: pointer;
  background: linear-gradient(to bottom, transparent 0%, var(--vp-code-bg-collapsed-lines) 50%, var(--vp-code-bg-collapsed-lines) 100%);
  transition: --vp-code-bg-collapsed-lines var(--vp-t-color);
}

.vp-doc div[class*="language-"].has-collapsed .collapsed-lines:hover {
  --vp-code-bg-collapsed-lines: var(--vp-c-default-soft);
}

.vp-doc div[class*="language-"].has-collapsed .collapsed-lines::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='m18 12l-6 6l-6-6m12-6l-6 6l-6-6'/%3E%3C/svg%3E");
  --trans-rotate: 0deg;

  display: inline-block;
  width: 24px;
  height: 24px;
  pointer-events: none;
  content: "";
  background-color: var(--vp-code-block-color);
  -webkit-mask-image: var(--icon);
  mask-image: var(--icon);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 50%;
  mask-position: 50%;
  -webkit-mask-size: 20px;
  mask-size: 20px;
  animation: code-collapsed-lines 1.2s infinite alternate-reverse ease-in-out;
}

.vp-doc div[class*="language-"].has-collapsed:not(.collapsed) code {
  padding-bottom: 20px;
}

.vp-doc div[class*="language-"].has-collapsed:not(.collapsed) .collapsed-lines:hover {
  --vp-code-bg-collapsed-lines: transparent;
}

.vp-doc div[class*="language-"].has-collapsed:not(.collapsed) .collapsed-lines::before {
  --trans-rotate: 180deg;
}

@keyframes code-collapsed-lines {
  0% {
    opacity: 0.3;
    transform: translateY(-2px) rotate(var(--trans-rotate));
  }

  100% {
    opacity: 1;
    transform: translateY(2px) rotate(var(--trans-rotate));
  }
}
