// Forms -------------------------------------------------------------- */

@if $kit-form-defaults == true {
  fieldset {
    @include trailer;
    @include rhythm-borders(1px);
    border-color: $border-color;
    border-style: dotted;
  }

  legend {
    padding: 0 0.25em;
  }

  label {
    cursor: pointer;
  }

  label {
    font-weight: bold;
    margin-right: 0.5em;
  }

  %textinput {
    @extend %constrain-to-parent;
    @include adjust-font-size-to($base-font-size, 1);
    @include rhythm-borders(1px, 0.25, $base-font-size);
    border-width: 1px;
    @include trailer(0.5);
    margin-top: 0;
    border-color: $border-color;
    height: $base-line-height / $base-font-size * 1.5em;
  }

  textarea {
    @extend %textinput;
    height: $base-line-height / $base-font-size * 6.5;
  }

  input {
    &[type=text], &[type=password], &[type=email], &[type=url], &[type=tel],
    &[type=date], &[type=datetime], &[type=datetime-local], &[type=month], &[type=week], &[type=time],
    &[type=number], &[type=range], &[type=search], &[type=color] {
      @extend %textinput;
    }
    // reset webkit search styles
    &[type=search] {
      -webkit-appearance: none;
      &::-webkit-search-decoration {
        display: none;
      }
    }
  }

  textarea {
    // add your own styles, if you like
  }

  input {
    &[type="radio"], &[type="checkbox"] {
      margin-left: 0.25em;
      margin-right: 0.25em;
    }
  }

  textarea, input:not([type="radio"]) {
    @extend %constrain-to-parent;
  }

}
