*{
    box-sizing: border-box;
}

html{
    --backgroundColor: rgb(0,0,6);
    --secondaryBackgroundColor: rgba(30,30,50, 0.95);
    --backgroundHighlightColor: rgba(255,255,255,0.05);
    --secondaryBackgroundHighlightColor: rgba(255,255,255,0.15);
    --darkTint: rgba(0,0,0,0.8);
    --mainTextColor: rgb(200,200,200);
    --upColor: rgb(90,170,0);
    --downColor: rgb(200,30,0);
    --borderColor: rgba(255,255,255,0.2);
    --highlightBackgroundColor: rgba(0,255,0,0.4);
    --highlightColor: rgb(240, 200, 20);
    --subtleHighlightColor: rgb(150, 120, 20);

    --footerHeight: 80px;
    --graphHeight: 100px;

    color: var(--mainTextColor);
    font-family: Arial;
    background: var(--backgroundColor);

}

body{
    margin: 0;
    /*padding-bottom: calc(var(--footerHeight) + var(--graphHeight) + 40px);*/
    overflow-x: hidden;
    font-size: 12px;
}

a {
    color: white;
    font-weight: bold;
}

button{
    background: black;
    color: var(--highlightColor);
    border: none;
    font-weight: 400;
    text-transform: uppercase;
}

h1 {
    color: var(--highlightColor);
}

button.active{
    background: var(--highlightColor);
    color: black;
    font-weight: bold;
}

.graphBox{
    overflow: hidden;
    height: 40px;
    position: relative;
}

.graphBox canvas{
    position: absolute;
}

.graph{
    height: var(--graphHeight);
    position: fixed;
    bottom: var(--footerHeight);
    padding: 5px;
    left: 0;
    right: 0;
    background: var(--darkTint);
}

canvas{
    width: 100%;
    height: 100%;
}

.app {
    display: grid;
    grid-template-columns: 4.6fr 6fr;
    position: fixed;
    top:0;
    left: 0;
    right: 0;
    bottom: var(--footerHeight);
    padding-bottom: var(--graphHeight);
    align-content: stretch;
}

@media (max-width: 1110px) {
    .app {
        grid-template-columns: 1fr;
    }
}

.app > section{
    max-height: 100%;
    overflow-y: auto;
    position: relative;
}

table{
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 3em;
}

tbody{
    justify-content: flex-start;
}

.balance .onSale, .balance .onBuy{
    opacity: 0.7;
}

.info .onSale{
    opacity: 0.5;
}

.history .down {
    color: var(--downColor)
}
.history .up {
    color: var(--upColor)
}
.history .new td:first-child{
    border-left: solid 10px var(--highlightColor);
}

.info td.history{
    width: 100%;
}

tr.selected td{
    background: var(--highlightBackgroundColor);
    color: white;
}

.rateParts .minor{
    font-size: 0.5em;
}

.lowVolume{
    opacity: 0.8;
}

.up td.rate{
    color: var(--upColor);
}

.profit td.profit{
    color: var(--upColor);
}

.loss td.profit{
    color: var(--downColor);
}

.notTrading td{
    color: var(--subtleHighlightColor);
}

.down td.rate{
    color: var(--downColor);
}

footer .up{
    color: var(--upColor);
}

footer .down{
    color: var(--downColor);
}

td{
    background: transparent;
    transition: background 1s ease-out, box-shadow 1s ease-out;
    padding: 0.5em;
    border-bottom: 1px solid var(--borderColor);
    flex: none;
}

td canvas{
    height: 64px;
    margin: -0.5em;
}

.details{
    border-top: 1px solid var(--borderColor);
    position: fixed;
    bottom: calc(var(--footerHeight) + var(--graphHeight));
    left:0;
    right: 0;
    top: 0;
    background: var(--secondaryBackgroundColor);
    z-index: 1;
    max-height: 80vh;
    display: flex;
    flex-flow: column;
    align-content: stretch;
    margin-left: auto;
    max-width: 1087px;
}

.details.tradeDetails{
    margin-left: 0;
    margin-right: auto;
    max-width: 833px;
}

.details nav{
    display: flex;
    border-bottom: solid 2px black;
    overflow: auto;
}

.details nav button{
    padding: 2em;
}

.details section{
    padding: 10px;
}

.details nav button:last-child{
    margin-left: auto;
}


.details > .rules{
    overflow-y: auto;
    font-weight: bold;
    flex: 1 1 100%;
    margin: 10px;
}

.rules {
    margin-bottom: 30px;
}

thead, footer{
    font-weight: bold;
    font-size: 1.2em;
}

thead td.down, thead td.up{
    background-color: white;
    color: var(--secondaryBackgroundColor);
}

thead td.down:before{
    content: '\25BC ';
}

thead td.up:before{
    content: '\25B2 ';
}

footer{
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footerHeight);
    border-top: 1px solid var(--borderColor);
    align-items: stretch;
}

footer div{
    background: var(--secondaryBackgroundColor);
    padding: 10px;
    display: inline-block;
    flex: 1 1 auto;
    font-size: 1.3em;
}

.preshExplorer{
    margin: 5px 0;
    padding: 0 5px;
    display: block;
    white-space: inherit;
    border-left: solid 2px var(--highlightColor);
    font-size: 1.3em;
}

.preshExplorer > div {
    outline: 0px solid transparent;
}

.preshExplorer .node {
    display: inline-block;
    cursor: pointer;
    position: relative;
    transition: all 0.5s ease-out;
    padding: 0.02em;
}

.preshExplorer .node:not(.literal).active{
    padding: 0.3em;
    box-shadow: inset 0 -2px 0 -0px var(--highlightColor), inset 0 0 0 0.25px var(--highlightColor);
    border-radius: 7px;
    margin: 0.1em;
    padding-bottom: 0.5em;
    margin-bottom: 1.4em;
}

.preshExplorer .node:after, .token:after{
    content: attr(result);
    position: absolute;
    bottom: -1.1em;
    left: 0;
    right: 0;
    text-align: center;
    opacity: 0;
    transition: all 0.5s ease-out;
    color: var(--highlightColor);
    font-weight: 600;
    white-space: nowrap;
}

.preshExplorer .node.active:after{
    opacity: 1;
}

.preshExplorer .operator {
    display: inline-block;
}

.preshExplorer .identifier {
    transition: all 0.5s ease-out;
}

.preshExplorer .identifier.active {
    font-weight: 600;
    margin-bottom: 1.3em;
}

.preshExplorer .node[result=true] > .node:not([result=false]), .preshExplorer .node[result=true] > .symbol{
    color: var(--upColor);
    font-weight: 400;
}
.preshExplorer .node[result=true] .node[result=false] > *{
    color: inherit;
    font-weight: inherit;
}

.preshExplorer .parenthesis.close {
}

.preshExplorer .group > :not(.parenthesis) {
    margin: 0.3em;
}

.preshExplorer .group[result=true] .parenthesis{
    color: var(--upColor);
}

.preshExplorer .functionCall .parenthesis.open{
    margin-right: -0.7em;
    vertical-align: top;
    display: inherit;
}

.preshExplorer .functionCall .content {
    display: inline;
    display: -webkit-inline-box;
    margin: : 0.1em;
}

.preshExplorer .functionCall .content > .operator{
    /*width: 100%;*/
}

.preshExplorer .functionCall .content > .node{
    margin-left: 0.9em;
}

.preshExplorer .functionCall .parenthesis.close{
    margin-left: 0.2em;
}

.preshExplorer .node.period > .node.identifier,
.preshExplorer .node.functionCall > .node.identifier{
    pointer-events: none;
}
