/*******************************************************
*
Theme Name:     FPGA - Interface
Theme URI:      
Description:    
Version:        2.0
Author:         Joachim Reif
License:        none (public domain)
Tags:           Look of the main user interface
*
*******************************************************/

/*******************************************************
*
Directory
1. CSS-Reset
2. Colors
3. Basic class styles
4. Layout of the first level sturctures
5. Style of the settings-sidebar
6. Parameter containers
7. Editor
8. Clusterlayout
9. Clustertooltip
10. Startbutton
11. Progress-Bar
12. Error Informations
13. Others
*
*******************************************************/

/* 1. CSS-Reset */
html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

/* 2. Colors */
:root {
    --rwth-blue: rgb(0, 100, 239);
    --blue-hover: rgb(0, 84, 202);
    --blue-active: rgb(0, 62, 150);

    --light-blue: rgb(0, 183, 255);
    --blue-trans: rgba(0, 100, 239, 0.2);


    --light-grey: rgb(235, 235, 235);
    --border-color: rgb(0, 0, 0);
    --cluster-standard: rgb(0, 187, 0);
    --progressbar-background: rgb(61, 61, 61);
}

/* 3. Basic class styles */
table {
    border: var(--border-color) 2px solid;
    border-collapse: separate;
    border-spacing: 2px, 5px;
}

td {
    padding-left: 3px
}

thead td {
    background-color: var(--rwth-blue)
}

tbody td {
    background-color: var(--light-blue)
}

.text-std {
    font: 1rem/100% Arial, sans-serif;
}

.first-level {
    z-index: 1;
    border: var(--border-color) 1px solid;
}

.button-sidepanel {
    width: 12vw;
    height: 40px;
    margin: 10px 0px;
    font-size: 16pt;
    background-color: var(--rwth-blue);
    border: var(--border-color) 4px solid;
    border-radius: 8px;
}

.button-sidepanel:hover {
    background-color: var(--blue-hover);
}

.button-sidepanel:active {
    background-color: var(--blue-active);
}

.tooltiptext {
    visibility: hidden;
    font-size: 16pt;
    z-index: 3;
    padding: 8px 3px;
    background-color: var(--light-blue);
    border: var(--border-color) 2px solid;
}

/* 4. Layout of the first level sturctures */
body {
    position: fixed;
    display: grid;
    row-gap: 0;
    column-gap: 0;
}

@media screen and (max-height: 56.25em) {
    body {
        grid-template-columns: 50vw 35vw 15vw;
        grid-template-rows: 6vh 44vh 44vh 6vh;
    }

    h1 {
        height: 4vh;
        margin-top: 1vh;
        margin-bottom: 1vh;
        font-size: 3.5vh;
    }

    label[for="cb-settings"] {
        height: 4vh;
        width: 4vh;

        position: absolute;
        top: 1vh;
        right: 1vh;
    }

    #start {
        height: 4vh;
        width: 200px;

        margin-top: 1vh;
        margin-bottom: 1vh;

        font-size: 2ex;
    }

    #output-window {
        height: 3vh;
        width: 150px;

        margin-top: 1.5vh;
        margin-bottom: 1.5vh;

        font-size: 1.5ex;
    }

    .progress-bar {
        height: 3vh;
        width: 40vw;
        position: relative;

        margin-top: 1.5vh;
        margin-bottom: 1.5vh;
        margin-left: 5vw;
        float: left;
    }
}

@media screen and (min-height: 56.25em) {
    body {
        grid-template-columns: 50vw 35vw 15vw;
        grid-template-rows: 63px calc(50vh - 63px) calc(50vh - 63px) 63px;
    }

    h1 {
        height: 40px;
        margin-top: 11.5px;
        margin-bottom: 11.5px;
    }

    label[for="cb-settings"] {
        height: 40px;
        width: 40px;

        position: absolute;
        top: 11.5px;
        right: 11.5px;

        font-size: 2em
    }

    #start {
        height: 43px;
        width: 300px;

        margin-top: 10px;
        margin-bottom: 10px;

        font-size: 18pt;
    }

    #output-window {
        height: 35px;
        width: 200px;

        margin-top: 14px;
        margin-bottom: 14px;

        font-size: 12pt;
    }

    .progress-bar {
        position: relative;
        width: 40vw;
        height: 30px;

        margin-top: 16.5px;
        margin-bottom: 16.5px;
        margin-left: 5vw;
        float: left;
    }

}

header {
    grid-column: 1/4;
    grid-row: 1/2;
    background-color: var(--rwth-blue);
    user-select: none;
}

footer {
    grid-column: 1/4;
    grid-row: 4/5;
    background-color: var(--rwth-blue);
    text-align: center;
}

#parameters {
    grid-column: 1/2;
    grid-row: 2/3;
    position: relative;
}

#graph {
    grid-column: 1/2;
    grid-row: 3/4;

    overflow-y: auto;
}

#editor {
    grid-column: 1/2;
    grid-row: 2/4;

    visibility: hidden;
    background-color: lightgray;

    position: relative;
}


#matrix {
    grid-column: 2/4;
    grid-row: 2/4;
    display: grid;
    position: relative;
}

