﻿/**/html {
    height: 100%;
}
main {
    height: 100%;
}
input {
    padding: 4px;
    border-radius: 5px;
    margin-left: 10px;
    flex: 1;
}
.date-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 30px;
}
.input-container, .btn-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}
.input-container > * {
    padding: 10px 0;
    flex: 1;
}
.btn-container > button {
    margin: 5px 20px !important;
}
button{
    font-size: 1.3em !important;
}
.selector-label{
    color: white;
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 0;
}
#chart-container {
    margin-bottom: 20px;
    padding: 20px 1.5vw 0 1.5vw;
    flex-grow: 1;
    min-height: 50vh;
    width: 99vw;
    background-color: #292933;
    color: #ebebeb;
    border-radius: 5px;
    position: relative;
    display: flex;
    flex-direction: column;
}
#chart-container::before {
    display: block;
    content: "";
    position: absolute;
    width: 100%;
    height: 60%;
    z-index: 1;
    left: 50%;
    top: 50%;
    background: url('../Images/logo-yellow.png') no-repeat center;
    background-size: auto 60%;
    animation: rotateLoadingIcon infinite 1.5s linear;
    pointer-events: none;
}
.picker-container {
    display: flex;
    width: 95%;
}
@keyframes rotateLoadingIcon{
    0% {
        transform: translateX(-50%) translateY(-50%) rotateZ(0deg);
    }
    50% {
        transform: translateX(-50%) translateY(-50%) rotateZ(90deg);
        opacity: .6;
    }
    100% {
        transform: translateX(-50%) translateY(-50%) rotateZ(180deg);
    }
}
#dygraphs-chart {
    width: 95% !important;
    height: 100% !important;
    margin: 0 auto;
}
.dygraph-title{
    text-align: center;
    font-size: 1.3em;
    position: relative;
    bottom: 15px;
}
.dygraph-legend {
    display: none;
}
#graph-labels {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    margin-top: 10px;
}
#graph-labels > span {
    padding: 2px 7px;
    border-radius: 5px;
    margin-right: 5px;
    margin-bottom: 10px;
    border: 1px solid white;
}
#graph-labels > span:not(b) {
    color: #fff;
    font-weight: bold;
}

#graph-labels > span > span:nth-child(n+2) {
    margin-left: 5px;
}

#graph-labels > span#date-label {
    border: none;
    padding: 2px 7px 2px 0;
}
#graph-labels > span.toggled-label {
    opacity: 0.5;
}
#graph-labels > span.disabled-label {
    border: 1px solid #828282;
    opacity: 1;
    pointer-events: none;
}
#graph-labels > span > span {
    pointer-events: none;
}

/* Rotate the phone message when on portrait */
#rotate-message {
    width: 90%;
    height: 60%;
    background-color: blue;
    position: absolute;
    transform: translateY(-50%);
    top: 50%;
    border-radius: 15px;
    background-color: var(--yellow-300);
    border: 4px solid #171717;
    display: flex;
    flex-direction: column;
    z-index: 999;
}

#rotate-message > div {
    flex-grow: 1;
    pointer-events: none;
}

#graph-info-wrapper {
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

#graph-info {
    display: none;
}

#graph-info-icon {
    background: url('../Images/info.png');
    background-size: contain !important;
    position: absolute;
    height: 40px;
    width: 40px;
    left: 10px;
    top: 10px;
    z-index: 3;
}

#graph-info:checked ~ #graph-info-icon {
    background: url('../Images/close-icon.png');
    filter: invert(1);
    background-position: top right;
}

#graph-info:checked ~ #graph-info-content {
    opacity: 1;
    width: 100vw;
    height: 100%;
    right: 50%;
    display: flex;
    overflow-y: scroll;
}

#graph-info-content {
    color: black;
    position: absolute;
    opacity: 0;
    top: 0;
    left: 0;
    width: 0;
    min-height: 50px;
    transition-duration: .3s;
    z-index: 2;
    flex-direction: column;
    background-color: var(--yellow-300);
    border: 5px solid black;
    border-radius: 15px;
    align-items: center;
    padding: 30px 30px 60px 30px;
    display: none;
    user-select: none;
}

