@import "/static/global.less";

.codemirror-auto-resizing-container > .CodeMirror {
    height: auto;

    .CodeMirror-scroll {
        height: auto;
        overflow-y: hidden;
        overflow-x: auto;
    }
}

.CodeMirror-selected,
.CodeMirror-selectedtext {
    &.cm-searching {
        background: @adg-color-orange;
    }
}

.CodeMirror-dialog .codemirror-search-query {
    .search-box {
        display: inline;
        padding-left: @halfSpacing;
        padding-right: @baseSpacing;
        position: relative;

        .match-count {
            position: absolute;
            right: @baseSpacing;
            top: 0;
        }
    }

    .aui-button {
        // the font size gets set by CodeMirror so we need to reset it
        font-size: @font-size-default;
    }
}

.CodeMirror-hscrollbar {
    &.stash-scroll-fixed {
        bottom: 0;
        position: fixed;
    }

    .stash-scroll-inner {
        height: 100%;
        min-height: 1px
    }
}