html
{
    position: fixed;
    width: 100%;
    height: 100%;
}

body
{
    margin: 0;
    padding: 0;
    color: #bbbbbb;
    width: 100%;
    height: 100%;
    font-size: 11pt;
    font-family: Consolas, Menlo, Monaco;
    background: #2B2B2B;

    scrollbar-width: thin;
    scrollbar-color: dark;
}

.hidden
{
    display: none;
}

/* left toolbar */

nav
{
    display: flex;
    flex-direction: column;
    height: max-content;
    min-height: 100%;
    background: #404040;
}

nav span
{
    display: contents;
}

nav .control
{
    display: inline-block;
    position: relative;
    width: 8mm;
    height: 8mm;
    padding: 2mm;
    cursor: pointer;
}

a.control
{
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    font-family: sans-serif;
    font-size: 17pt;
    color: inherit;
    text-decoration: none;
}

nav .control:hover
{
    background: #505050;
}
nav .control.clickable:active
{
    background: #3a3a3a;
}

nav .control.inactive
{
    filter: grayscale(100%);
    cursor: not-allowed;
}

@media screen and (max-height: 12cm)
{
    nav .control.inactive
    {
        display: none;
    }
}


nav .control > img
{
    width: 100%;
    height: 100%;
}

nav .separator
{
    height: 2px;
    background: #505050;
}

nav .numbase
{
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    font-family: sans-serif;
    font-size: 8pt;
}

.sidemenu
{
    display: none;
    position: absolute;
    z-index: 1000;
    top: 0;
    left: 100%;
    min-height: 100%;
    width: min-content;
    padding: 2mm;
    background: #505050;
    font-family: sans-serif;
    color: #dddddd;
    cursor: initial;
}

.control:hover > .sidemenu
{
    display: block;
}

/* tester sidemenu */

.testbarform
{
    display: flex;
    flex: 1 1 1px;
    flex-direction: column;
    margin: 2mm;
}

.testbarform *
{
    margin-top: 1mm;
}

.testbarview
{
    display: grid;
    grid-gap: 4mm;
    grid-template-columns: auto auto auto;
    margin: 2mm;
}

.testbarview :nth-child(1)
{
    order: 1;
}
.testbarview :nth-child(2)
{
    order: 2;
}
.testbarview :nth-child(3)
{
    order: 4;
}
.testbarview :nth-child(4)
{
    order: 5;
}
.testbarview :nth-child(5)
{
    order: 3;
}
.testbarview :nth-child(6)
{
    order: 6;
}

.compbanner
{
    width: 100%;
    margin-bottom: 2mm;
    color: #BBBBBB;
    text-align: center;
    font-size: 13pt;
    font-weight: bold;
    font-family: sans-serif;
}

/* register/memory display table */

.datadisplay
{
    font-family: monospace;
    border: none;
    border-collapse: collapse;
    white-space: nowrap;
}
.datadisplay > th
{
    font-weight: bold;
    font-family: sans-serif;
    text-align: center;
}
.datadisplay > tr
{
    border-bottom: 1px solid #777777;
}
.datadisplay tr :nth-child(1)
{
    padding-right: 3mm;
}
.datadisplay tr :nth-child(2)
{
    text-align: right;
}
.datadisplay td
{
    padding-left: 2px;
}

/* main panels */

.hwidgetcontainer
{
    display: flex;
    flex: 1 1 1px;
    flex-direction: row;
    height: 100%;
    width: 100%;
}
.gutter.gutter-horizontal
{
    z-index: 100;
    cursor: col-resize;
    background:  #444444;
}
.vwidgetcontainer
{
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 100%;
}
.gutter.gutter-vertical
{
    z-index: 100;
    cursor: row-resize;
    background:  #444444;
}

/* console */

.consolecontainer
{
    display: flex;
    flex: 1 1 1px;
    flex-direction: column;
    height: 100%;
    word-break: break-all;
}

.cout
{
    padding: 1mm;
    flex: 1 1 1px;
    height: 100%;
    white-space: pre-wrap;
    overflow-y: auto;
}

.cout .hilit
{
    color: #da9a12;
}

.cin
{
    padding: 1mm;
    border-bottom: 1px solid #444444;
}

.cin:focus
{
    outline: 0px solid transparent;
}

.cin:empty:not(:focus):before
{
    content:attr(placeholder);
    color:#999999;
}

