/* Here is a CSS cheat sheet: */
/* - # for ids */
/* - . for classes */
/* - a b for all b inside a */

/* latin */
@font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 400;
    src: url(orbitron.woff) format('woff');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg1: #31393c;
    --bg2: #29589e;
    --bg3: #2176FF;
    --selected: #33a1fdb5;
    --text: #98b69f;
    --tint1: #fdca40;
    --tint2: #fab132;
    --tint3: #f79824;

    --sidebarWidth: 420px;
}

body {
    font-variant-numeric: tabular-nums;
    background-color: var(--bg1);
    color: var(--text);
    padding: 0;
    margin: auto;
    height: 100%;
    font-family: Orbitron;
    text-transform: uppercase;
    overflow: hidden;
}

.renderer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0px;
}

a {
    color: var(--tint1);
}

hr {
    margin: 0px;
    border: none;
    background-color: var(--bg2);
    height: 2px;
}

#root {
    display: flex;
    flex-flow: row;
    flex: 0 0 100%;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#leadingSidebar {
    background-color: var(--bg1);
    min-width: var(--sidebarWidth);
    width: var(--sidebarWidth);
    max-width: var(--sidebarWidth);
    display: flex;
    flex-flow: column;
    padding: 8px;
    overflow: scroll;
}

#infoButton {
    width: 100%;
    text-align: right;
}

#centerArea {
    display: flex;
    flex-basis: 100%;
    flex-flow: row;
    flex-wrap: wrap;
    padding: 8px;
    overflow: scroll;
}

#daysPicker {
    margin-top: auto;
    flex-wrap: wrap;
    display: flex;
    flex-direction: row;
}

.day, .metricView {
    outline-width: 1px;
    outline: solid;
    outline-color: var(--bg2);
    margin: 4px;
    padding: 4px;
}

.day {
    text-align: right;
    display: inline;
    flex 1;
    flex-basis: 85px;
    aspect-ratio: 1/1;
}

#heartContainer {
    flex-grow: 2;
    flex-basis: 500px;
}

#heartContainer .dataDisplay {
    flex-direction: column;
}

.verticalStack {
    align-items: end;
    display: flex;
    flex-direction: column;
    margin-left: auto;
    margin-top: auto;
    margin-bottom: auto;
}

.label {
    font-weight: normal;
    color: var(--tint1);
    font-size: 2em;
    display: block;
    width: 3ch;
    text-align: left;
}

.data {
    font-weight: bold;
    font-size: 3em;
    width: 3ch;
    text-align: right;
}

.dataNode {
    align-content: center;
    align-items: center;
    display: flex;
    flex-flow: row-reverse;
}

.little .data {
    font-size: 2em;
}

.graph {
    flex: 1;
    flex-basis: 200px;
    min-width: 100px;
    min-height: 100px;
    margin: 10px;
}

.metricView {
    flex-direction: column;
    flex-grow: 2;
}

.dataDisplay {
    padding: 8px;
    margin: 8px;
    flex-direction: column;
    flex-basis: max-content;
    display: flex;
}

.metricView h2 {
    display: inline;
    margin-bottom: 10px;
}

.justData {
    flex-grow: 1;
}

.ageIndicator {
    max-width: 100%;
    align-items: end;
    flex-flow: column;
}

.ageIndicator .data {
    width: 11ch;
    font-size: 2rem;
}

#heart_rate, #heart_rate_variability {
    flex-direction: row;
    display: flex;
}

#heartContainer .data {
    width: 4ch;
}

#activityContainer {
    flex-basis: 300px;
}

#activityContainer .dataDisplay {
    flex-direction: column;
}

#activityContainer .graph {
    aspect-ratio: 1;
}

#activityContainer .label {
    width: 4ch;
}

#activityContainer .data {
    width: 5ch;
}

#hydrationContainer .graph {
    width: 75px;
}

#hydrationContainer .data {
    width: 4ch;
}

#macronutrientContainer {
    flex-basis: 900px;
}

#macronutrientContainer .data {
    width: 5ch;
}

#micronutrientContainer .data {
    width: 5ch;
}

#micronutrientContainer {
    flex-basis: 200px;
}

#respiratoryContainer .data {
    width: 4ch;
}

.selected {
    animation-duration: 0.2s;
    animation-name: selection;
    animation-fill-mode: forwards;
}

.unselected {
    animation-duration: 0.2s;
    animation-name: unselection;
    animation-fill-mode: forwards;
}

.tint1 {
    color: var(--tint1);
}

.tint2 {
    color: var(--tint2);
}

.tint3 {
    color: var(--tint3);
}

.bg1 {
    color: var(--bg1);
}

.bg2 {
    color: var(--bg2);
}

.bg3 {
    color: var(--bg3);
}

#tooltip {
    position: fixed;
    font-size: 2em;
    top: 100px;
    background: var(--bg3);
    color: var(--tint3);
    padding: 8px;
}

@keyframes selection {
    from {
        background-color: none;
    }
    to {
        background-color: var(--selected);
    }
}

@keyframes unselection {
    from {
        background-color: var(--selected);
    }
    to {
        background-color: none;
    }
}

@media (max-width: 1000px) {
    .dataDisplay {
        flex-direction: column;
    }

    .dataNode {
        align-content: center;
        align-items: center;
        display: flex;
        flex-direction: column;
        flex-flow: column;
        align-content: end;
        align-items: end;
    }

    .label {
        text-align: right;
    }
}

@media (max-width: 800px) {
    #root {
        flex-flow: column-reverse;
    }

    #heart_rate, #heart_rate_variability {
        flex-direction: column;
    }

    #leadingSidebar {
        min-width: 100%;
        max-width: 100%;
        flex-basis: auto;
        flex-grow: 1;
        overflow: visible;

        outline-width: 1px;
        outline: solid;
        outline-color: var(--bg2);
    }

    #centerArea {
        margin-left: 0px;
    }

    .verticalStack {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        margin-right: auto;
    }

    .label {
        text-align: center;
    }

    .data {
        text-align: center;
    }

    .dataNode {
        align-items: center;
    }

    .ageIndicator {
        margin-right: 8px;
        align-items: end;
    }
}

