.ib {
  display: none;
}

div#buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
}

div#control table h2 {
  margin-top: 1em;
}

div#control table tr.tlabel1 h2 {
  color: #7dc8ed;
}
div#control table tr.tlabel2 h2 {
  color:  #90ed7d;
}
div#control table tr.tlabel3 h2 {
  color:  #f05d80;;
}

.tt {
  position: relative;
  display: inline-block;
}
.tt .tttext {
  visibility: hidden;
  width: 240px;
  padding-left: 1em;
  position: absolute;
  background-color: black;
  z-index: 1;
}
.tt .tttext::before {
  content: "← ";
}
.tt:hover .tttext {
  visibility: visible;
}

#download { display: none; }
#upload { display: none; }

.render::before {
  content: "=> ";
}

#control {
  margin-bottom: 1em;
}

.plots {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
}

.plot h2::before {
  content: "↓";
}
.plot h2::after {
  content: "↓";
}

:root {
  --grey: #888888;
  --purpleBlue: #7d90ed;
  --purple: #a27ded;
  --green: #90ed7d;
  --red: #f05d80;
  --lightBlue: #7dedda;
  --blue: #7dc8ed;
  --teal: #2ecdc9;

  --background-color: black;
}

@font-face {
  font-family: "PPSupplyMono";
  src: url("/fonts/PPSupplyMono-Ultralight.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: "PPSupplyMono";
  src: url("/fonts/PPSupplyMono-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "PPSupplyMono";
  src: url("/fonts/PPSupplyMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "PPSupplyMono";
  src: url("/fonts/PPSupplyMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "PPSupplyMono";
  src: url("/fonts/PPSupplyMono-Semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "PPSupplyMono";
  src: url("/fonts/PPSupplyMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

button {
  color: inherit;
  cursor: pointer;
  font-family: "PPSupplyMono";
}

[role="button"] {
  cursor: pointer;
}

html {
  font-family: "PPSupplyMono";
  background-color: var(--background-color);
  color: white;
}

label {
  padding-inline: 0.5rem;
}

table {
  border-collapse: collapse;
}

/* Layout classes */

.main {
  margin-block: 2rem;
  margin-inline: auto;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-inline: 1rem;
}

.compiler-container {
  max-width: -webkit-fill-available;
}

.sub-container--edit,
.sub-container {
  display: flex;
  flex-direction: row;
  border: 1px solid;
}

.sub-container--edit {
  border-color: var(--red);
}

.sub-container {
  border-color: var(--purple);
}

.sub-container--table {
  border: 1px solid var(--red);
}


.sub-container__grid,
.sub-container__grid-mid,
.sub-container__grid-top {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-top: 1rem;
  width: 100%;
}

.header {
  font-size: 3rem;
  line-height: 2.5rem;
  font-weight: 200;
  padding-block: 2rem;
}

.sub-header {
  font-size: 1.3rem;
}

.home-link {
  margin-block: 1rem;
  text-decoration: underline;
  color: var(--green);
}

.home-link:hover {
  color: var(--teal);
}

/* Button classes */

.btn--primary {
  background-color: var(--purple);
  color: var(--background-color);
  background-image: none;
  border: 1px solid var(--purple);
  box-shadow: var(--background-color) 4px 4px 0 0, var(--purple) 4px 4px 0 1px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  margin: 0 5px 10px 0;
  overflow: visible;
  padding: 12px 40px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  min-width: 150px;
  transition: all 0.5s;
}

.btn--primary:after {
  position: absolute;
  opacity: 0;
  top: 0;
  right: -20px;
  transition: 0.5s;
}

.btn--primary:active {
  transform: translateY(4px) translateX(4px);
  box-shadow: var(--background-color) 2px 2px 0 0, var(--purple) 2px 2px 0 1px;
  translate: 0px 5px;
}

.btn--table {
  background-color: var(--red);
  background-image: none;
  border: 1px solid var(--red);
  box-shadow: var(--background-color) 4px 4px 0 0, var(--red) 4px 4px 0 1px;
  min-width: 200px;
}

.btn--table:active {
  transform: translateY(4px) translateX(4px);
  box-shadow: var(--background-color) 2px 2px 0 0, var(--red) 2px 2px 0 1px;
}

/* Input classes */

.input--primary,
.input--full,
.input--sm,
.input--threshold {
  background-color: var(--background-color);
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  margin: 0 5px 10px 0;
  padding: 12px 1px;
  text-align: center;
  white-space: nowrap;
  transition: box-shadow 0.3s ease-in, box-shadow 0.8s ease-out;
  max-width: 200px;
  font-family: "PPSupplyMono";
}

.input--secondary {
  color: var(--purple);
  border: 1px solid var(--purple);
}

.input--full {
  color: var(--red);
  border: 1px solid var(--red);
}

.input--sm {
  color: var(--purpleBlue);
  border: 1px solid var(--purpleBlue);
  margin: 0 16px;
  min-width: 100px;
}

.input--threshold {
  color: var(--teal);
  border: 1px solid var(--teal);
  margin: 0 16px;
  min-width: 100px;
}

input:focus {
  outline: none;
}

.input--sm:focus {
  color: var(--purpleBlue);
  border-color: var(--prupleBlue);
  box-shadow: 0 0 10px 1px var(--purpleBlue);
}

.input--threshold:focus {
  color: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 0 10px 1px var(--teal);
}

.input--full:focus {
  color: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 10px 1px var(--red);
}

.input--secondary:focus {
  color: var(--purple);
  border-color: var(--pruple);
  box-shadow: 0 0 10px 1px var(--purple);
}

/* Screen Size Classes */

@media (max-width: 1520px) {
  .header {
    font-size: 3rem;
    padding-block: 3rem;
  }

  .logo-container {
    width: 300px;
    height: 225px;
  }

  .sub-container__grid,
  .sub-container__grid-mid {
    gap: 1rem;
  }

  .sub-container__grid-mid {
    flex-direction: column-reverse;
  }

  .sub-container--edit,
  .sub-container__grid,
  .sub-container__grid-top {
    flex-direction: column;
  }

  .sub-container {
    flex-direction: row;
  }

  .btn--table {
    min-width: 30%;
  }
}

@media (max-width: 800px) {
  .logo-container {
    max-width: -webkit-fill-available;
  }

  .header {
    font-size: 2.5rem;
    padding-block: 2rem;
  }

  .sub-container__grid-top,
  .sub-container,
  .ev-section--mode,
  .ev-inputs {
    flex-direction: column;
  }

  .table-contents th,
  .table-contents td {
    font-size: 1rem;
    padding-inline: 0.5rem;
  }

  .ev-section,
  .ev-section--threshold {
    margin-block: 0.5rem;
  }

  .input--secondary,
  .input--full {
    width: 100%;
  }
}

/* Logo classes */

.logo-container {
  position: relative;
  width: 400px;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-svg {
  position: absolute;
  z-index: 1;
  width: 50%;
}

.logo-text {
  position: absolute;
  z-index: 2;
  width: 100%;
}

/* EV-related classes */

.ev-section,
.ev-section--threshold,
.ev-section--bias {
  padding: 1rem;
  min-width: 32.6%;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.ev-section--threshold {
  border: 1px solid var(--teal);
  color: var(--teal);
}

.ev-section--bias {
  border: 1px solid var(--purpleBlue);
  color: var(--purpleBlue);
}

.ev-section {
  border: 1px solid var(--teal);
  color: var(--teal);
}

.ev-header,
.ev-header--edit {
  font-size: 1.5rem;
  padding-inline: 1rem;
  padding-block: 0.5rem;
  width: 100%;
  text-align: center;
}

.ev-header {
  background-color: var(--purple);
  color: var(--background-color);
}

.ev-header--edit {
  background-color: var(--red);
  color: var(--background-color);
}

.ev-label {
  font-size: 1.3rem;
  color: var(--purple);
}

.ev-section--headers {
  display: flex;
  flex-direction: row;
}

.ev-inputs {
  display: flex;
  gap: 2rem;
  margin: 1rem;
}

/* Table-related classes */

.table-section {
  display: flex;
  gap: 2rem;
}

.table-contents {
  width: 100%;
}

.table-contents th {
  text-align: center;
  padding-inline: 1rem;
  width: 50%;
  padding-block: 0.5rem;
}

.table-contents td {
  padding-inline: 1rem;
  padding-top: 1rem;
}

.table-headers {
  background-color: var(--red);
  color: var(--background-color);
  font-size: 1.3rem;
}

/* JSON section class */

.json-section {
  border: 1px solid var(--green);
  padding-inline: 1rem;
  display: flex;
  gap: 2rem;
  padding-block: 1rem;
  color: var(--green);
  font-size: 1rem;
  flex: 1;
}


/* Animation Classes */

.logo-container {
  animation: fadeIn 1.2s ease-in-out;
}

.ev-section,
.sub-container,
.json-section {
  animation: rightFade 1.3s ease-in-out;
}

.ev-section--threshold,
.sub-container--table,
.sub-container--edit,
.ev-section--bias {
  animation: leftFade 1.3s ease-in-out;
}

.table-data {
  animation: fadeIn 0.6s ease-in;
}

.table-data-fadeOut {
  animation: fadeOut 0.6s ease-out;
}

.header {
  display: inline-flex;
}

.letter {
  display: inline-block;
  animation: rotateSpin 1s ease-in-out forwards;
  opacity: 0;
}

.letter:nth-child(1) {
  animation-delay: 0s;
}

.letter:nth-child(2) {
  animation-delay: 0.1s;
}

.letter:nth-child(3) {
  animation-delay: 0.2s;
}

.letter:nth-child(4) {
  animation-delay: 0.3s;
}

.letter:nth-child(5) {
  animation-delay: 0.4s;
}

.letter:nth-child(6) {
  animation-delay: 0.5s;
}

@keyframes rotateSpin {
  0% {
    transform: rotateY(0deg);
    opacity: 0;
  }
  50% {
    transform: rotateY(180deg);
    opacity: 0.5;
  }
  100% {
    transform: rotateY(360deg);
    opacity: 1;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes rightFade {
  0% {
    transform: translate(100px);
    transform-origin: left;
    opacity: 0;
  }
  50% {
    transform-origin: left;
    opacity: 0.3;
  }
  100% {
    transform-origin: left;
    opacity: 1;
  }
}

@keyframes leftFade {
  0% {
    transform: translate(-100px);
    transform-origin: right;
    opacity: 0;
  }
  50% {
    transform-origin: right;
    opacity: 0.3;
  }
  100% {
    transform-origin: right;
    opacity: 1;
  }
}
