/**************************************************************
  CodeMirror syntax highlighting for Code, Txt, & MD Cells
**************************************************************/
div.CodeMirror,
div.CodeMirror pre {
    font-family: @monofont, monospace;
    font-size: @monofontsize;
    line-height: @cc-line-height;
    color: @cc-input-fg;
}
div.CodeMirror-lines {
    padding-bottom: .9em;
    padding-left: .5em;
    padding-right: 1.5em;
    padding-top: .7em;
}
/*********************************/
/********** ANSI COLORS **********/
/*********************************/
span.ansiblack,
.ansi-black-fg {
    color: @ansiblack;
}
span.ansiblue,
.ansi-blue-fg,
.ansi-blue-intense-fg {
    color: @ansiblue;
}
span.ansigray,
.ansi-gray-fg,
.ansi-gray-intense-fg {
    color: @ansigray;
}
span.ansigreen,
.ansi-green-fg {
    color: @ansigreen;
}
.ansi-green-intense-fg {
    color: @ansigray;
}
span.ansipurple,
.ansi-purple-fg,
.ansi-purple-intense-fg {
    color: @ansipurple;
}
span.ansicyan,
.ansi-cyan-fg,
.ansi-cyan-intense-fg {
    color: @ansipurple;
}
span.ansiyellow,
.ansi-yellow-fg,
.ansi-yellow-intense-fg {
    color: @ansiyellow;
}
span.ansired,
.ansi-red-fg,
.ansi-red-intense-fg {
    color: @ansired;
}
div.output-stderr{
    background-color: @stderr-bg;
}
div.output-stderr pre {
    color: @stderr-fg;
}
div.js-error {
    color: @js-error;
}

/************************************/
/******** TOOLTIP DIMENSIONS ********/
/************************************/
.ipython_tooltip {
    font-family: @monofont, monospace;
    font-size: @monofontsize;
    line-height: @cc-line-height;
    border: 2px solid darken(@tooltip-bg-color, 8%);
    background: @tooltip-bg-color;
    background-color: @tooltip-bg-color;
    border-radius: 2px;
    overflow-x: visible;
    overflow-y: visible;
    box-shadow: none;
    position: absolute;
    z-index: 1000;
}
.ipython_tooltip .tooltiptext pre {
    font-family: @monofont, monospace;
    font-size: @monofontsize;
    line-height: @cc-line-height;
    background: @tooltip-bg-color;
    background-color: @tooltip-bg-color;
    color: @cc-input-fg;
    overflow-x: visible;
    overflow-y: visible;
    max-width: 900px;
}
div#tooltip.ipython_tooltip {
    overflow-x: wrap;
    overflow-y: visible;
    max-width: 800px;
}
div.tooltiptext.bigtooltip {
    overflow-x: visible;
    overflow-y: scroll;
    height: 400px;
    max-width: 800px;
}


/*******************************************/
/****** CODE CELLS SYNTAX HIGHLIGHTING *****/
/*******************************************/
.cm-s-ipython.CodeMirror {
    font-family: @monofont, monospace;
    font-size: @monofontsize;
    background: @cc-input-bg;
    color: @cc-input-fg;
    border-radius: 2px;
    font-style: normal;
    font-weight: normal;
}
.cm-s-ipython div.CodeMirror-selected {
    background: @cm-selected;
}
.CodeMirror-gutters {
    border: none;
    border-right: 1px solid @cm-gutters !important;
    background-color: @cm-gutters !important;
    background: @cm-gutters !important;
    border-radius: 0px;
    white-space: nowrap;
}
.cm-s-ipython .CodeMirror-gutters {
    background: @cm-gutters;
    border: none;
    border-radius: 0px;
    width: 36px;
}
.cm-s-ipython .CodeMirror-linenumber {
    color: @cm-linenumber;
}
.CodeMirror-sizer {
    margin-left: 40px;
}
.CodeMirror-linenumber,
div.CodeMirror-linenumber,
.CodeMirror-gutter.CodeMirror-linenumber
div.CodeMirror-gutter.CodeMirror-linenumber {
    padding-right: 1px;
    margin-left: 0px;
    margin: 0px;
    width: 26px !important;
    padding: 0px;
    text-align: right;
}
.CodeMirror-linenumber {
    color: @cm-linenumber;
}
.cm-s-ipython .CodeMirror-cursor {
    border-left: @cursor-info !important;
}
.cm-s-ipython span.cm-comment {
    color: @cm-comment;
    font-style: italic;
}
.cm-s-ipython span.cm-atom {
    color: @cm-atom;
}
.cm-s-ipython span.cm-number {
    color: @cm-number;
}
.cm-s-ipython span.cm-property {
    color: @cm-variable;
}
.cm-s-ipython span.cm-attribute {
    color: @cm-variable;
}
.cm-s-ipython span.cm-keyword {
    color: @cm-keyword;
    font-weight: normal;
}
.cm-s-ipython span.cm-string {
    color: @cm-string;
}
.cm-s-ipython span.cm-meta {
    color: @cm-meta;
}
.cm-s-ipython span.cm-operator {
    color: @cm-operator;
}
.cm-s-ipython span.cm-builtin {
    color: @cm-builtin;
}
.cm-s-ipython span.cm-variable {
    color: @cm-variable;
}
.cm-s-ipython span.cm-variable-2 {
     color: @cm-variable2;
 }
