:root {
    --font-color: darkblue;
    --font-size: 12pt;
    --sub-font-size: 8pt;
    --main-color: #034769;
    --contrast-color: white;
    --border-color: #086fa1;
    --border-width: 1px;
    --input-width: 300px;
    --input-half-width: calc(var(--input-width) / 2 - 7px);
    --toggle-size: 30px;
}

html {
    background: #aaa;
    height: 100%;
}

body {
    margin: 0px;
    background: var(--contrast-color);
    font: var(--font-size) sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

p {
    margin: 0;
}

main {
    margin: 10px;
    flex-grow: 1;
    /*display: flex;
    flex-flow: row wrap;*/
}

/*#input_data {
    flex-grow: 0.4;
}

#result {
    flex-grow: 1;
}*/

.input_single {
    width: var(--input-width);
}

.input_part {
    width: var(--input-half-width);
}

section main {
    margin: 5px;
    display: block;
}

section header {
    font-size: var(--font-size);
    border-radius: 10px;
}

footer, header {
    font-size: 18px;
    padding: 6px;
    background: var(--main-color);
    color: var(--contrast-color);
}

header {
    grid-row: 1;
    display: grid;
    grid-template-columns: 300px 1fr;
}

#about {
    grid-column: 2;
    text-align: right;
}

#about img {
    width: 40px;
    height: 40px;
    filter: invert(1);
}

footer {
    text-align: center;
    flex-shrink: 0;
}

label {
    display: block;
    margin-top: 10px;
}

input, select, button, textarea {
    color: var(--font-color);
    margin: 5px;
    font-size: var(--font-size);
    border-color: var(--border-color);
    border-style: solid;
    border-width: var(--border-width);
    border-radius: 5px;
}

#target_conc {
    background: var(--contrast-color);
}

textarea {
    font-size: var(--sub-font-size);
}

button {
    margin: 10px 5px;
}

#valves {
    margin: calc(var(--toggle-size) / 3) 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

#valves label {
    margin: 0;
    width: var(--toggle-size);
    text-align: center;
}

.toggle_button {
    margin: 0;
    height: calc(var(--toggle-size) * 2);
    width: var(--toggle-size);
    vertical-align: center;
    background: var(--contrast-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: calc(var(--toggle-size) / 2);
    outline: none;
    position: relative;
    display: inline-block;
    appearance: none;
    -moz-appearance: none;
}

.toggle_button::after {
    content: "";
    display: inline-block;
    position: absolute;
    left: 2px;
    top: 2px;
    width: calc(var(--toggle-size) - 6px);
    height: calc(var(--toggle-size) - 6px);
    background-color: gray;
    border-radius: 50%;
    transform: translateY(0);
}

.toggle_button:checked::after {
    transform: translateY(calc(100% + 6px));
    background-color: red;
}

.valves {
    flex: 1 1 auto;
    max-width: 50px;
}

.error {
    color: red;
}

a:link {
    color: var(--contrast-color);
}

a:visited {
    color: var(--contrast-color);
}

#info {
    width: 100%;
    height: 200px;
}
