@import '~codemirror/lib/codemirror.css';
@import '~codemirror/theme/base16-light.css';
@import '~codemirror/theme/base16-dark.css';

.CodeMirror {
  padding: 10px;
  margin: 10px 0;
  height: auto !important;
  pre {
    padding: 0 20px;
  }
}

.code-view-wrapper {
  position: relative;
  margin-bottom: 18px;
  border: 1px dashed #f1f1f1;
  padding: 18px 18px 28px 18px;

  .code-view-toolbar {
    padding: 5px 0;
    border-bottom: 1px dashed #f5f5f5;
    overflow: hidden;
    color: #575757;

    .explain-wrap {
      line-height: 20px;
      font-size: 14px;
    }
    .btn-code {
      float: right;
      width: 40px;
      line-height: 20px;
      text-align: center;

      .icon-code {
        font-size: 12px;
        color: #777;

        &:hover {
          color: #222;
          cursor: pointer;
        }
      }
    }
  }
  .doc-code {
    height: 0;
    overflow: hidden;
    &.show {
      height: auto;
    }
  }
  .code-view {
    padding: 10px 0;
    position: relative;
    &:after {
      position: absolute;
      top: 18px;
      left: 18px;
      font-size: 12px;
      font-weight: 300;
      color: #959595;
      text-transform: uppercase;
      letter-spacing: 1px;
    }
  }
  .code-view-error {
    color: red;
  }
}
