legend {
  margin-bottom: 20px;
}

output {
  padding-top: 8px;
}

.radio label,
.checkbox label {
  min-height: 20px;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.label {
  background-color: #fff;
  border-radius: 2px;

  &.label-default {
    background-color: #fff;
  }

  &.label-primary {
    background-color: $color-primary;
  }

  &.label-success {
    background-color: $color-success;
  }

  &.label-danger {
    background-color: $color-danger;
  }

  &.label-rose {
    background-color: $color-rose;
  }
}

.form-control,
.form-group .form-control,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
  @extend %forms-inputs-styling;
}

.form-control {
  height: 36px;
  padding: 7px 0;
  vertical-align: middle;
}

.form-control-static {
  min-height: 34px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.form-control,
.form-group .form-control {
  &::-moz-placeholder,
  &:-ms-input-placeholder,
  &::-webkit-input-placeholder {
    color: #aaa;
  }
}

.form-control[readonly],
.form-control[disabled],
fieldset[disabled] .form-control,
.form-group .form-control[readonly],
.form-group .form-control[disabled],
fieldset[disabled] .form-group .form-control {
  background-color: transparent;
}

.form-control[disabled],
fieldset[disabled] .form-control,
.form-group .form-control[disabled],
fieldset[disabled] .form-group .form-control {
  border-bottom: 1px dotted #d2d2d2;
  background-image: none;
}

.form-control {
  margin-bottom: 7px;
}

.form-control::-moz-placeholder,
.form-control:-ms-input-placeholder,
.form-control::-webkit-input-placeholder,
.checkbox label,
.radio label,
label {
  &, .form-group & {
    color: #aaa;
  }
}

label.control-label {
  margin: 16px 0 0;
  color: #aaa;
}

.help-block {
  margin-top: 0;
}

.form-group {
  padding-bottom: 7px;
  position: relative;

  .form-control {
    margin-bottom: 7px;
  }

  label.control-label {
    margin: 16px 0 0;
    color: #aaa;
  }

  input[type=file] {
    position: relative;
    z-index: 100;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
  }

  textarea {
    resize: none;
  }

  textarea ~ .form-control-highlight {
    margin-top: -11px;
  }

  .help-block {
    margin-top: 0;
    display: none;
    position: absolute;
  }

  &.label-static label.control-label,
  &.label-placeholder label.control-label,
  &.label-floating label.control-label {
    @extend %transition-all-3s-ease;
    position: absolute;
    pointer-events: none;
  }

  &.label-floating label.control-label {
    will-change: left,top,contents;
  }

  &.label-placeholder:not(.is-empty) label.control-label {
    display: none;
  }

  &.label-floating label.control-label,
  &.label-placeholder label.control-label {
    top: -7px;
    left: 0;
  }

  &.label-static label.control-label,
  &.label-floating.is-focused label.control-label,
  &.label-floating:not(.is-empty) label.control-label {
    top: -28px;
    left: 0;
  }

  &.is-focused .form-control {
    @extend %forms-inputs-styling-on-focus;
  }

  &.is-focused .form-control .material-input:after {
    background-color: $color-primary;
  }

  &.is-focused.label-placeholder label,
  &.is-focused.label-placeholder label.control-label {
    color: #aaa;
  }

  &.is-focused select.form-control {
    @extend %buttons-box-shadow-none;
    border-color: #d2d2d2;
  }

  &.has-warning .form-control {
    @extend %buttons-box-shadow-none;
  }

  &.has-warning.is-focused .form-control {
    @include forms-background-gradient($color-warning);
  }

  &.has-warning label.control-label {
    color: $color-warning;
  }

  &.has-error .form-control {
    @extend %buttons-box-shadow-none;
  }

  &.has-error.is-focused .form-control {
    @include forms-background-gradient($color-danger);
  }

  &.has-error label.control-label {
    color: $color-danger;
  }

  &.has-success .form-control {
    @extend %buttons-box-shadow-none;
  }

  &.has-success.is-focused .form-control {
    @include forms-background-gradient($color-success);
  }

  &.has-success label.control-label {
    color: $color-success;
  }

  &.has-info .form-control {
    @extend %buttons-box-shadow-none;
  }

  &.has-info.is-focused .form-control {
    @include forms-background-gradient($color-info);
  }

  &.has-info label.control-label,
  &.has-info .help-block {
    color: $color-info;
  }
}

select {
  &.form-control {
    @extend %buttons-box-shadow-none;
    border: 0;
    border-radius: 0;
  }

  &.form-control[multiple],
  .form-group.is-focused select.form-control[multiple] {
    height: 85px;
  }
}

.input-group-btn .btn {
  margin: 0 0 7px;
}

.input-group {
  .input-group-btn {
    padding: 0 12px;
  }

  .input-group-addon {
    padding: 6px 15px 0;
    border: 0;
    background: transparent;
  }
}

.form-control-feedback {
  opacity: 0;

  .has-success & {
    opacity: 1;
    color: $color-success;
  }

  .has-error & {
    opacity: 1;
    color: $color-danger;
  }
}

// Search input icon
.searchform,
.search-form {
  label {
    display: table-cell;
    vertical-align: top;
    padding-right: 25px;
    width: 100%;
  }
}

.searchform:not(.media-toolbar-primary),
.search-form:not(.media-toolbar-primary),
.woocommerce-product-search {
  display: table;
  position: relative;

  input[type=submit], button {
    display: table-cell;
    vertical-align: top;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
    text-indent: -9999px;
    top: -19px;
    width: 45px;
  }

  input[type=search] {
    height: 36px;
  }

  &:after {
    color: #fff;
    content: "\f002";
    font-family: 'Fontawesome';
    pointer-events: none;
    position: absolute;
    right: 15px;
    top: 0;
  }
}

.woocommerce-product-search {
  width: 100%;

  input[type=submit] {
    float: right;
  }

  input[type=search] {
    display: table-cell;
    vertical-align: top;
    float: left;
    width: 70%;
  }
}

.blog-sidebar-wrapper {
  .widget:nth-of-type(1) {
    &.widget_search,
    &.widget_product_search {
      padding-top: 11px;
    }
  }
}

.comment-form-cookies-consent {
  #wp-comment-cookies-consent {
    margin: 0 10px 0 0;
  }
  label {
    display: inline;
  }
}
