/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

* {
    margin: 0;
    padding: 0;
}

#main-pane {
    width: 100%;
    height: 100%;
    position: absolute;
}

#code-editor-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
}

#result-editor-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    border-left: 1px solid grey;
}

#buttons-code-editor {
    position: absolute;
    bottom: 0;
    right: 50%;
    z-index: 1;
}

#buttons-output {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 1;
}

#buttons-social {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
}

#result-editor, #code-editor {
    width: 100%;
    height: 100%;
}

#buttons-code-editor > *, #buttons-output > *, #buttons-social > * {
    padding: .5em;
    margin: .2em;
    display: block;
    border: 1px solid;
    border-radius: 2px;
}

#buttons-code-editor select {
    padding: 0 .5em;
}

#buttons-code-editor select option {
    padding: .5em 1em;
}

#buttons-code-editor select option:disabled {
    padding: .5em;
    background: #eee;
}

#github, #fork {
    text-decoration: none;
    float: right;
    color: #ddd;
    border-color: #000;
    cursor: pointer;
    background: #333;
    margin-bottom: 0;
}

#compile {
    float: right;
    background-color: #4caf50;
    color: white;
    cursor: pointer;
    border-color: #43a047;
    clear: both;
}

@media (max-width: 1000px) {
    #main-pane {
        width: 100%;
        height: auto;
        overflow: hidden;
    }

    #code-editor-wrapper, #result-editor-wrapper {
        height: 75vh;
        width: 100%;
        overflow: hidden;
    }

    #buttons-code-editor, #buttons-output, #buttons-social {
        min-height: 2em;
    }

    #code-editor-wrapper, #result-editor-wrapper, #buttons-code-editor, #buttons-output, #buttons-social {
        position: relative;
        float: none;
        left: auto;
        bottom: auto;
        right: auto;
        top: auto;
    }
}

select {
    background-color: white;
    border-color: #d3d3d3;
}

.compiling #result-editor-wrapper {
    opacity: 0.5;
}

.compile-error #result-editor-wrapper .ace_text-layer * {
    color: red !important;
}

.line-color-0 {
    background-color: #ef9a9a;
}

.line-color-1 {
    background-color: #90caf9;
}

.line-color-2 {
    background-color: #a5d6a7;
}

.line-color-3 {
    background-color: #ffcc80;
}

.line-color-4 {
    background-color: #ce93d8;
}

.line-color-5 {
    background-color: #80deea;
}

.line-color-6 {
    background-color: #e6ee9c;
}

.line-color-7 {
    background-color: #bcaaa4;
}