@keyframes cin_flash
{
    from { border: 1px solid #444444; }   
    to { border: 1px solid #EEAA33; }   
}

.cin.flash
{
    border: 1px solid #da9a12;
    padding: calc(1mm - 1px);
    padding-bottom: 1mm;

    animation-name: cin_flash;
    animation-duration: 0.5s;
    animation-direction: alternate;
    animation-iteration-count: infinite;
}

/* processor state view */

.cpuview_banner
{
    display: flex;
    flex: 1 1 1px;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #555555;
    font-family: sans-serif;
    font-size: 20pt;
    font-weight: bold;
    user-select: none;
    overflow: auto;
}
.cpuview_container
{
    display: grid;
    grid-template-columns: 50% 50%;
    height: 100%;
    width: 100%;
    overflow: auto;
}
.cpuview_container > * > table
{
    width: calc(100% - 4mm);
    margin-top: 4mm;
}
.cpuview_container .datadisplay > tr
{
    border-bottom: 1px solid #555555;
}
.cpuview_container td
{
    padding-left: 2px;
}
.cpuview_memory_banner
{
    display: flex;
    height: 100%;
    overflow: auto;
    color: #555555;
    font-family: sans-serif;
    font-size: 16pt;
    font-weight: bold;
    align-items: center;
    justify-content: center;
    user-select: none;
}

/* 
.cpuview_container > :nth-child(1) .datadisplay tr :nth-child(1)
{
    color: #8caee2;
} */

.cpuview_misc /* IP and Overflow */
{
    font-family: monospace;
    border: none;
    border-collapse: collapse;
    white-space: nowrap;
}
.cpuview_misc > th
{
    font-weight: bold;
    font-family: sans-serif;
    text-align: center;
}
.cpuview_misc > tr
{
    border-bottom: 1px solid #555555;
}
.cpuview_misc tr :nth-child(1)
{
    padding-right: 3mm;
}
.cpuview_misc tr :nth-child(2)
{
    text-align: right;
}

/* disassembly view */

.disasm_banner
{
    display: flex;
    flex: 1 1 1px;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #555555;
    font-family: sans-serif;
    font-size: 20pt;
    font-weight: bold;
    user-select: none;
    overflow: auto;
}

.disasm_view
{
    height: 100%;
    width: 100%;
    overflow: auto;
    white-space: nowrap;
}
.disasm_view table
{
    margin-top: 1mm;
    width: 100%;
    border: none;
    border-collapse: collapse;
    text-align: left;
}

.disasm_view th
{
    font-weight: bold;
    font-family: sans-serif;
}
.disasm_view td
{
    white-space: pre;
    font-family: monospace;
}
.disasm_view td
{
    padding: 2px;
}

.disasm_view tbody tr
{
    box-sizing: border-box;
    border-top: 1px solid #555555;

}
.disasm_view tr.marked
{
    border-top: 1px solid #da9a12;
    border-left: 1px solid #da9a12;
    color: #da9a12;
}

.disasm_view tr.marked td:nth-child(1)
{
    padding-left: 1px;
}


/* CodeMirror customization */

.breakpoint_gutter
{
    color: #DD3333;
    width: 1em;
    text-align: center;
    vertical-align: middle;
}
.ipline_highlight
{
    border-top: 1px solid #da9a12;
    border-left: 1px solid #da9a12;
}
.errorline_highlight
{
    border-bottom: 1px solid #dd5555;
}

.cm-s-ourmips  { font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; }
.cm-s-ourmips.CodeMirror { background: #2B2B2B; color: #dddddd; }

.editor_grey
{
    filter: grayscale(60%);
}

.cm-s-ourmips span.cm-keyword { color: #BBB529; }
.cm-s-ourmips span.cm-operation { color: #da9a12; }
.cm-s-ourmips span.cm-register { color: #81a3d1; }
.cm-s-ourmips span.cm-string { color: #db8181; }
.cm-s-ourmips span.cm-comment { color: #8dd87e; }
.cm-s-ourmips span.cm-label { color: #ad91e0; }
.cm-s-ourmips span.cm-number { color: #a8d3e7; }

.cm-s-ourmips .CodeMirror-cursor { border-left: 1px solid #A9B7C6; }
.cm-s-ourmips .CodeMirror-activeline-background { background: #323232; }
.cm-s-ourmips .CodeMirror-gutters { background: #363636; border-right: 0px solid #303030; }
.cm-s-ourmips .CodeMirror-guttermarker { color: #FFEE80; }
.cm-s-ourmips .CodeMirror-guttermarker-subtle { color: #D0D0D0; }
.cm-s-ourmips .CodeMirror-linenumber { color: #AAAAAA; }
.cm-s-ourmips .CodeMirror-matchingbracket { background-color: #3B514D; color: #FFEF28 !important; font-weight: bold; }
.cm-s-ourmips div.CodeMirror-selected { background: #214283; }

.CodeMirror-hints.ourmips
{
  font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
  color: #9C9E9E;
  background-color: #3B3E3F !important;
}

.CodeMirror-hints.ourmips .CodeMirror-hint-active 
{
  background-color: #494D4E !important;
  color: #9C9E9E !important;
}

