*,
*:before,
*:after {
    color-profile: sRGB;
    rendering-intent: auto;
    box-sizing: inherit;
}

html {
    font-size: 14px;
    line-height: 1.42857142857;
    box-sizing: border-box;
}

body {
    padding: 0 20px;
    transition: background 0.5s, color 0.5s;
}

body.theme-transitioning,
body.theme-transitioning a,
body.theme-transitioning .merge-tag > label {
    transition: all 0.5s !important;
}

body.theme-transitioning .well,
body.theme-transitioning .merge-tag .content {
    transition: background 0.5s, border-color 0.5s !important;
}

a {
    cursor: pointer;
}

textarea {
    background: #F6F6F6;
    width: 100%;
    max-width: 100%;
    border: none;
    margin-bottom: 1.42857142857rem;
    transition: background 0.5s, color 0.5s;
}

textarea:focus {
    background: #FFFFFF;
}

[contenteditable=true]:empty:before {
    content: attr(placeholder);
    display: block;
    /* For Firefox */
}

.controls {
    margin-bottom: 1.42857142857rem;
}

.section {
    height: 100vh;
}

.section:first-child {
    padding-top: 20px;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-fill {
    flex: 1 1 0;
}

.flex-center {
    align-items: center;
}

.empty,
.empty-message {
    display: none;
}

.empty + .empty-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.merge-tag {
    position: relative;
    margin-bottom: 20px;
}

.merge-tag.empty {
    display: block;
}

.merge-tag > label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: #F6F6F6;
    color: #333;
    padding: 0 10px;
    z-index: 1000;
    transition: background 0.2s, color 0.2s, padding 0.2s;
}

.merge-tag .content {
    background: #F6F6F6;
    transition: border 0.2s;
}

.merge-tag .content:after {
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    display: block;
    content: ' ';
    z-index: 1000;
    transition: width 0.2s, background 0.2s;
}

.merge-tag.empty .content:after {
    background: #F60;
}

.merge-tag.editing > label {
    background: #09F;
    color: #FFF;
    padding-left: 20px;
}

.merge-tag.editing .content:after {
    background: #09F;
}

.merge-tag.editing .content {
    height: auto;
}

.merge-tag .value {
    display: block;
    min-height: 100px;
    white-space: pre-wrap;
    padding: 40px 20px 20px;
    border: none;
    margin: 0;
    overflow: hidden;
    resize: none;
}

.merge-tag .value:focus {
    outline: none;
}

.merge-tag.basic .value {
    white-space: pre-wrap;
}

.merge-tag.basic .value * {
    background: none !important;
    font: inherit !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.merge-tag.boolean .content {
    padding: 40px 20px 20px;
}

.merge-tag.boolean .content label {
    margin-right: 1em;
}

.merge-tag.code .content {
    padding: 0;
}

.merge-tag.code .value {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    opacity: 0;
}

.merge-tag.code .view {
    font-size: inherit;
    color: #AAA;
    white-space: pre-wrap;
    word-break: keep-all;
    tab-size: 2;
}

.merge-tag.code .view,
.merge-tag.code .CodeMirror {
    min-height: 100px;
    padding: 40px 20px 20px;
    border: none;
    margin: 0;
}

.merge-tag.code .CodeMirror {
    height: auto;
}

.merge-tag.code .CodeMirror-lines,
.merge-tag.code .CodeMirror pre {
    padding: 0;
}

.merge-tag.code .CodeMirror-scroll {
    padding-bottom: 60px;
    margin-right: -40px;
    margin-bottom: -60px;
}

.merge-tag.code .CodeMirror-sizer {
    padding-right: 10px !important;
}

.merge-tag.code.editing .view {
    display: none;
    color: #F6F6F6;
}

.merge-tag.code.empty .value {
    display: block;
    position: static;
    opacity: 1;
}

.merge-tag.code.empty .view {
    display: none;
}

.swatch-active {
    color: #09F;
}

.swatch-empty {
    color: #F60;
}

.CodeMirror {
    background: none;
    color: inherit;
    margin-bottom: 20px;
    transition: background 0.5s, color 0.5s;
}

.CodeMirror-cursors {
    pointer-events: none;
}

.cm-merge-tag-delimiter {
    visibility: hidden;
}

.cm-merge-tag-name:hover,
.cm-merge-tag-content:hover {
    cursor: pointer;
}

.tab-pane.active.flex-col {
    display: flex;
}

.flex-fill + .CodeMirror {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
}

.flex-fill + .CodeMirror > .CodeMirror-scroll {
    flex: 1 1 0;
}

.flex-fill + .CodeMirror.empty {
    display: none;
}

#source textarea {
    flex: 1 1 0;
    resize: none;
}

