.worked-example > .csharp-example {
  background: #1e1e1e;
}

.worked-example > .csharp-example > .language-csharp,
body.light .panel .worked-example > .csharp-example > .language-csharp {
  color: #d4d4d4;
}

.csharp-example :is(.hljs-keyword, .hljs-built_in, .hljs-literal) {
  color: #569cd6;
}

.csharp-example .hljs-control {
  color: #c586c0;
}

.csharp-example .hljs-string {
  color: #ce9178;
}

.csharp-example .hljs-number {
  color: #b5cea8;
}

.csharp-example :is(.hljs-comment, .hljs-doctag) {
  color: #6a9955;
}

.csharp-example :is(.hljs-type, .hljs-title.class_) {
  color: #4ec9b0;
}

.csharp-example :is(.hljs-title.function_, .hljs-function .hljs-title) {
  color: #dcdcaa;
}

.csharp-example .hljs-subst {
  color: #d4d4d4;
}

.code-highlight-frame {
  position: relative;
  flex: 1;
  min-width: 0;
  background: #1e1e1e;
}

.code-highlight-frame > .code-highlight-mirror {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  margin: 0;
  border-color: transparent;
  background: transparent;
  color: #d4d4d4;
  white-space: pre;
  overflow: hidden;
  resize: none;
  pointer-events: none;
}

.code-highlight-mirror > code {
  display: block;
  font: inherit;
  color: inherit;
  tab-size: inherit;
  white-space: inherit;
}

.code-highlight-frame > .code-highlight-input {
  position: relative;
  display: block;
  min-width: 0;
  background: transparent;
  caret-color: #fff;
  -webkit-text-fill-color: transparent;
  font-variant-ligatures: none;
}

.code-highlight-frame > .code-highlight-input:focus {
  outline: 1px solid #72849a;
  outline-offset: -1px;
}

.code-highlight-mirror { font-variant-ligatures: none; }

.code-completion {
  position: absolute;
  z-index: 2;
  width: min(17rem, 100%);
  max-height: min(11rem, 46%);
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  font: .85rem/1.45 ui-monospace, Consolas, monospace;
}
.code-completion [role="option"] { padding: 5px 8px; border-radius: 5px; overflow-wrap: anywhere; cursor: pointer; }
.code-completion [role="option"]:is([aria-selected="true"],:hover) { background: var(--surface-3); color: var(--title); }
.code-completion-ruler { position: absolute; width: max-content; visibility: hidden; white-space: pre; font-variant-ligatures: none; pointer-events: none; }

.code-style-feedback {
  margin: 10px 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: .875rem;
}
.code-style-feedback p { margin: 3px 0 0; color: var(--soft); }
.code-style-feedback ul {
  max-height: 10rem;
  overflow-y: auto;
  margin: 6px 0 0;
  padding-inline-start: 1.25rem;
}
.code-style-feedback li { overflow-wrap: anywhere; }
.code-style-feedback code { color: inherit; }

.code-highlight-input::selection {
  background: rgb(38 107 170 / 55%);
}

@media (forced-colors: active) {
  .code-highlight-mirror { display: none; }
  .code-highlight-frame > .code-highlight-input {
    -webkit-text-fill-color: CanvasText;
    caret-color: CanvasText;
    background: Canvas;
  }
  .code-highlight-frame > .code-highlight-input:focus { outline-color: Highlight; }
}
