input, textarea {
  font-family: inherit;
  font-size: 1.125rem;
  box-sizing: border-box;
  -webkit-border-radius: 0px;
  border-radius: 0px;
  resize: none;
}

input[type="text"], input[type="number"], textarea {
  -webkit-appearance: none;
  appearance: none;
}

.input-wrapper {
  position: relative;
  display: inline-block;
  margin: 1rem 0 .5rem 0;
  width: 100%;
  border-bottom: 1px solid var(--black);
}
.input-wrapper.error {
  border-bottom: 1px solid var(--red);
}

.input-wrapper.inline {
  display: inline-block;
  margin: 1rem 0 0 1rem;
  width: auto;
}

.input-wrapper input[type="text"],
.input-wrapper input[type="number"],
.input-wrapper textarea {
  border: none;
  padding: .5rem 0;
  margin: 0;
  outline: none;
  position: relative;
  background: transparent;
  width: 100%;
}

.input-wrapper.inline input[type="text"],
.input-wrapper.inline input[type="number"] {
  padding: .125rem 0;
}

.input-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  z-index: 2;
  height: 1px;
  background-color: var(--black);
  transition: width 0.25s ease;
}
.input-wrapper.error::after {
  background-color: var(--red);
}
.input-wrapper:focus-within::after {
  width: 100%;
}

.input-wrapper label.input-label {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--black);
  pointer-events: none;
  transition: top 0.25s ease, font-size 0.25s ease;
}
.input-wrapper.error label.input-label {
  color: var(--red);
}

.input-wrapper input[type="text"]:focus + label.input-label,
.input-wrapper input[type="text"]:not(:placeholder-shown) + label.input-label,
.input-wrapper input[type="number"]:focus + label.input-label,
.input-wrapper input[type="number"]:not(:placeholder-shown) + label.input-label,
.input-wrapper textarea:focus + label.input-label,
.input-wrapper textarea:not(:placeholder-shown) + label.input-label {
  top: -1rem;
  font-size: 0.825rem;
}