#input {
    position: relative;
    background: #DDD;
    padding: 20px;
    margin-bottom: 20px;
    overflow-y: scroll;
    transition: background 0.5s;
}

#session-name {
    display: none;
}

#session-name,
#session-select {
    width: 200px;
}

#session-control .btn .confirm {
    display: none;
}

#session-control.renaming #session-select {
    display: none;
}

#session-control.renaming #session-name {
    display: block;
}

#session-control.renaming .btn .confirm {
    display: inline-block;
}

#session-control.renaming .btn .confirm + i {
    display: none;
}

#preview .modal-body {
    position: relative;
}

#preview iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #FFFFFF;
}

#preview .modal-dialog {
    width: auto;
    width: calc(100% - 60px);
    max-width: 1200px;
    height: calc(100% - 60px);
}
#preview .modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}
#preview .modal-body {
    flex-grow: 1;
}

@media (max-width: 767px) {
    #preview .modal-dialog {
        width: auto;
    }
}


/**
* Color Schemes
*/

.theme-dark {
    background: #111;
    color: #8e908c;
}

.theme-dark textarea {
    background: #000000;
    color: #8e908c;
}

.theme-dark .btn-default {
    background: #000;
    border-color: #000;
    color: white;
}

.theme-dark .btn-danger {
    background: #c9302c;
    border-color: #8a211e;
}

.theme-dark .btn-danger:hover {
    background: #8a211e;
    border-color: #601715;
}

.theme-dark .well {
    background: #000000;
    border: 1px solid #000000;
}

.theme-dark .modal-content {
    background: #111111;
}

.theme-dark .modal-header,
.theme-dark .modal-footer {
    border-color: #000000;
}

.theme-dark .modal-header .close {
    color: #ffffff;
}


.theme-dark .nav > li > a:hover,
.theme-dark .nav > li > a:focus {
    background: #050505;
}

.theme-dark .nav > li.active > a {
    background: #23527c;
}

.theme-dark .merge-tag:not(.editing) > label {
    background: #000000;
    color: white;
}

.theme-dark .merge-tag .content {
    background: #000000;
}

.theme-dark #input {
    background: #222;
}


/* CodeMirror - Base */

.cm-merge-tag-delimiter,
.cm-merge-tag-name,
.cm-merge-tag-content {
    color: #6bb200;
}

.cm-merge-tag-name {
    color: #6bb200;
    font-weight: bold;
}

.cm-merge-tag-name.cm-merge-tag-empty {
    background: #F60;
    color: #ffffff;
}

.cm-merge-tag-name.cm-merge-tag-active {
    background: #09F;
    color: #ffffff;
}

.cm-merge-tag-content.cm-merge-tag-active {
    color: #09F;
}


/* CodeMirror - Light */

.theme-light .cm-s-base16-tomorrow.CodeMirror {
    background: #ffffff;
    color: #282a2e;
    font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace;
}

.theme-light .cm-s-base16-tomorrow div.CodeMirror-selected {
    background: #e0e0e0 !important;
}

.theme-light .cm-s-base16-tomorrow .CodeMirror-gutters {
    background: #ffffff;
    border-right: 0px;
}

