html, body {
    height: 100%;
    overflow: hidden;
}

body.vertical {
    display: flex;
    flex-direction: column;
}

.checkbox-container {
    white-space: nowrap;
}

.big-text {
    font-size: 1.2rem;
}

a {
    cursor: pointer;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: grey;
}

#loader {
    top: 0;
    left: 0;
    transition: 0.2s opacity linear;
    z-index: 7;
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: white;
}

.loader-inner {
    padding: 10vw;
}

#info-back {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: grey;
    background: rgba(0,0,0,0.5);
}

#info {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 6;
}

#info > .card {
    position: fixed;
    width: 80%;
    height: auto;
    max-height: 80%;
    top: 10%;
    left: 10%;
}

#info-main {
    padding: 40px;
    overflow: auto;
}

.mascot {
    width: 200px;
    float: left;
}

#changelog, #issues {
    text-align: left;
}

.changelog-item {
    list-style-type: none;
    border-bottom: 1px solid rgba(238, 238, 238, 0.5);
    margin: 0;
    padding: 1rem;
}

.changelog-item ul {
    margin: 0;
}

#changelog p:last-child, #issues p:last-child {
    margin: 0;
}

#PM {
    width: 100%;
    height: 200px;
}

#tos {
    font-size: 10pt;
}

#options:hover, #info-button:hover {
    opacity: 1;
}

#options {
    right: 20px;
}

#info-button {
    left: 20px;
}

.ui-options.show {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ui-options .checkbox-container {
    flex-basis: 0;
    flex-grow: 1;
}


/* Main Area */

#main {
    width: 100%;
    height: 100%;
    display: flex;
    -webkit-flex-direction: column;
    -moz-flex-direction: column;
    -ms-flex-direction: column;
    -o-flex-direction: column;
    flex-direction: column;
}

#main.vertical {
    -webkit-flex-direction: row;
    -moz-flex-direction: row;
    -ms-flex-direction: row;
    -o-flex-direction: row;
    flex-direction: row;
}

#frame {
    border: none;
    width: 100%;
    z-index: 3;
}

#frame.vertical {
    height: 100%;
    width: auto;
    z-index: 1;
}

#frame.mobile-preview {
    width: 414px !important;
}

/*.mobile-display */#editor.shrunk, #footer.shrunk {
    display: none;
}

/*.mobile-display */#frame.expanded {
    height: 100% !important;
}

#frame.expanded.vertical {
    width: 100% !important;
}

#adjustbar {
    cursor: ns-resize;
    position: relative;
    width: 100%;
    display: block;
    height: 8px;
    z-index: 4;
    -webkit-flex-shrink: 0;
    -moz-flex-shrink: 0;
    -ms-flex-shrink: 0;
    -o-flex-shrink: 0;
    flex-shrink: 0;
}

#adjustbar.vertical {
    cursor: ew-resize;
    width: 8px;
    height: 100%;
}

#mobile-switch {
    z-index: 6;
    position: absolute;
    top: auto;
    bottom: 13px;
    right: 22px;
    padding: 0.5rem 0.8rem;
}

#mobile-switch.vertical {
    top: 13px;
    bottom: auto;
    right: 26px;
}

#mobile-switch.vertical {
    transform: rotate(-90deg);
}

#editor { 
    display: flex;
    position:relative;
    z-index: 5;
    width: 100%;
    -webkit-flex-direction: column;
    -moz-flex-direction: column;
    -ms-flex-direction: column;
    -o-flex-direction: column;
    flex-direction: column;
    background-color: #333;
}

.light #editor {
    background-color: #ddd;
}

#editor.vertical {
    width: auto;
    flex-grow: 1;
}

#editor:not(.mobile-display) {
    -webkit-flex-grow: 1;
    -moz-flex-grow: 1;
    -ms-flex-grow: 1;
    -o-flex-grow: 1;
    flex-grow: 1;
}

#fields {
    display: -webkit-box; 
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex; 
    display: flex;
    
    -webkit-flex-grow: 1;
    -webkit-moz-grow: 1;
    -webkit-ms-grow: 1;
    -webkit-o-grow: 1;
    flex-grow: 1;
    width: 100%;
}

#fields.vertical {
    flex-direction: column;
}

#titles {
    display: -webkit-box; 
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex; 
    display: flex;
}

#titles.vertical {
    display: none;
}

