/* AnvilCode dark theme (ported from service-lab, cm-servicelab.css, recoloured to the lab palette) for embedded read-only CodeMirror 5 code blocks.
   The hosting <pre> keeps its site styling (background/border/padding come
   from site.css), so the
   editor surface itself stays transparent and always sits on the site's dark
   panel. Everything CodeMirror would normally paint light (selection, gutter
   and scrollbar fillers) is overridden to the site palette here. */

.cm-s-anvil.CodeMirror {
  height: auto;
  background: transparent;
  color: #F3F1EA;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.prose pre.cm-host .cm-s-anvil.CodeMirror {
  font-size: 15px;
  line-height: 1.6;
}

.prose pre.cm-host .cm-s-anvil .CodeMirror-scroll {
  overflow-y: hidden;
  overflow-x: auto;
}

.prose pre.cm-host .cm-s-anvil .CodeMirror-lines {
  padding: 0;
  /* blocks are non-editable (readOnly: "nocursor") — don't invite clicking
     with the text-selection I-beam */
  cursor: default;
}

.prose pre.cm-host .cm-s-anvil pre.CodeMirror-line,
.prose pre.cm-host .cm-s-anvil pre.CodeMirror-line-like {
  padding: 0;
}

.prose pre.cm-host .cm-s-anvil .CodeMirror-cursor {
  display: none;
}

/* selection in the site teal instead of CM's default light gray */
.cm-s-anvil .CodeMirror-selected {
  background: rgba(60, 199, 176, 0.25);
}

.cm-s-anvil.CodeMirror-focused .CodeMirror-selected {
  background: rgba(60, 199, 176, 0.38);
}

/* CM paints these white by default — keep them on the site's panel colour */
.cm-s-anvil .CodeMirror-gutters,
.cm-s-anvil .CodeMirror-scrollbar-filler,
.cm-s-anvil .CodeMirror-gutter-filler {
  background: #18232F;
}

.cm-s-anvil .CodeMirror-activeline-background {
  background: rgba(255, 255, 255, 0.04);
}

/* token colors */
.cm-s-anvil .cm-keyword {
  color: #F2B24A;
}

.cm-s-anvil .cm-def {
  color: #3CC7B0;
}

.cm-s-anvil .cm-builtin {
  color: #7FD9CB;
}

.cm-s-anvil .cm-string {
  color: #A5D6A7;
}

.cm-s-anvil .cm-number {
  color: #F2B374;
}

.cm-s-anvil .cm-atom {
  color: #EF9B9B;
}

.cm-s-anvil .cm-comment {
  color: #6B7A88;
  font-style: italic;
}

.cm-s-anvil .cm-meta {
  color: #FFE3A3;
}

.cm-s-anvil .cm-operator {
  color: #B9C4CE;
}

.cm-s-anvil .cm-variable {
  color: #F3F1EA;
}

.cm-s-anvil .cm-variable-2 {
  color: #E6E3D7;
}

.cm-s-anvil .cm-qualifier {
  color: #FFE3A3;
}

@media (max-width: 767px) {
  .prose pre.cm-host .cm-s-anvil.CodeMirror {
    font-size: 12px;
  }
}
