/*
Forms

Styleguide 2.9
*/

// Fix Bootstrap's behavior with email and select fields.
.form-select,
.form-email {
  display: block;
  margin-top: $form-text-margin-top;
}

// Fix Bootstrap messing up Admin Toolbar's search.
#admin-toolbar-search-tab > fieldset {
  margin-bottom: 0;
  margin-top: 0.3rem;

  > input {
    height: unset;
  }
}

input {
  font-weight: bold;
}
input::-webkit-input-placeholder { /* Chrome/Opera/Safari */
  font-weight: normal;
}
input::-moz-placeholder { /* Firefox 19+ */
  font-weight: normal;
}
input:-ms-input-placeholder { /* IE 10+ */
  font-weight: normal;
}
input:-moz-placeholder { /* Firefox 18- */
  font-weight: normal;
}

fieldset {
  &.error {
    .fieldset-wrapper {
      border-color: $danger !important;
    }
    .media-library-widget-empty-text {
      color: $color-achillies;
    }
  }
}

@mixin make-inline-form {
  fieldset {
    display: inline-block;
    input {
      margin-top: 0;
    }
  }
  @include media-breakpoint-down(md) {
    display: block;
  }
  .button {
    display: inline-block;
    vertical-align: top;
    @include media-breakpoint-down(md) {
      display: block;
      margin: 0 auto;
    }
    @include media-breakpoint-down(xs) {
      width: 100%;
    }
  }
}
