html, body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

/* https://css-tricks.com/transitions-only-after-page-load/ */
.preload * {
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
}

.container {
    width: 80%;
    margin: 75px auto 0;
    text-align: center;
}

.container-code {
    width: 80%;
    margin: 75px auto 0;
    text-align: left;
}

.container > * {
    text-align: left;
}

hr {
    margin: 0;
}

#file {
    width: 80%;
    margin: 10px auto;
    text-align: center;
}

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

#flex > * {
    height: 400px;
}

textarea {
    background: transparent;
}

select, option {
    background: inherit;
}

#program-container {
    display: flex;
    flex-direction: column;
    flex: 2 0 0;
    width: 50%;
    min-width: 500px;
}

#program {
    flex: 1 0 0;
    height: 100%;
}

#register-container {
    width: 60px;
}

#tab-container {
    flex: 1 0 0;
    display: flex;
    flex-direction: column;
    min-width: 320px;
    min-height: 360px;
}

.tab-content {
    flex: 1 0 0;
    display: flex;
    min-height: 0;
}

footer {
    margin-top: 1em;
    padding: 1em 0;
    text-align: center;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 1em;
    background: #fff;
    z-index: -1;
    opacity: 0;
    /* http://stackoverflow.com/a/19311234 */
    transition: z-index 0.2s step-end, opacity 0.2s linear;
}

.overlay:target {
    opacity: 1;
    z-index: 22;
    transition: z-index 0.2s step-start, opacity 0.2s linear;
}

.popup {
    position: relative;
}

.popup .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #000;
    font-size: 30px;
    font-weight: bold;
    transition: all 200ms;
    opacity: 1;
}

.popup .close:hover {
    color: #888;
}

#datapath-display-instructions {
    text-align: center;
    visibility: hidden;
}

#instructions {
    display:inline-block;
    width: 49%;
    float: left;
}

#micro-instructions {
    display: inline-block;
    width: 49%;
    float: right;
    height: 6em;
    overflow: auto;
    border: 1px solid black;
}

#micro-instructions td {
    margin: auto;
    text-align: center;
}

#current-instruction {
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    width: auto;
    font-size: 30px;
}

#previous-instruction, #next-instruction {
    color: #888;
}

#datapath-too-fast-warning {
    visibility: hidden;
}

#memory-display {
    overflow: auto;
    max-width: 100%;
    display: inline-block;
}

#memory-container {
    display: none;
    width: 824px;
    height: 250px;
    overflow-y: scroll;
}

#memory-headers, #memory {
    width: 800px;
    table-layout: fixed;
    text-align: center;
}

#memory-headers th, #memory th {
    border: 0.1em solid #ccc;
    text-align: center;
    font-family: sans-serif
}

#memory tr:nth-child(odd) .cell:nth-child(even) {
    background: #f2f2f2;
}

#memory tr:nth-child(odd) .cell:nth-child(odd) {
    background: #e0e0e0;
}

#memory tr:nth-child(even) .cell:nth-child(even) {
    background: #e0e0e0;
}

#memory tr:nth-child(even) .cell:nth-child(odd) {
    background: #ffffff;
}

#registers, #memory-headers, #memory, #register-log {
    font-family: Courier New, Courier, monospace;
}

#action-bar {
    padding: 0 2em;
    line-height: 2em;
}

#action-bar input {
    height: 1em;
}

.CodeMirror {
    border: 0.1em solid #ccc;
    flex: 1 0 0;
    height: 100%;
}

.breakpoints {
    width: 0.8em;
}

#status-info-container {
    margin: 0;
}

#status-info {
    background: #eee;
    padding: 0.5em 1em;
    color: black;
}

#status-info.error {
    background: #ecc;
}

.error-line {
    background-color: #ECC;
}

.current-instruction {
    background-color: #99E;
}

.next-instruction {
    background-color: #FFF;
}

.active-break-point {
    background-color: #ADF;
}

.highlighted-line {
    background-color: #EEE;
}

.current-pc {
    background-color: #0F0 !important;
}

