/* === Code Mirror === */
.CodeMirror {
    height: 100% !important;
    font-size: 125%;
}

.CodeMirror-hints {
    max-height: 100px !important;
    min-width: 50px !important;
    overflow-x: auto;
    overflow-y: auto;
}

/* Upper case all instructions */
span.cm-keyword {
    text-transform: uppercase !important;
}

/* === Code Mirror Wrappers === */
#editor {
    width: 100%;
    height: 100%;
}

#editorcontainer {
    font-size: 12px;
    height: calc(100% - 16px);
    width: calc(100% - 20px);
    padding-top: 30px; /* Fix scrollbar bug */
    margin-top: -30px;

    float: left;
}

#editorcontainer.quickHelpFixed {
    height: calc(100% - 115px);
}

#editorcontainer.labelListFixed {
    width: calc(100% - 100px);
}

/* === Labellist === */
#labellist {
    float: right;
    position: absolute;

    width: 100px;
    left: 100%;
    top: 45px;
    bottom: 0;

    overflow-y: auto;
    overflow-x: hidden;

    margin-left: -20px;
    border-left: 1px solid rgb(220,220,220);

    background-color: #f7f7f7;

    opacity: 0.5;

    z-index: 10100;
}

#labellist.hidden {
    display: none;
}

#labellist.fixed {
    margin-left: -100px !important;
    opacity: 1 !important;
}

#labellist.quickHelpFixed {
    height: calc(100% - 144px);
}

#labellist ul {
    list-style-type: none;
    margin: 0;
    padding: 4px 0 0;
    font-size: 12px;

    width: 100px;
}

#labellist h4 {
    padding-left: 8px;
}

#labellist ul li {
    padding-left: 12px;
    padding-top: 4px;
    padding-bottom: 4px;

    border-bottom: 1px solid rgb(220,220,220);
    word-wrap: break-word;

    cursor: pointer;
}

#labellist ul li:last-child {
    border-bottom: none;
}
/* === File Dialog === */
#dialog_file .tab-content {
    padding-top: 16px !important;
}

#dialog_file .filedialog_name {
    vertical-align: middle;
}

#dialog_file .filedialog_controls {
    text-align: right;
}

#dialog_file .filedialog_controls > * {
    margin-left: 5px;
}

#dialog_file thead {
    background-color: rgba(128,128,128,0.25);
}

#popups {
    position: absolute;
    top: 70px;
    right: 50px;

    z-index: 10200;
}

#popups > * {
    padding: 10px;
    margin-bottom: 25px;

    max-width: 450px;

    color: black;
    background-color: #dddddd;
    box-shadow: 0 0 1em #ddd;
    border-radius: 5px;

    opacity: 0.65;
    transition: opacity .2s ease;
    -moz-transition: opacity .2s ease;
    -webkit-transition: opacity .2s ease;

    display: none;
}

#popups > *.shown {
    display: block;
}

#popups > *:hover {
    opacity: 1;
    transition: opacity .5s ease;
    -moz-transition: opacity .5s ease;
    -webkit-transition: opacity .5s ease;
}

#popups > * > p {
    font-size: 1.2em;
}

#popups > * > h1,
#popups > * > h2 {
    margin-top: 0;
    display: inline-block;
}

#popups > * > h2 {
    font-size: 2em;
    margin-top: 0.45em;
    margin-left: 5px;
    vertical-align: top;
}

#popups > * a {
    font-weight: bold;
}

#popups > * .btns {
    float: right;
}

/* === help modal === */
#dialog_help .modal-dialog,
#dialog_help .modal-content {
    height: 100%;
}

#help_container {
    margin-top: 10px;
    overflow-y: scroll;
}

#help_container h1 {
    font-size: 20px;
}

#help_container h2 {
    font-size: 14px;
}

/* === quickhelp === */
#help_quick {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;

    max-height: 150px;
    border-top: 1px solid rgb(220,220,220);
    background-color: #f7f7f7;

    z-index: 10000;

    font-size: 120%;
    
    overflow: auto; 
}

#help_quick.fixed {
    height: 100px !important;
}

#help_quick .helpquick_container {
    padding: 8px;
}

#help_quick .helpquick_container hr {
    margin: 0.3em 0;
}

/* === settings === */
#dialog_settings label.checkbox > span {
    vertical-align: middle;
}

/* === about === */
#dialog_about h6 {
    font-weight: bold;
    margin-bottom: 5px;
}

/* === other styles === */
.toolbarcontainer {
    background-color: #f7f7f7;
    padding: 5px 5px 0 5px;
    border-bottom: 1px solid rgb(220,220,220);
}

.toolbarcontainer .logo {
    height: 40px;
    margin-right: 10px;
}

.toolbarcontainer .dropdown-menu {
    z-index: 20000;
}

.toolbarcontainer .toolbar > * {
    display: inline-block;
    vertical-align: middle;
}

.toolbarcontainer .pull-right {
    margin-top: 5px;
    margin-left: 3px;
}

#display_filename {
    margin-left: 16px;
}

.modal.fullscreen {
    width: 100%;
    height: 100%;
    padding: 0;
}

.modal.fullscreen .modal-header {
    padding: 5px;
}


.modal.fullscreen .modal-header .close {
    margin-top: -7px;
    margin-right: 5px;
    font-size: 400%;
    color: red;
    opacity: 0.4;
}

.modal.fullscreen .modal-footer {
    padding: 5px;
}

.modal.fullscreen .modal-dialog {
    width: 100%;
    height: 100%;
    padding: 0;
}

.modal.fullscreen .modal-body {
    width: 100%;
    height: 100%;
    padding-top: 5px;
    padding-left: 5px;
    padding-right: 5px;
}

.modal.fullscreen .modal-content {
    height: 100%;
    width: 100%;
    padding-bottom: 45px;
    border-radius: 0;
}

.modal-footer {
    margin-top: 0;
}

/* Fix z-index bug with labellist */
.modal {
    z-index: 100000;
}

.modal-backdrop {
    z-index: 10500;
}