@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap");
html {
  font-size: 16px;
}
@media (max-width: 22.5rem) {
  html {
    font-size: 14px;
  }
}

body {
  background-color: #ff7f2f;
}

html,
body {
  overflow: hidden;
  overscroll-behavior: none;
}

body,
input,
button,
label {
  color: #000000;
  font-family: "Roboto Mono", monospace;
}

.app {
  position: fixed;
  top: calc(50% - 1rem);
  left: 50%;
  translate: -50% -50%;
  display: flex;
  flex-direction: column;
  width: -moz-min-content;
  width: min-content;
  max-width: calc(100% - 2rem);
}

.input {
  width: 5rem;
  border-radius: 1rem;
  -moz-appearance: textfield;
  box-sizing: border-box;
}
.input:not([data-has-caret]) {
  caret-color: transparent;
}
.input::-webkit-inner-spin-button, .input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.input:focus {
  outline: 2px solid #4da6ff;
  outline-offset: -6px;
}
.input:focus[data-hide-cursor] {
  cursor: none;
}
.input__field {
  display: flex;
  align-items: center;
  max-width: 100%;
}
.input__field .input:first-child {
  width: 6.5rem;
}
.input__field .input:last-child {
  width: 6rem;
  padding-right: 2rem;
}
.input__field--dist .input:first-child {
  width: 100%;
}
.input, .input__seperator, .input__units {
  padding: 0.5rem 1rem;
  border: 2px solid #642d00;
  font-size: 2.5rem;
  text-align: right;
  white-space: nowrap;
  background-color: #ffffff;
}
.input--open-end {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right-width: 0;
}
.input--open-start {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left-width: 0;
}
.input__seperator {
  position: relative;
  z-index: -1;
  border-width: 2px 0;
  margin: 0 -2px;
  padding: 0.375rem 0 0.625rem;
}
.input__units {
  padding-left: 0;
  padding-right: 2rem;
  border-radius: 0 1rem 1rem 0;
  border-left-width: 0;
  margin-left: -2px;
}
.input__units--slash {
  display: inline-block;
  margin-right: -0.5rem;
}
.input__title {
  margin: 1.5rem 0 0.25rem;
}
.input__micro {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding-right: 0.25rem;
  margin-top: 0.25rem;
  margin-bottom: -1rem;
  text-align: right;
}

.button {
  background-color: #ff7f2f;
  border-radius: 0.5rem;
  border: 2px solid #642d00;
  text-align: center;
  padding: 0.5rem 0.25rem;
  cursor: pointer;
  flex: 1;
}
.button:hover {
  background-color: #f56e00;
}
.button:focus {
  outline: 2px solid #4da6ff;
  outline-offset: 2px;
}
.button__container {
  display: flex;
  margin: 0.5rem 0 0;
  gap: 0.5rem;
}

.radio {
  width: 0;
  height: 0;
  overflow: hidden;
  flex: 0;
}
.radio + label {
  width: 50%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 1rem;
}
.radio + label::before {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #642d00;
  border-radius: 100%;
  box-shadow: inset 0 0 0 2px #ff7f2f;
}
.radio:not(:checked) + label:hover::before {
  box-shadow: inset 0 0 0 2px #f56e00;
  background-color: #f56e00;
}
.radio:checked + label::before {
  background-color: #642d00;
}
.radio:not(:checked) + label {
  cursor: pointer;
}
.radio:focus + label {
  outline: 2px solid #4da6ff;
  outline-offset: 2px;
}
.radio__container {
  display: flex;
  margin-top: 0.25rem;
  margin-left: -0.5rem;
}

.predicted {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  padding-right: 0.25rem;
  text-align: right;
}
.predicted > :nth-child(2n) {
  padding-left: 1rem;
}

.download {
  position: fixed;
  left: min(100vw - 4rem, 50% + 11rem);
  bottom: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background-color: #ff7f2f;
  background-image: url("./icons/download.svg");
  background-size: cover;
  cursor: pointer;
}