#errorInformations {
    grid-column: 3/4;
    grid-row: 2/3;
    z-index: 2;
    visibility: hidden;
    border: var(--border-color) solid 1px;
    background-color: var(--light-grey);
    position: relative;
    user-select: none;
}


/* 5. Style of the settings-sidebar */
#setting {
    grid-column: 3/4;
    grid-row: 1/5;
    padding-top: 10vh;
    text-align: center;
    background-color: var(--light-grey);
    border-left: var(--border-color) 2px solid;
    z-index: 3;
    visibility: hidden;
}

#setting ul {
    width: 13vw;
    margin: 20px 0vw 20px 1vw;
    border: none;
    position: absolute;
    bottom: 0;
    text-align: center;
    user-select: none;
}

#setting li {
    text-align: center;
    list-style-type: none;
}

#cb-settings {
    z-index: 0;
    display: none;
}

label[for="cb-settings"] {
    z-index: 4;
    text-align: center;
    font-weight: bold;
    background-color: var(--light-blue);
    border: var(--border-color) 3px solid;
    border-radius: 5px;
    user-select: none;
}

label[for="cb-settings"]:hover {
    background-color: var(--blue-hover);
}

#cb-settings:checked+label[for="cb-settings"] {
    right: 12vw;
}

#cb-settings:checked~aside {
    visibility: visible;
}

#bt-logout {
    background-color: var(--blue-trans);
    color: var(--rwth-blue);
    border-color: var(--rwth-blue);

    border-width: 1px;
}

#bt-logout:hover {
    color: var(--blue-hover);
    border-color: var(--blue-hover);
    border-width: 3px;
}

#bt-logout:active {
    color: var(--blue-active);
    border-color: var(--blue-active);
    border-width: 3px;
}

/* 6. Parameter containers */

#parameters form {
    display: flex;
    flex-direction: row;
    /* flex-wrap: wrap; */
}

#params-first {
    width: 25vw;
    font-size: 1.25rem;
}

#params-second {
    width: 25vw;
    font-size: 1.25rem;
}

#params-first>* {
    margin-left: 5px;
    margin-top: 5px;
}

#params-second>* {
    margin-left: 5px;
    margin-top: 5px;
}

#toggle-editor {
    width: 8vw;
    height: 5vh;
    position: absolute;

    margin-top: 10px;

    left: 50%;
    bottom: 10%;
    transform: translate(-50%, 0);
}

/* 7. Editor */

.CodeMirror * {
    font-size: 1rem;
}

#editor>button {
    width: 25%;
    height: 5%;
}

#save-editor {
    position: absolute;
    bottom: 3%;
    left: 12%;
}

#cancel-editor {
    position: absolute;
    bottom: 3%;
    right: 12%;
}

#codemirror-textarea {
    width: 100%;
    height: 89%;
}

/* 8. Clusterlayout */
#matrix label {
    background-color: var(--cluster-standard);
    border: var(--border-color) 2px solid;
    border-radius: 4px;

    padding-left: 0.25vh;
    user-select: none;
}

#matrix hr {
    position: absolute;
    border-width: 2px;
    border-style: solid;
    border-color: grey;
    /* background-color: grey; */
}

/* 9. Clustertooltip */
#matrix>p {
    font-size: 0.9rem;
    font-weight: bold;
    user-select: none;

    padding: 10px;
    margin-right: 0.5vw;

    position: absolute;
    right: 5px;
}

#cluster-tooltip {
    position: absolute;
    right: 5px;
    top: 12vh;
}

#matrix>p:hover+#cluster-tooltip {
    visibility: visible;
}

/* 10. Startbutton */
#start {
    text-align: center;
    margin: 10px;

    border: var(--border-color) 4px solid;
    border-radius: 25px;
    box-shadow: 2px 2px black;

    position: relative;
    top: -2px;
    left: -2px;

    background-color: var(--light-blue);
}

#start:hover {
    box-shadow: none;
    top: 0;
    left: 0;
}

/* 11. Progerss-Bar */
.progress-bar {
    background-color: var(--progressbar-background);
    color: var(--progressbar-background);
    border-radius: 1.5rem;
    display: none;
}

.progress-bar::before {
    height: 1.75;
    content: attr(data-label);
    display: flex;
    align-items: center;
    position: absolute;
    left: .375rem;
    top: .375rem;
    bottom: .375rem;

    width: calc(var(--width, 0) * 1%);
    min-width: 20px;
    max-width: calc(100% - 1rem);
    background-color: var(--light-blue);
    border-radius: 1rem;
    padding: .2rem;
}

footer b {
    display: none;
}

/* 12. Error Informations */
#errorInformations>table {
    width: 14vw;
    margin-left: .5vw;
    margin-right: .5vw;
    margin-top: 1vh;
    font-size: 1.2rem;
}

#errorInformations button {
    position: absolute;
    bottom: 10px;
    left: 1.5vw;
}

/* Others */
h1 {
    color: rgb(255, 255, 255);
    margin-left: 5px;
}

#console_output {
    display: none;
    background-color: gray;
}