@import '../../utils/constants.scss';

:global {
  /* Custom styling */
  .cm-s-atlas.CodeMirror {
    background: #fff;
    color: #202020;
    font-family: 'Atlas Typewriter', 'Menlo', 'Cousine', 'Monaco', monospace;
    font-weight: 300;
    height: auto; // This will break layout for some reason. TODO: investigate
    width: 100%;
  }

  // Use Menlo for stronger weight
  .cm-s-atlas .cm-header { font-family: 'Menlo', 'Cousine', 'Monaco', monospace; }

  /* Disable ondrag cursor for file uploads */
  .cm-s-atlas div.CodeMirror-dragcursors {
    visibility: hidden;
  }

  .cm-s-atlas .CodeMirror-line::selection,
  .cm-s-atlas .CodeMirror-line > span::selection,
  .cm-s-atlas .CodeMirror-line > span > span::selection {
    background: #90CAF9;
  }

  .cm-s-atlas .CodeMirror-line::-moz-selection, .cm-s-atlas .CodeMirror-line > span::-moz-selection, .cm-s-atlas .CodeMirror-line > span > span::-moz-selection { background: #e0e0e0; }
  .cm-s-atlas .CodeMirror-gutters { background: #f5f5f5; border-right: 0px; }
  .cm-s-atlas .CodeMirror-guttermarker { color: #ac4142; }
  .cm-s-atlas .CodeMirror-guttermarker-subtle { color: #b0b0b0; }
  .cm-s-atlas .CodeMirror-linenumber { color: #b0b0b0; }
  .cm-s-atlas .CodeMirror-cursor {
    border-left: 2px solid #2196F3;
  }

  .cm-s-atlas span.cm-quote {
    font-style: italic;
  }
  .cm-s-atlas span.cm-comment { color: #969896; }
  .cm-s-atlas span.cm-atom { color: #0086b3; }
  .cm-s-atlas span.cm-number { color: $textColor; }

  .cm-s-atlas span.cm-property, .cm-s-atlas span.cm-attribute { color: $textColor; }
  .cm-s-atlas span.cm-keyword { color: #a71d5d; }
  .cm-s-atlas span.cm-string { color: #df5000; }

  .cm-s-atlas span.cm-variable { color: $textColor; }
  .cm-s-atlas span.cm-variable-2 { color: $textColor; }
  .cm-s-atlas span.cm-def { color: $textColor; }
  .cm-s-atlas span.cm-bracket { color: #202020; }
  .cm-s-atlas span.cm-tag { color: #ac4142; }
  .cm-s-atlas span.cm-link { color: $linkColor; }
  .cm-s-atlas span.cm-error { background: #ac4142; color: #505050; }

  .cm-s-atlas .CodeMirror-activeline-background { background: #DDDCDC; }
  .cm-s-atlas .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
  .cm-s-atlas .CodeMirror-placeholder { color: rgba(0, 0, 0, 0.5); font-weight: bold; }
}