@import url("./liveView.css");
@import url("./statsView.css");
@import url("./barGraph.css");
@import url("./lineGraph.css");
@import url("./pieChart.css");
@import url("./stateBar.css");

@font-face {
   font-family: "bold";
   src: url("/assets/fonts/medium.ttf");
   font-weight: bolder;
}

@font-face {
   font-family: "boldest";
   src: url("/assets/fonts/semibold.ttf");
   font-weight: bolder;
}

@font-face {
   font-family: "chewy";
   src: url("/assets/fonts/chewy.ttf");
}

:root {
   --borderRadius: 13px;
   --textColor: rgb(20, 40, 60);
   --themeColor: rgb(250, 252, 255);
   --foregroundColor: rgb(255, 255, 255);
   --backgroundGradient: linear-gradient(135deg, rgb(255, 249, 233), rgb(220, 233, 255));
   --invertValue: 0;
   --borderColor: rgba(20, 40, 60, 0.15);

   @media (prefers-color-scheme: dark) {
      --textColor: rgba(225, 230, 235, 1);
      --themeColor: rgba(0, 0, 0, 1);
      --foregroundColor: rgba(230, 240, 255, 0.07);
      --backgroundGradient: linear-gradient(135deg, rgba(20, 30, 40), rgba(0, 10, 20));
      --invertValue: 1;
      --borderColor: rgba(220, 230, 240, 0.15);
   }
}

* {
   font-family: bold;
   font-size: 16px;
   -webkit-tap-highlight-color: transparent;
   cursor: default;
   overflow-wrap: break-word;
   color: var(--textColor);
}

body {
   background-color: var(--themeColor);
   color: var(--textColor);
   margin: 0px !important;
   padding: 0px !important;
   user-select: none;
   -webkit-user-select: none;
   @media only screen and (max-width: 640px) {
      padding: 10px;
   }
}

/* Background-Gradient (Workaround to make it work even in Safari iOS)*/
html::before {
   content: " ";
   display: block;
   background: var(--backgroundGradient);
   background-position: center;
   background-size: cover;
   height: 100vh;
   width: 100vw;
   top: 0;
   bottom: 0;
   left: 0;
   right: 0;
   position: fixed;
   z-index: -10;
}

.title {
   font-size: 130%;
   font-family: boldest;
}

.bigTitle {
   font-size: 160%;
   font-family: boldest;
   margin-bottom: 20px;
   text-align: center;
}
.bigTitleIcon {
   width: 30px;
   height: 30px;
   object-fit: contain;
   margin-bottom: 10px;
}
.subTitle {
   margin-bottom: 10px;
   opacity: 0.26;
}

.reflection {
   position: relative;
}
.reflection::after {
   content: "";
   display: block;
   height: 8px;
   width: calc(100% - 8px);
   border: 0px solid rgba(255, 255, 255, 0.4);
   border-top-width: 3px;
   border-radius: 8px;
   position: absolute;
   top: 3px;
   left: 4px;
   filter: blur(1.5px);
}

#mainContainer {
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 15px;
   padding: 0px;
   box-sizing: border-box;
   min-height: 100vh;
   width: 100vw;
}

.sideContainer {
   width: 100px;
   flex-grow: 1;
   height: 100vh;
   box-sizing: border-box;
   overflow-y: scroll;
   display: flex;
   flex-direction: column;
   align-items: center;
   padding: 80px;
   transition: 0.3s;
   border-radius: 35px;
   z-index: 1;
   position: relative;
}

.sideContainer::before {
   content: "";
   width: 100%;
   height: 100%;
   position: fixed;
   left: 0px;
   top: 0px;
   z-index: 9999;
   transition: 0.3s;
   opacity: 0;
   pointer-events: none;
   backdrop-filter: none;
   -webkit-backdrop-filter: none;
}
.sideContainer.waiting::before {
   opacity: 1;
   backdrop-filter: blur(10px);
   -webkit-backdrop-filter: blur(10px);
   pointer-events: all;
}

#loadingContainer {
   position: fixed;
   left: 0px;
   top: 0px;
   width: 100%;
   height: 100%;
   background-color: var(--themeColor);
   z-index: 10;
   transition: 0.3s;
   pointer-events: none;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
}
#loadingImage {
   width: 60px;
   height: 60px;
   animation: loadingAnim 3s infinite linear;
   object-fit: contain;
}

@keyframes loadingAnim {
   0% {
      transform: rotate(0deg);
   }
   100% {
      transform: rotate(360deg);
   }
}

#loadingText {
   font-family: boldest;
   font-size: 160%;
   margin-top: 30px;
}

@media only screen and (max-width: 800px) {
   #mainContainer {
      flex-direction: column;
      gap: 0px;
      padding: 0px;
      margin: 0px;
   }
   .sideContainer {
      width: 100%;
      margin: 0px;
      padding: 20px;
      box-shadow: none;
      min-height: 100vh;
      height: auto;
      overflow: visible;
      border-radius: 0px;
   }
   #liveContainer {
      max-width: 100%;
      background-color: inherit;
      margin: 0px;
      padding: 20px;
      box-shadow: none;
   }
}

sub {
   font-size: 80%;
   vertical-align: bottom;
}

.button {
   padding: 12px 24px;
   border-radius: 16px;
   margin: 8px;
   transition: 0.1s;
   cursor: pointer;
   background-color: rgba(0, 0, 0, 0.08);
   @media (prefers-color-scheme: dark) {
      background-color: rgba(255, 255, 255, 0.08);
   }
}
@media (hover: hover) {
   .button:hover {
      box-shadow: 0px 0px 0px 2px var(--textColor);
   }
}

input[type="checkbox"] {
   appearance: none;
   -webkit-appearance: none;
   width: 20px;
   height: 20px;
   border: 2px solid rgba(128, 128, 128, 0.2);
   border-radius: 7px;
   border-radius: 50%;
   display: inline-block;
   position: relative;
   cursor: pointer;
   transition: 0.3s;
}

input[type="checkbox"]:active {
   background-color: rgba(128, 128, 128, 0.2);
}

input[type="checkbox"]:checked {
   background-color: #2196f3;
   border-color: transparent;
}

input[type="checkbox"]::after {
   content: "";
   position: absolute;
   left: 5px;
   top: 2px;
   width: 3px;
   height: 8px;
   border: solid white;
   border-width: 0 3px 3px 0;
   transform: rotate(45deg);
   opacity: 0;
   scale: 0.5;
   transition: 0.3s;
}

input[type="checkbox"]:checked::after {
   opacity: 1;
   scale: 1;
}
