/* Code to make input and output line up side by side */

#wrapper {
    width: 100%;
    height: calc(100vh - 7em);
    position: relative;
}

.panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    padding: 2px 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}

.panel-left {
    left: 0;
}

.panel-right {
    right: 0;
}

#input {
    margin-top: 0px;
    margin-bottom: 2px;
    width: 100%;
    resize: none;
}

#output {
    min-width: 100%;
    border-style: solid;
    overflow-y: auto;
}

#input, #output {
    height: 100%;
    padding: 4px;
    border-color: #ccc;
    border-radius: 3px;
    background-color: white;
    border-width: 1px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}

#menu {
    margin-top: 1em;
    padding: 2em 1em 0 1em;
    position: relative;
    width: 100%;
    min-height: 5em;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 3px;

    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

#template {
    position: absolute;
    z-index: 1;
    left: 5em;
}

#template .ui-menu-item {
    white-space: nowrap;
}

#menu > legend {
    position: absolute;
    top: -0.58em;
    left: 0.5em;
    font-weight: bold;
    font-size: 24px;
    background-color: #f1f1f1;
}

.controlgroup {
    display: inline-block;
}

.settings-container {
    flex-grow: 1;
    display: flex;
    flex-direction: row-reverse;
}

.settings-container .control {
    margin-left: auto;
}

.control, .control:focus {
    border: none;
    border-radius: 3px;
    background-color: #f1f1f1;
    -webkit-transition: background-color 0.3s;
    -moz-transition: background-color 0.3s;
    -ms-transition: background-color 0.3s;
    -o-transition: background-color 0.3s;
    transition: background-color 0.3s;
}
.control:hover {
    background-color: #fafafa;
    border: none;
}
.control:active {
    background-color: #c1c1c1;
    color: initial;
}


body {
    font-family: Trebuchet MS, sans-serif;
    background-color: #f1f1f1;
}

#output {
    font-family: Verdana, sans-serif;
}

.ui-dialog {
    box-shadow: 2px 2px 8px gray;
}

#settings-dialog .input-field {
    display: flex;
}

#settings-dialog .input-field label, #settings-dialog .input-field select {
    flex-grow: 1;
}

#settings-dialog input[type="checkbox"] {
    width: 1em;
    height: 1em;
    background-color: transparent;
    border: 1px solid black;
}

@media screen and (max-width: 852px) {
    .panel {
        position: relative;
        display: block;
        width: 100%;
    }

    .panel-right {
        height: 100vh;
    }

    .controlgroup {
        flex-grow: 1;
        display: flex;
    }

    .control {
        flex-grow: 1;
    }

    .settings-container .control {
        flex-grow: 0;
    }

    .optionalContent {
        display: none;
    }
}

/* [sign] */
span.sig {
    font-family: Times New Roman, serif;
}

/* [field] has-pen option */
.write-prompt {
    color: #0066cc;
    text-decoration: underline;
    cursor: not-allowed;
}
/* [field] sample text option */
.sample-text {
    font-style: italic;
}

/* [small] */
.small-text {
    font-size: 0.8rem;
}
/* [large] */
.large-text {
    font-size: 1.2rem;
}

/* [fontred] */
mark.fontred {
    color: red;
}

/* [fontgreen] */
mark.fontgreen {
    color: green;
}

/* [fontblue] */
mark.fontblue {
    color: blue;
}

/* warning and error styling */
#warning {
    padding: 4px;
    margin: 4px 0 2px 0;
    border-radius: 3px;
}
#warningText {
    padding-left: 6px;
}

/* flexbox formatting for credits */
#credits, .credits-section, .credits-row {
    display: flex;
    justify-content: space-between;
}
#credits, .credits-section {
    flex-direction: column;
}
.credits-section {
    margin: 20px 10px;
}
.credits-row {
    margin: 5px;
}

/* Credits header formatting */
.credits-header {
    font-weight: bold;
    font-size: 24px;
    margin-bottom: 5px;
}

/* Give equal width to credits cells */
.credits-section, .credits-row, .credits-cell {
    flex-grow: 1;
}
.credits-cell {
    flex-basis: 0;
}

/* Align text in credits cells */
.credits-row > .credits-cell {
    text-align: center;
}
.credits-row > .credits-cell:last-child {
    text-align: right;
}
.credits-row > .credits-cell:first-child {
    text-align: left;
}

/* Align credit icons to center to make spacing look a bit better */
#credits > .credits-section:first-child > .credits-row > .credits-cell:last-child {
    text-align: center !important;
}