/* Defines */
@background: #2B2B2B;
@foreground: #A9B7C6;

/* Code Styling */

.CodeMirror, .CodeMirror-scroll {
    background-color: @background;
    color: @foreground;
}

.CodeMirror-focused .CodeMirror-activeline-background {
    background: #2f2f2f;
}

.show-line-padding .CodeMirror-focused .CodeMirror-activeline-background {
    box-shadow: inset 15px 0 0 0 #000;
}

.CodeMirror-focused .CodeMirror-activeline {
    .CodeMirror-gutter-elt {
        background: rgba(0, 0, 0, 0.2);
        color: #fff;
    }
    .inline-widget .CodeMirror-gutter-elt {
        color: #767676;    
    }
}

.cm-def {color: @foreground;}
.cm-hr {color: #a9daff;}
.cm-string, .cm-string-2 {color:#6A8759;}
.cm-number, .cm-plus, .cm-atom {color: #6897BB;}
.cm-property {color: #AE8ABE;}
.cm-variable-2, .cm-variable-3 {color: #E8BF6A;}
.cm-variable, .cm-attribute {color: @foreground;}
.cm-operator, .cm-meta, .cm-bracket {color: @foreground;}
.cm-comment {color: #808080;}
.cm-minus {color: #dc322f;}
.cm-error {text-decoration: underline; text-decoration-color: red;}
.cm-header {color: #d85896;}
.cm-link {color: #b77fdb; text-decoration: none;}
.cm-rangeinfo {color: #6c71c4;}
.cm-qualifier, .cm-builtin, .cm-quote, .cm-tag {color: #E8BF6A;}
.cm-keyword {color: #CC7832;}

.cm-m-css.cm-property {color: #AE8ABE; }
.cm-m-css.cm-atom {color: #6897BB; }
.cm-m-xml.cm-string {color: #A5C261; }

/* Extra CSS */

.CodeMirror-searching {
    background-color: #d3cd69;
    &.searching-current-match {
        background-color: #f6a644;
    }
}


.CodeMirror-cursor {
    border-left: 1px solid #c5c8c6 !important;
}

.CodeMirror-gutters {
    background-color: @background;
    border-right: none;
}

.CodeMirror-linenumber {
    color: #767676;
}

.CodeMirror .CodeMirror-selected {
    background: #333f48;
}
.CodeMirror-focused .CodeMirror-selected {
    background: #214283;
}

.CodeMirror-matchingbracket {
    background-color: @background;
    color:#FFEF28 !important;
    font-weight: bold !important;
}

.CodeMirror-matchingtag {
    background-color: #2a2f45;
}

.CodeMirror-overwrite .CodeMirror-cursor {
    border-left: none !important;
    border-bottom: 1px solid #fff;
}

.CodeMirror {
    .CodeMirror {
        background: transparent;
    }

    .CodeMirror .CodeMirror-gutters {
        background: transparent;
        border-right: none;
    }

    .CodeMirror .CodeMirror-activeline-background {
        background: transparent;
    }

    .CodeMirror .CodeMirror-activeline .CodeMirror-gutter-elt {
        background: transparent;
        color: #767676;
    }

    .CodeMirror-focused .CodeMirror-activeline-background {
        background: #4e4e4e;
    }

    .CodeMirror-focused .CodeMirror-activeline {
        .CodeMirror-gutter-elt {
            background: rgba(0, 0, 0, 0.2);
            color: #fff;
        }
    }
}

/* Non-editor styling */

.image-view,
.not-editor {
    background-color: @background;
}

.view-pane .image-view {
    color: @foreground;
}