.cm-s-ipython span.cm-variable-3 {
     color: @cm-variable3;
 }
.cm-s-ipython span.cm-def {
    color: @cm-def;
    font-weight: normal;
}
.cm-s-ipython span.cm-error {
    background: @cm-error;
}
.cm-s-ipython span.cm-tag {
    color: @cm-tag;
}
.cm-s-ipython span.cm-link {
    color: @cm-link;
}
.cm-s-ipython span.cm-storage {
    color: @cm-storage;
}
.cm-s-ipython span.cm-entity {
    color: @cm-entity;
}
.cm-s-ipython span.cm-quote {
    color: @cm-string;
}
div.CodeMirror span.CodeMirror-matchingbracket {
    color: @theme-flavor-inverse;
    font-weight: bold;
    background-color: @matching-bracket;
}
div.CodeMirror span.CodeMirror-nonmatchingbracket {
    color: @theme-flavor-inverse;
    font-weight: bold;
    background: @selected-error !important;
}
//
// div.CodeMirror span.CodeMirror-matchingbracket {
//     color: @selected-fg-bright;
//     background-color: @matching-bracket;
// }
// div.CodeMirror span.CodeMirror-nonmatchingbracket {
//     color: @selected-fg-bright;
//     background: @selected-error !important;
// }

/***********************************************/
/**** TXT, HEADER, & MD SYNTAX HIGHLIGHTING ****/
/***********************************************/
.cm-header-1 {
    font-size: 215%;
}
.cm-header-2 {
    font-size: 180%;
}
.cm-header-3 {
    font-size: 150%;
}
.cm-header-4 {
    font-size: 120%;
}
.cm-header-5 {
    font-size: 100%;
}
.cm-s-default .cm-hr {
    color: @cm-operator;
}

div.cell.text_cell .cm-s-default .cm-header {
    font-family: @notebook-fontfamily;
    font-weight: normal;
    color: @header-fg !important;
    margin-top: 0.3em !important;
    margin-bottom: 0.3em !important;
}
div.cell.text_cell .cm-s-default span.cm-variable-2 {
    color: @text-cell-fg !important;
}
div.cell.text_cell .cm-s-default span.cm-variable-3 {
    color: @cm-variable3 !important;
}
.cm-s-default span.cm-comment {
    color: @cm-comment !important;
}
.cm-s-default .cm-tag {
    color: @cm-latex;
}
.cm-s-default .cm-builtin {
    color: @cm-builtin;
}
.cm-s-default .cm-string {
    color: @cm-string;
}
.cm-s-default .cm-keyword {
    color: @cm-keyword;
}
.cm-s-default .cm-number {
    color: @cm-number;
}
.cm-s-default .cm-error {
    color: @cm-atom;
}
.cm-s-default .cm-link {
    color: @cm-link;
}
.cm-s-default .cm-atom {
    color: @cm-number;
}
.cm-s-default .cm-def {
    color: @cm-def;
}
.CodeMirror-cursor {
    border-left: @cursor-info !important;
    border-right: none;
    width: 0;
}
.cm-s-default div.CodeMirror-selected {
    background: @cm-selected;
}
.cm-s-default .cm-selected {
    background: @cm-selected;
}

/**********************************
 MathJax Settings and Style Script
**********************************/
.MathJax_Display,
.MathJax {
    border: 0 !important;
    font-size: @mathfontsize !important;
    text-align: center !important;
    margin: 0em !important;
    line-height: 2.25 !important;
}
/* Prevents MathJax from jittering */
/* cell position when cell is selected */
.MathJax:focus, body :focus .MathJax {
    display: inline-block !important;
}

/* Prevents MathJax from jittering */
/* cell position when cell is selected */
.MathJax:focus, body :focus .MathJax {
    display: inline-block !important;
}
