
///////////////////////////////////////////////////////////////////////////////

.language-sh pre {
  background: $gray-dark;
  color: white !important;
  -webkit-font-smoothing: antialiased;
  border-left: 4px solid $editor-accent-alt;

  span {
    color: inherit !important;
  }

  span.c {
    color: lighten($gray-light, 15%) !important;
  }
}

///////////////////////////////////////////////////////////////////////////////

.highlight {
  position: relative;
  margin: 1rem 0;
  border-left: 4px solid $editor-accent;
  background: $editor-accent-bg;
}

pre.highlight {
  padding: 0.5rem 1rem;
}

// padding
.editor-content,
.editor .CodeMirror {
  padding: 5px 0;
}

// scrolling & pre margin
.editor-content {
  overflow-y: visible;
  overflow-x: auto;

  pre {
    margin: 0;
  }
}

.editor-code pre {
  color: inherit;
}

.editor-gutter {
  padding-left: 17px; // trying to match code mirror
  padding-right: 8px;
}

// gutter line
.editor-gutter,
.editor .CodeMirror-gutters {
  border-right: 1px solid #ccc;
  border-right: 1px solid lighten($editor-accent, 10%);
}

// line number colors
.editor-line,
.editor .CodeMirror-linenumber {
  color: darken($editor-accent, 5%);
}

.editor-code {
  width: 100%;
}

.editor-code,
.editor .CodeMirror-lines {
  padding-top: 5px;
  padding-bottom: 5px;
}

.editor-code,
.editor .CodeMirror-line {
  padding-left: 10px;
  padding-right: 10px;
}

///////////////////////////////////////////////////////////////////////////////

.editor {
  .CodeMirror {
    font-family: $font-family-monospace;
    height: auto;
    line-height: inherit;
    background: none;
    color: inherit;
  }

  .CodeMirror-gutters {
    background: none;
    padding-right: 5px;
  }

  .CodeMirror-gutter-wrapper,
  .CodeMirror pre {
    font-size: $code-font-size;
  }

  .CodeMirror-scroll {
    position: relative;
  }

  .CodeMirror-gutters {
    min-height: auto;
    height: auto !important;
    position: absolute;
    top: 0;
    bottom: 30px;
  }
}

///////////////////////////////////////////////////////////////////////////////

.editor-messages {
  position: absolute;
  left: -4px;
  right: 0;
}

.flow-error-target {
  position: relative;
  display: inline-block;
  cursor: help;

  &::before {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-bottom: 2px dotted $editor-error-bg;
  }
}

.flow-error-target .flow-error-target::before {
  display: none;
}

.flow-error-target-active {
  background: rgba($editor-error-bg, 0.4);
}

.flow-error-target-active:hover {
  background: rgba($editor-error-bg, 1);
  color: white;

  margin-left: -4px;
  margin-right: -4px;
  padding-left: 4px;
  padding-right: 4px;

  * {
    color: inherit !important;
  }
}

.flow-error-target-active .flow-error-target-active {
  background: transparent;
}

.flow-error {
  display: none;
  z-index: 1;
  background: $editor-error-bg;
  color: white;
  padding: 0.5rem 1rem;
  font-family: $font-family-monospace;

  span {
    display: inline-block;
    padding: 0 0.2em;
    background: rgba(white, 0.2);
  }
}

.flow-error-active {
  display: block;
}

.flow-error .flow-error-highlighted {
  background: white;
  color: $editor-error-bg;
}

// .highlighter-flow ~ span[data-error-id] {
//   display: block;
//   padding: 0.5rem 1rem;
//   background: $editor-error-bg;
//   color: white;
// }

//////////////////////////////////////////////////////////////////////////////

// pre.highlight,
// div.highlight table pre {
//   font-size: 13px;
//   line-height: 20px; }
//
// pre.highlight code {
//   width: 100%;
//   white-space: pre; }


// .language-bash div.highlight table,
// .language-bash pre.highlight code {
//   border-left: 4px solid #6b6b6b;
//   background-color: rgba(138, 138, 138, 0.1); }

// .cli-error div.highlight table,
// .cli-error pre.highlight code {
//   border-left: 4px solid #d64400;
//   background-color: rgba(226, 73, 50, 0.1); }

/* remove space between CLI + CLI error examples */
// div.language-bash + div.cli-error {
//   margin-top: -20px; }

//////////////////////////////////////////////////

// // pre, .errmsg, .doc code {
// //   font-family: "Roboto Mono", Menlo, monospace; }
//
// .doc {
//   color: #336699;
//   white-space: normal;
//   font-family: Helvetica Neue, Georgia; }
//
// .doc p {
//   font-family: Georgia;
//   line-height: 1.35em;
//   letter-spacing: 0.01em; }
//
// .doc code {
//   font-size: 13px;
//   background-color: rgba(40, 90, 120, 0.1);
//   padding: 1px 2px;
//   border-radius: 2px; }
//
// // .error {
// //   background: url("/assets/underline.png") bottom repeat-x;
// //   padding-bottom: 4px; }
//
// .selected {
//   background-color: rgba(255, 100, 100, 0.2); }
//
// .main-selected {
//   background-color: rgba(255, 100, 100, 0.6);
//   border-bottom: none; }
//
// .errmsg {
//   position: absolute;
//   max-width: 450px;
//   font-size: 12px;
//   padding: 7px 10px;
//   border: 1px solid #d64400;
//   background-color: #FAEBE6;
//   /* hsla(8, 75%, 54%, 0.1) over white */ }
//
// // .type {
// //   opacity: 0.5; }
