/*
  Copyright (c) Microsoft Corporation.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/

@import '../third_party/vscode/colors.css';

.cm-wrapper {
  line-height: 18px;
}

.cm-wrapper, .cm-wrapper > div {
  width: 100%;
  height: 100%;
}

.CodeMirror span.cm-meta {
  color: var(--vscode-editor-foreground);
}

.CodeMirror span.cm-number {
  color: var(--vscode-debugTokenExpression-number);
}

.CodeMirror span.cm-keyword,
.CodeMirror span.cm-builtin {
  color: var(--vscode-debugTokenExpression-name);
}

.CodeMirror span.cm-operator {
  color: var(--vscode-editor-foreground);
}

.CodeMirror span.cm-string {
  color: var(--vscode-debugTokenExpression-string);
}

.CodeMirror span.cm-string-2 {
  color: var(--vscode-debugTokenExpression-string);
}

.CodeMirror span.cm-error {
  color: var(--vscode-errorForeground);
}

.CodeMirror span.cm-def, .CodeMirror span.cm-tag {
  color: #0070c1;
}

.CodeMirror span.cm-comment, .CodeMirror span.cm-link {
  color: #008000;
}

.CodeMirror span.cm-variable, .CodeMirror span.cm-variable-2, .CodeMirror span.cm-atom {
  color: #0070c1;
}

.CodeMirror span.cm-property {
  color: #795e26;
}

.CodeMirror span.cm-qualifier, .CodeMirror span.cm-attribute {
  color: #001080;
}

.CodeMirror span.cm-variable-3,
.CodeMirror span.cm-type {
  color: #267f99;
}

:root.dark-mode .CodeMirror span.cm-def,
:root.dark-mode .CodeMirror span.cm-tag {
  color: var(--vscode-debugView-valueChangedHighlight);
}

:root.dark-mode .CodeMirror span.cm-comment,
:root.dark-mode .CodeMirror span.cm-link {
  color: #6a9955;
}

:root.dark-mode .CodeMirror span.cm-variable,
:root.dark-mode .CodeMirror span.cm-variable-2,
:root.dark-mode .CodeMirror span.cm-atom {
  color: #4fc1ff;
}

:root.dark-mode .CodeMirror span.cm-property {
  color: #dcdcaa;
}

:root.dark-mode .CodeMirror span.cm-qualifier,
:root.dark-mode .CodeMirror span.cm-attribute {
  color: #9cdcfe;
}

:root.dark-mode .CodeMirror span.cm-variable-3,
:root.dark-mode .CodeMirror span.cm-type {
  color: #4ec9b0;
}

.CodeMirror span.cm-bracket {
  color: var(--vscode-editorBracketHighlight-foreground3);
}

.CodeMirror-cursor {
  border-left: 1px solid var(--vscode-editor-foreground) !important;
}

.CodeMirror div.CodeMirror-selected {
  background: var(--vscode-terminal-inactiveSelectionBackground);
}

.CodeMirror .CodeMirror-gutters {
  z-index: 0;
  background: 1px solid var(--vscode-editorGroup-border);
  border-right: none;
}

.CodeMirror .CodeMirror-gutter-elt {
  background-color: var(--vscode-editorGutter-background);
}

.CodeMirror .CodeMirror-gutterwrapper {
  border-right: 1px solid var(--vscode-editorGroup-border);
  color: var(--vscode-editorLineNumber-foreground);
}

.CodeMirror .CodeMirror-matchingbracket {
  background-color: var(--vscode-editorBracketPairGuide-background1);
  color: var(--vscode-editorBracketHighlight-foreground1) !important;
}

.CodeMirror {
  font-family: var(--vscode-editor-font-family) !important;
  color: var(--vscode-editor-foreground) !important;
  background-color: var(--vscode-editor-background) !important;
  font-weight: var(--vscode-editor-font-weight) !important;
  font-size: var(--vscode-editor-font-size) !important;
}

.CodeMirror .source-line-running {
  background-color: var(--vscode-editor-selectionBackground);
  z-index: 2;
}

.CodeMirror .source-line-paused {
  background-color: var(--vscode-editor-selectionHighlightBackground);
  z-index: 2;
}

.CodeMirror .source-line-error {
  /* Intentionally empty. */
}

.CodeMirror .source-line-error-widget {
  background-color: var(--vscode-inputValidation-errorBackground);
  white-space: pre-wrap;
  margin: 3px 10px;
  padding: 5px;
}

.CodeMirror span.cm-link, span.cm-linkified {
  color: var(--vscode-textLink-foreground);
  text-decoration: underline;
  cursor: pointer;
}

.CodeMirror .source-line-error-underline {
  text-decoration: underline;
  text-decoration-color: var(--vscode-errorForeground);
  text-decoration-style: wavy;
}

.CodeMirror-placeholder {
  color: var(--vscode-input-placeholderForeground) !important;
}