#graph-info-content > div {
    flex: 1;
}

#graph-info-title {
    font-size: 4em;
    display: flex;
    align-items: center;
}

#graph-info-points {
    font-size: 2em;
    text-align: left;
    width: 70%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}
.graph-info-section {
    display: flex;
    flex: 1;
}
.graph-info-icon {
    background-image: url('../Images/click-and-drag-icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 10%;
}
.graph-info-text {
    display: flex;
    align-items: center;
}
#click-drag-icon {
    background-image: url('../Images/click-and-drag-icon.png');
}
#double-click-icon {
    background-image: url('../Images/double-click-icon.png');
}
#alt-click-icon {
    background-image: url('../Images/alt-click-icon.png');
}
#pinch-icon {
    background-image: url('../Images/pinch-icon.png');
}
#double-tap-icon {
    background-image: url('../Images/double-tap-icon.png');
}
#tap-drag-icon {
    background-image: url('../Images/tap-drag-icon.png');
}
#fullscreen-button{
    position: absolute;
    width: 50px;
    height: 50px;
    top: 10px;
    right: 0;
    z-index: 10;
}
#fullscreen-info{
    display: none;
}
#fullscreen-info:checked ~ #fullscreen-info-icon{
    background: url('../Images/close-fullscreen-icon.png') no-repeat center;
}
#fullscreen-info-icon {
    background: url('../Images/fullscreen-icon.png') no-repeat center;
    background-size: contain !important;
    height: 40px;
    width: 40px;
    left: 10px;
    top: 10px;
}
.fullscreen-graph {
    position: fixed !important;
    height: 100% !important;
    width: 100% !important;
    border-radius: 0 !important;
}
@media screen and (orientation:landscape) {
    #rotate-message {
        display: none;
    }
}

.rotate-text, .rotate-message-dismiss {
    display: flex;
    align-items: center;
    text-align: center;
    font-size: 2em;
    text-align: center;
}

.rotate-message-dismiss > div {
    background-color: black;
    padding: 5px 15px;
    border-radius: 100px;
    width: 50%;
    color: white;
    margin: 0 auto;
    pointer-events: all;
}

.rotate-animation {
    background-image: url('../Images/rotate-phone.png');
    animation: rotateAnimation 4s infinite;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    flex-grow: 2 !important;
}

.hide-loader::before {
    display: none !important;
}

@keyframes rotateAnimation {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    20% {
        transform: rotateZ(0);
    }

    80% {
        transform: rotateZ(90deg);
        opacity: 1;
    }

    90% {
        transform: rotateZ(90deg);
        opacity: 0;
    }

    100% {
        transform: rotateZ(90deg);
        opacity: 0;
    }
}

@media (max-width: 1200px) {
    #chart-container {
        min-height: 100vh;
    }

    button {
        margin: 0 auto !important;
    }

    #graph-labels > span {
        padding: 0 5px !important;
        font-size: 0.85em;
    }

    .date-picker {
        justify-content: space-around;
        width: 95%;
        margin: 0 0 10px 0;
        padding: 0 10px;
    }

    .input-container {
        flex-direction: column;
    }

    .selector-label {
        font-size: 1.2em;
        margin: 3px 0;
        flex: 1;
        text-align: left;
    }

    .picker-container {
        flex: 10;
    }
}

@media (max-width: 800px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .graph-title {
        margin-bottom: 30px
    }

    .input-container {
        flex-direction: column;
        margin-bottom: 10px;
    }

        .input-container > * {
            width: 100%;
        }

    .date-picker {
        justify-content: space-around;
        margin: 0;
        padding: 0;
        flex-direction: column;
    }

    .selector-label {
        font-size: 1.2em;
        margin: 3px 0;
    }

    .btn-container {
        margin-bottom: 10px;
    }

    input {
        margin-left: 0;
        min-width: 125px;
        margin: 0 5px;
    }

    button {
        font-size: 1.2em !important;
    }

    #graph-labels > span {
        padding: 0 3px !important;
        font-size: 0.85em;
    }
}