.viewport {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  justify-content: center;
  align-items: center;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.selectField {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.otpRoot {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

:where(.otpRoot) input:not([type='hidden']) {
  --border-color: #ddd;
  --focus-ring-color: dodgerblue;
  height: 3rem;
  width: 2rem;
  text-align: center;
  font-size: 1em;
  padding: 0;
  box-shadow: none;
  border: 2px solid var(--border-color);
  border-radius: 4px;
}

:where(.otpRoot[data-state='invalid']) input:not([type='hidden']) {
  --focus-ring-color: tomato;
  --border-color: crimson;
}

:where(.otpRoot[data-state='valid']) input:not([type='hidden']) {
  --focus-ring-color: limegreen;
  --border-color: green;
}

:where(.otpRoot[data-state='valid']) input:focus {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 0;
}

.errorMessage {
}

.separator {
  height: calc(100% - 8px);
  width: 1px;
  background-color: #ddd;
}

.output {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  padding: 1rem;
  background-color: var(--gray-4);
  border: 1px solid var(--gray-6);
  border-radius: 4px;

  &:where([data-state='valid']) {
    background-color: var(--green-5);
    border-color: var(--green-6);
  }

  &:where([data-state='invalid']) {
    background-color: var(--red-5);
    border-color: var(--red-6);
  }
}