.field-title {
    color: white;
    background-color: black;
    font-size: 16pt;
    margin: 1px;
    padding: 3px;
    -webkit-flex-basis: 0;
    -moz-flex-basis: 0;
    -ms-flex-basis: 0;
    -o-flex-basis: 0;
    flex-basis: 0;
    
    display: -webkit-box; 
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex; 
    display: flex;
    
    justify-content: space-between;
    color: white;
}

.light .field-title {
    color: black;
    background-color: white;    
}

.panel-title-tabs {
    white-space: nowrap;
}

.panel-options {
    float: right;
    opacity: 0.8;
    margin-right: 5px;
}

.ace_editor {
    margin-top: 1px;
    height: 100%;
    -webkit-flex-grow: 1;
    -moz-flex-grow: 1;
    -ms-flex-grow: 1;
    -o-flex-grow: 1;
    flex-grow: 1;
}

.ace_editor.disabled {
    filter: brightness(80%);
}

.html-visible {
    -webkit-flex-grow: 4;
    -moz-flex-grow: 4;
    -ms-flex-grow: 4;
    -o-flex-grow: 4;
    flex-grow: 4;
}

.css-visible {
    -webkit-flex-grow: 4;
    -moz-flex-grow: 4;
    -ms-flex-grow: 4;
    -o-flex-grow: 4;
    flex-grow: 4;
}

.text-visible {
    margin-left: 2px;
    -webkit-flex-grow: 3;
    -moz-flex-grow: 3;
    -ms-flex-grow: 3;
    -o-flex-grow: 3;
    flex-grow: 3;
}

#footer {
    box-sizing: border-box;
    padding: 5px 10px;
    font-size: 12pt;
    z-index: 5;
    width: 100%;
    height: auto;
    bottom: 0;
    display: flex;
    
    -webkit-flex-direction: row;
    -moz-flex-direction: row;
    -ms-flex-direction: row;
    -o-flex-direction: row;
    flex-direction: row;
    align-items: center;
}

#footer-left, #footer-right {
    line-height: 2.1rem;
}

#footer span {
    margin-right: 1em;
}

#footer-left {
    -webkit-flex-grow: 2;
    -moz-flex-grow: 2;
    -ms-flex-grow: 2;
    -o-flex-grow: 2;
    flex-grow: 2;
}

#footer-right {
    text-align: right;
    -webkit-flex-grow: 3;
    -moz-flex-grow: 3;
    -ms-flex-grow: 3;
    -o-flex-grow: 3;
    flex-grow: 3;
    margin-left: 5px;
    width: 45%;
}

.dropdown {
    position: static;
}

.dropdown-menu {
    z-index: 1000;
    line-height: 1.6rem;
}

.disclaimer {
    -webkit-flex-grow: 1;
    -moz-flex-grow: 1;
    -ms-flex-grow: 1;
    -o-flex-grow: 1;
    flex-grow: 1;
}

.invisible {
    opacity: 0;
}

.show-small {
    display: none;
}


@media only screen and (max-width: 575px) {
    .hide-small {
        display: none;
    }
    
    .show-small {
        display: initial;
    }

    #mobile-switch {
        right: 5px;
    }
    
    #adjustbar {
        height: 12px;
    }
    
    #info-main {
        padding: 20px;
    }

    .mascot {
        float: none;
    }
    
    #editor {
        -webkit-flex-direction: row;
        -moz-flex-direction: row;
        -ms-flex-direction: row;
        -o-flex-direction: row;
        flex-direction: row;
    }
    
    #titles {
        -webkit-flex-direction: column;
        -moz-flex-direction: column;
        -ms-flex-direction: column;
        -o-flex-direction: column;
        flex-direction: column;
    }

    #titles, .field-title {
        font-size: 13pt;
    }
    
    #titles div {
        -webkit-flex-direction: column;
        -moz-flex-direction: column;
        -ms-flex-direction: column;
        -o-flex-direction: column;
        flex-direction: column;
    }

    .title-text {
        font-size: 16pt;
    }
    
    .panel-options {
        margin-right: 0;
    }
    
    #fields {
        -webkit-flex-direction: column;
        -moz-flex-direction: column;
        -ms-flex-direction: column;
        -o-flex-direction: column;
        flex-direction: column;
    }
    
    .text-visible {
        -webkit-flex-grow: 4;
        -moz-flex-grow: 4;
        -ms-flex-grow: 4;
        -o-flex-grow: 4;
        flex-grow: 4;
    }
}