body,
html {
    height: 100%;
    max-height: 100%;
    width: 100%;
    margin: 0px;
    padding: 0px;
    display: flex;
    flex-wrap: wrap;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

menu {
    height: 23px;
    background-color: #222;
    padding: 5px;
    width: 100%;
    margin: 0px;
}

menu button {
    background-color: #777;
    color: #eee;
    border: 1px solid #111;
    height: 22px;
    line-height: 22px;
    cursor: pointer;
    margin-right: 5px;
    padding: 0px 10px;
    transition: all 0.3s ease;
}

menu button:disabled {
    background-color: #ccc;
    color: #666;
    border: 1px solid #999;
    cursor: not-allowed;
}

menu button:hover {
    background-color: #333;
    color: #fff;
    border: 1px solid #000;
}

menu .active {
    background-color: #c00;
}

blockArea {
    width: 200px;
    border-right: 1px solid #111;
    height: calc(100% - 54px);
    overflow-y: auto;
    user-select: none;
}

blockArea block {
    display: block;
    width: calc( 100% - 15px );
    height: 40px;
    text-align: left;
    border-bottom: 1px solid #222;
    cursor: pointer;
    line-height: 40px;
    padding-left: 15px;
    transition: all 0.4s ease;
}

blockArea block:hover {
    background-color: #333;
    color: #fff;
    padding-left: 30px;
    width: calc( 100% - 30px );
    font-weight: bold;
}

drawArea {
    width: calc(100% - 200px - 1px);
    height: calc(100% - 54px);
    user-select: none;

    background-image: url("../img/pattern.svg");
    overflow: scroll;
}

drawArea svg {
    min-width: 10000px;
    min-height: 10000px;
}

drawArea svg .input {
    x: 0px;
    width: 10px;
    height: 10px;
    fill: #DD0000;
    cursor: pointer;
}

drawArea svg .output {
    x: 40px;
    width: 10px;
    height: 10px;
    fill: #0000FF;
    cursor: pointer;
}

drawArea svg:not([simulation=true]) .input:hover {
    transform: translateY( -2.5px );
    width: 15px;
    height: 15px;
    transition: all 0.3s ease;
}

drawArea svg:not([simulation=true]) .output:hover {
    transform: translateY( -2.5px );
    x: 40px;
    width: 15px;
    height: 15px;
    transition: all 0.3s ease;
}

drawArea svg[simulation=true] .input,
drawArea svg[simulation=true] .output {
    cursor: not-allowed;
}

drawArea svg .label {
    font-family: 'Courier New', Courier, monospace;
    transform: translateY(-3px);
}

drawArea svg .background {
    width: 50px;
    x: 0px;
    y: 0px;
    stroke: #111111;
    fill: #FFFFFF;
}

drawArea svg .connection .point {
    r: 5px;
}

drawArea svg .connection .line {
    fill: none;
    stroke: #111;
    stroke-width: 2px;
}

drawArea svg:not([simulation=true]) .connection .line {
    cursor: pointer;
}

drawArea svg .connection[selected=true] .line {
    filter: drop-shadow(0px 0px 3px #0000FF);
    stroke-width: 3.5px;
}

drawArea svg .connection[state=true] .line {
    stroke: #FF0000;
}

drawArea svg .connection[state=false] .line {
    stroke: #0000CC;
}

drawArea svg .block[selected=true] {
    filter: drop-shadow(0px 0px 3px #0000FF);
}

drawArea svg[simulation=true] .output[state=true], drawArea svg[simulation=true] .input[state=true] {
    fill: #FF0000;
}

drawArea svg[simulation=true] .output[state=false], drawArea svg[simulation=true] .input[state=false] {
    fill: #0000FF;
}

drawArea svg[simulation=true] .block .background {
    cursor: not-allowed;
}

drawArea svg[simulation=true] .block .blockSimulationClickable {
    cursor: pointer;
}

drawArea svg .block .info {
    visibility: visible;
    font-size: 0.7em;
    transform: translate(5px, 12px);
}

drawArea svg[simulation=true] .block .info {
    visibility: visible;
}

transactionList {
    display: none;
    position: absolute;
    top: 33px;
    right: 0;
    background-color: #fff;
    border: 1px solid #111;
    padding: 10px;
    width: 200px;
    height: calc(100% - 54px);
}

editor {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ededed;
    border: 1px solid #111;
    padding: 10px;
    width: 80%;
    height: 80%;
    box-shadow: 0px 0px 1000px #000;
    z-index: 10;
    overflow-y: auto;
}

editor .config {
    width: 100%;
    height: calc(100% - 160px);
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #111;
    position: relative;
    padding: 10px;
    box-sizing: border-box;
}

editor label {
    display: block;
    margin-top: 10px;
}

editor input,
editor select,
editor textarea {
    width: 100%;
    box-sizing: border-box;
}

editor button {
    margin-top: 10px;
    width: 100%;
}

editor input[type="checkbox"] {
    position: relative;
    left: 30px;
    top: 0px;
    z-index: 0;
    appearance: none;
}

editor input[type="checkbox"]+label {
    position: relative;
    display: block;
    cursor: pointer;
    line-height: 1.3;
    padding-left: 50px;
    width: 100%;
}

editor input[type="checkbox"]+label:before {
    width: 40px;
    height: 16px;
    border-radius: 30px;
    border: 2px solid #ddd;
    background-color: #EEE;
    content: "";
    margin-right: 15px;
    transition: background-color 0.5s linear;
    z-index: 5;
    position: absolute;
    left: 0px;
}

editor input[type="checkbox"]+label:after {
    width: 10px;
    height: 16px;
    border-radius: 30px;
    background-color: #fff;
    content: "";
    transition: margin 0.1s linear;
    box-shadow: 0px 0px 5px #aaa;
    position: absolute;
    left: 2px;
    top: 2px;
    z-index: 10;
}

editor input[type="checkbox"]:checked+label:before {
    background-color: #2b8718;
}

editor input[type="checkbox"]:checked+label:after {
    margin: 0 0 0 30px;
}

#status {
    color: #eee;
    float: right;
    line-height: 23px;
}

info {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s ease, opacity 0.3s ease;
    position: absolute;
    background-color: #ededed;
    border: 1px solid #111;
    padding: 5px;
    box-shadow: 0px 0px 5px #000;
    z-index: 20;
    font-size: 0.8em;
}

version {
    height: 20px;
    color: #aaa;
    line-height: 20px;
    padding-right: 5px;
    font-size: 0.7em;    
    width: calc(100% - 5px);
    text-align: right;
    background: #111;
}