.theme-light .cm-s-base16-tomorrow .CodeMirror-linenumber {
    color: #b4b7b4;
}

.theme-light .cm-s-base16-tomorrow .CodeMirror-cursor {
    border-left: 1px solid #969896 !important;
}

.theme-light .cm-s-base16-tomorrow span.cm-comment {
    color: #8e908c;
}

.theme-light .cm-s-base16-tomorrow span.cm-atom {
    color: #b294bb;
}

.theme-light .cm-s-base16-tomorrow span.cm-number {
    color: #b294bb;
}

.theme-light .cm-s-base16-tomorrow span.cm-property,
.theme-light .cm-s-base16-tomorrow span.cm-attribute {
    color: #f5871f;
}

.theme-light .cm-s-base16-tomorrow span.cm-keyword {
    color: #cc6666;
}

.theme-light .cm-s-base16-tomorrow span.cm-string {
    color: #3e999f;
}

.theme-light .cm-s-base16-tomorrow span.cm-variable {
    color: #b5bd68;
}

.theme-light .cm-s-base16-tomorrow span.cm-variable-2 {
    color: #81a2be;
}

.theme-light .cm-s-base16-tomorrow span.cm-def {
    color: #de935f;
}

.theme-light .cm-s-base16-tomorrow span.cm-bracket {
    color: #282a2e;
}

.theme-light .cm-s-base16-tomorrow span.cm-tag {
    color: #c82829;
}

.theme-light .cm-s-base16-tomorrow span.cm-link {
    color: #b294bb;
}

.theme-light .cm-s-base16-tomorrow span.cm-error {
    background: #cc6666;
    color: #969896;
}

.theme-light .cm-s-base16-tomorrow .CodeMirror-matchingbracket {
    text-decoration: underline;
    color: white !important;
}


/* CodeMirror - Dark */

.theme-dark .cm-s-base16-tomorrow.CodeMirror {
    background: #000000;
    color: #e0e0e0;
    font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace;
}

.theme-dark .cm-s-base16-tomorrow div.CodeMirror-selected {
    background: #282a2e !important;
}

.theme-dark .cm-s-base16-tomorrow .CodeMirror-gutters {
    background: #1d1f21;
    border-right: 0px;
}

.theme-dark .cm-s-base16-tomorrow .CodeMirror-linenumber {
    color: #969896;
}

.theme-dark .cm-s-base16-tomorrow .CodeMirror-cursor {
    border-left: 1px solid #b4b7b4 !important;
}

.theme-dark .cm-s-base16-tomorrow span.cm-comment {
    color: #8e908c;
}

.theme-dark .cm-s-base16-tomorrow span.cm-atom {
    color: #b294bb;
}

.theme-dark .cm-s-base16-tomorrow span.cm-number {
    color: #b294bb;
}

.theme-dark .cm-s-base16-tomorrow span.cm-property,
.theme-dark .cm-s-base16-tomorrow span.cm-attribute {
    color: #f5871f;
}

.theme-dark .cm-s-base16-tomorrow span.cm-keyword {
    color: #cc6666;
}

.theme-dark .cm-s-base16-tomorrow span.cm-string {
    color: #70c0b1;
}

.theme-dark .cm-s-base16-tomorrow span.cm-variable {
    color: #b5bd68;
}

.theme-dark .cm-s-base16-tomorrow span.cm-variable-2 {
    color: #81a2be;
}

.theme-dark .cm-s-base16-tomorrow span.cm-def {
    color: #de935f;
}

.theme-dark .cm-s-base16-tomorrow span.cm-error {
    background: #cc6666;
    color: #b4b7b4;
}

.theme-dark .cm-s-base16-tomorrow span.cm-bracket {
    color: #e0e0e0;
}

.theme-dark .cm-s-base16-tomorrow span.cm-tag {
    color: #d54e53;
}

