@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap");

/* CSS Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    JetBrains Mono,
    Cascadia Code;
}

#canvas {
  --scale: 50px;
  touch-action: none;
  display: block;
  background: linear-gradient(to right, transparent 98%, lightgray 98%),
    linear-gradient(to bottom, transparent 98%, lightgray 98%);
  background-position: var(--x-origin) var(--y-origin);
  background-size: var(--scale) var(--scale);
}

.inputs-outer-container {
  touch-action: none;

  position: absolute;
  bottom: 1rem;
  left: 1rem;

  background-color: rgb(36, 39, 58);
  padding: 0.5rem 1rem 1rem 1rem;
  border-radius: 0.5rem;
  color: rgb(202, 211, 245);
}

.inputs-container {
  font-size: 0.9em;
  padding: 0.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;

  box-shadow:
    0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
}

#grab {
  cursor: grab;
  user-select: none;
  text-align: center;
  margin-bottom: 0.5rem;
  touch-action: none;
}

#distance-slider-label::after {
  content: "Jarak Objek (do)";
}

#height-slider-label::after {
  content: "Tinggi Objek (ho)";
}

#focal-slider-label::after {
  content: "Jarak Fokus (f)";
}

@media screen and ((max-width: 600px) or (max-height: 600px)) {
  #distance-slider-label::after {
    content: "do";
  }

  #height-slider-label::after {
    content: "ho";
  }

  #focal-slider-label::after {
    content: "f";
  }
}

.buttons-container {
  background-color: rgb(36, 39, 58);
  padding: 1rem;
  border-radius: 0.5rem;
  color: rgb(202, 211, 245);

  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  box-shadow:
    0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.buttons-container > p {
  font-size: 0.8em;
  opacity: 0.8;
}

.radio {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

.radio > label {
  border-radius: 0.5rem;
  background-color: rgb(73, 77, 100);
  padding: 0.5rem;
  width: 6rem;
  color: inherit;
  cursor: pointer;
  display: block;
  text-align: center;
  opacity: 50%;
}

.radio-input:checked + label {
  opacity: 100%;
}

.menu > label {
  font-size: 1.8rem;
  width: 3rem;
  height: 3rem;
  background-color: rgb(36, 39, 58);
  display: block;
  color: rgb(202, 211, 245);
  cursor: pointer;
  border-radius: 0.5rem;
  text-align: center;
  user-select: none;
}

.container {
  position: fixed;
  top: 1rem;
  left: 1rem;

  display: flex;
  gap: 0.5rem;
}

#reset-button {
  width: 3rem;
  height: 3rem;
  padding: 0.7rem;
  background-color: rgb(36, 39, 58);
  border-radius: 0.5rem;
  cursor: pointer;
  color: rgb(202, 211, 245);

  box-shadow:
    0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);

  position: absolute;
  top: 1rem;
  right: 1rem;

  border: none;
}
