legend {
  padding: 0;
  border: 0;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

input[type='text'],
input[type='search'],
input[type='number'],
input[type='email'],
input[type='date'],
input[type='tel'],
input[type='url'],
select {
  appearance: none;
  background: $white;
  border: 2px solid $gray-light;
  border-radius: 0;
  width: 100%;
  height: auto;
  padding: 0.5em 0.75em;
  font-size: 1em;
  transition: border-color 0.15s ease-out;

  &:disabled {
    background-color: $gray-lightest;
    color: $gray-light;
  }

  &.has-error {
    border-color: $color-danger;
  }

  &:focus {
    outline: none;
    border-color: $black;
  }
}

input {
  &:read-only {
    cursor: default;
    pointer-events: none;
  }

  &::placeholder {
    color: $gray-light;
  }
}

label {
  display: block;
  margin-bottom: 0.25em;
  font-weight: $font-weight-bold;

  .optional {
    font-weight: $font-weight-normal;
  }

  button {
    color: currentColor;
    text-decoration: underline;
  }
}
