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

label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

form input,
form select,
form textarea {
  font-family: inherit;
  font-size: inherit;
  border-radius: 0.25rem;
  border: none;
  padding: 1rem;
  background-color: var(--light-gray);
  color: var(--dark-gray);
}

form input:not([type="checkbox"]),
form select {
  font-weight: 500;
  width: 100%;
}

label span {
  order: -1;
  transition: 0.2s;
  font-weight: 500;
  color: var(--gray);
}

label input,
label textarea {
  display: block;
}

label.checkbox {
  flex-direction: row;
  gap: 0.5rem;
  justify-content: unset;
  align-items: center;
  max-width: 40rem;
}

label.checkbox input {
  order: -1;
}

label.checkbox span {
  line-height: 1.25;
}

form input[type="submit"] {
  background-color: var(--blue);
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

form input[type="checkbox"] {
  padding: 0;
}

:is(input, select, textarea):placeholder-shown:not(:focus) + span {
  transform: translate(1rem, 2.5rem);
  color: var(--dark-gray);
}

:is(input, select, textarea)::placeholder {
  transition: 0.2s;
}

:is(input, select, textarea):not(:focus)::placeholder {
  color: transparent;
}

button {
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  padding: 1rem 2rem;
  background-color: var(--blue);
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: 0.2s;
}

form input[type="submit"]:hover,
button:hover {
  background-color: var(--yellow);
  color: var(--blue);
}