.current-mar {
    background-color: #FF0 !important;
}

#saved-status {
    color: #AAA;
    float: right;
}

#registers {
    padding: 0 0.5em;
    margin: 0 10px;
}

#registers th {
    padding-top: 1em;
    font-family: sans-serif;
}

#registers td {
    border: 0.1em solid #ccc;
    text-align: center;
    font-family: sans-serif;
}

#register-label {
    padding: 0.5em 1em;
    background-color: #F9F9F9;
}

#output-log-outer, #register-log-outer, #watch-list-outer, #input-list-outer {
    flex: 1 0 0;
    padding: 0 0.5em;
    box-sizing: border-box;
    border: 0.1em solid #ccc;
    overflow-y: scroll;
    background-color: #FFF;
}

#output-log, #register-log {
    padding: 0.5em 1em;
    text-align: right;
	font-family: sans-serif;
}

#input-list-type {
    padding: 0.5em;
}

#input-list-outer {
    padding: 0;
    overflow: hidden;
    flex-direction: column;
}

#input-list-outer.active {
    display: flex;
}

#input-list {
    flex: 1 0 0;
}

.finished-instruction {
    border-bottom: 1px solid grey;
}

.instruction-register-log:hover {
    background: #eee;
}

#output-select {
    margin: 0.5em 0;
}

@media (max-width: 1000px) {
    .container {
        width: 95%;
    }

    #flex {
        flex-wrap: wrap;
    }

    #program-container {
        width: 100%;
    }
}

@media (max-width: 1300px) {
    .container {
        width: 90%;
    }
}

@media (min-width: 1600px) {
    .container {
        width: 80%;
    }
}

#file-io {
    padding: 10px;
    height: 60px
}

#forkme_banner {
    display: block;
    position: absolute;
    top: 5px;
    right: 10px;
    z-index: 10;
    padding: 10px 50px 10px 10px;
    color: #fff;
    background: url('../images/blacktocat.png') #0090ff no-repeat 95% 50%;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(0,0,0,.5);
    border-bottom-left-radius: 2px;
    border-bottom-right-radius: 2px;
}


codeblock {
    text-align: left;
    width: 50%;
    font-size: 95%;
    white-space: pre;
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -o-pre-wrap;
    background: #faf8f0;
}

#content codeblock {
    display: block;
    border: 1px solid #bebab0;
}

.inputfile + label {
    font-size: 1.25em;
    font-weight: 700;
    color: white;
    background-color: black;
    display: inline-block;
}

.inputfile:focus + label,
.inputfile + label:hover {
    background-color: red;
}

@media screen and (max-width: 767px) {
    .container {
        margin-top: 240px;
    }
}

#watch-list-outer {
    padding: 10px;
}

#watch-list-headers, #watch-list {
    width: 100%;
    table-layout: fixed;
}

#watch-list-headers {
    border-bottom: solid 1px #CCC;
}

.watch-list-label {
    text-overflow: ellipsis;
    overflow: hidden;
}

.watch-list-address, .watch-list-value {
    width: 70px;
}

#input-dialog {
    pointer-events: none;
    top: 150px;
}

#input-dialog * {
    pointer-events: all;
}

#place-input-dialog {
    position: absolute;
    visibility: hidden;
    z-index: -100;
}

.completion-origination.CodeMirror-hint,
.completion-operand.CodeMirror-hint {
    color: #219;
}

.completion-operator.CodeMirror-hint {
    color: #708;
}

.completion-label.CodeMirror-hint {
    color: #A11;
}

#delay-slider, #output-selector {
    white-space: nowrap;
}

.version {
    font-size: 10px;
}

.center {
    text-align: center;
}

#fileInput {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
}

.memory-changed {
    color: red;
}

.prefs-row{
    padding: 3px;
    width: 50%;
    text-align: right;
}

.pref-table{
    width: 100%;
}

.row {
  margin-left: 0px;
  margin-top: 5px;
  margin-right: 0px;
}

.simComponents{
  resize: both;
}