.theme-dark .cm-s-base16-tomorrow span.cm-link {
    color: #b294bb;
}

.theme-dark .cm-s-base16-tomorrow .CodeMirror-matchingbracket {
    text-decoration: underline;
    color: white !important;
}


/* PrettyPrint - Base */


/* Specify class=linenums on a pre to get line numbering */

ol.linenums {
    margin-top: 0;
    margin-bottom: 0;
}


/* PrettyPrint - Light */

.theme-light .prettyprint {
    background: #F6F6F6;
    font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace;
}

.theme-light .pln {
    color: #4d4d4c;
}

@media screen {
    .theme-light .str {
        color: #718c00;
    }
    .theme-light .kwd {
        color: #8959a8;
    }
    .theme-light .com {
        color: #8e908c;
    }
    .theme-light .typ {
        color: #4271ae;
    }
    .theme-light .lit {
        color: #f5871f;
    }
    .theme-light .pun {
        color: #4d4d4c;
    }
    .theme-light .opn {
        color: #4d4d4c;
    }
    .theme-light .clo {
        color: #4d4d4c;
    }
    .theme-light .tag {
        color: #c82829;
    }
    .theme-light .atn {
        color: #f5871f;
    }
    .theme-light .atv {
        color: #3e999f;
    }
    .theme-light .dec {
        color: #f5871f;
    }
    .theme-light .var {
        color: #c82829;
    }
    .theme-light .fun {
        color: #4271ae;
    }
}

@media print,
projection {
    .theme-light .str {
        color: #006600;
    }
    .theme-light .kwd {
        color: #006;
        font-weight: bold;
    }
    .theme-light .com {
        color: #600;
        font-style: italic;
    }
    .theme-light .typ {
        color: #404;
        font-weight: bold;
    }
    .theme-light .lit {
        color: #004444;
    }
    .theme-light .pun,
    .theme-light .opn,
    .theme-light .clo {
        color: #444400;
    }
    .theme-light .tag {
        color: #006;
        font-weight: bold;
    }
    .theme-light .atn {
        color: #440044;
    }
    .theme-light .atv {
        color: #006600;
    }
}


/* PrettyPrint - Dark */


/* Tomorrow Night Bright Theme */

.theme-dark .prettyprint {
    background: #000000;
    font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace;
}

.theme-dark .pln {
    color: #eaeaea;
}

@media screen {
    .theme-dark .str {
        color: #b9ca4a;
    }
    .theme-dark .kwd {
        color: #c397d8;
    }
    .theme-dark .com {
        color: #969896;
    }
    .theme-dark .typ {
        color: #7aa6da;
    }
    .theme-dark .lit {
        color: #e78c45;
    }
    .theme-dark .pun {
        color: #eaeaea;
    }
    .theme-dark .opn {
        color: #eaeaea;
    }
    .theme-dark .clo {
        color: #eaeaea;
    }
    .theme-dark .tag {
        color: #d54e53;
    }
    .theme-dark .atn {
        color: #e78c45;
    }
    .theme-dark .atv {
        color: #70c0b1;
    }
    .theme-dark .dec {
        color: #e78c45;
    }
    .theme-dark .var {
        color: #d54e53;
    }
    .theme-dark .fun {
        color: #7aa6da;
    }
}

@media print,
projection {
    .theme-dark .str {
        color: #006600;
    }
    .theme-dark .kwd {
        color: #006;
        font-weight: bold;
    }
    .theme-dark .com {
        color: #600;
        font-style: italic;
    }
    .theme-dark .typ {
        color: #404;
        font-weight: bold;
    }
    .theme-dark .lit {
        color: #004444;
    }
    .theme-dark .pun,
    .theme-dark .opn,
    .theme-dark .clo {
        color: #444400;
    }
    .theme-dark .tag {
        color: #006;
        font-weight: bold;
    }
    .theme-dark .atn {
        color: #440044;
    }
    .theme-dark .atv {
        color: #006600;
    }
}
