/*********************************************
 *  Copyright (c) 2015 Ansible, Inc.
 *  Overrides to angular-codemirror
 *
 *
 */

.CodeMirror {
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid @b7grey;
}

.CodeMirror,
.CodeMirror-activeline-background {
    background-color: @default-secondary-bg;
}

/* Make sure code editor dialog is always at top of stack */
[aria-describedby=af-code-editor-modal].ui-front {
    z-index: 2050;
}

.CodeMirror-lint-tooltip {
    z-index: 2060;
}

.CodeMirror-gutters {
    border-color: @d7grey;
    background-color: @default-no-items-bord;
}

.CodeMirror-lineNumber {
    color: @default-icon;
}

// Disabled
textarea[disabled="disabled"] + div[id*="-container"]{
        .CodeMirror {
            cursor: not-allowed;
        }

        .CodeMirror.cm-s-default,
        .CodeMirror-line {
            background-color: @ebgrey;
        }

        .CodeMirror-gutters {
            border-color: @b7grey;
        }

        .CodeMirror-gutter.CodeMirror-lint-markers,
        .CodeMirror-gutter.CodeMirror-linenumbers {
            background-color: @default-bg;
            color: @default-interface-txt;
        }

        .CodeMirror-lines {
            cursor: default;
        }

        .CodeMirror-cursors {
            display: none;
        }
}
