/***************************************************************************************
* Forms
***************************************************************************************/

.input-group-addon {
  label {
    margin-bottom: 0px;
  }
}

.form-control {
  &:focus {
    border-color: $cr-blue;
    box-shadow: none;
  }
}

.required::after {
  content: " * ";
  color: $brand-danger;
}

// form group large sizing
.form-group-lg {
  input, label, .input-group-addon {
    font-size: 180%;
    line-height: 1;
  }
  .form-control {
    line-height: 1;
  }
}

//Toggle Switches
.form-group {
  .toggle-switch {
    border: 1px solid $gray-light;
    .switch-left {
      background: $brand-success;
    }
  }
  .toggle-switch.disabled {
    opacity: .5;
  }
  .toggle-switch.disabled > div > span.knob {
    background: initial;
  }
}

.toggle-input-group {
  label {
    line-height: 1.2;
  }
}

.input-group-btn:last-child>.btn,
.input-group-btn:last-child>.btn-group {
  margin-left: 0px;
}
// Reset rounded corners, overrides bootstrap and makes both sides border radius 0
.input-group .form-control:first-child,
.input-group-addon:first-child,
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group > .btn,
.input-group-btn:first-child > .dropdown-toggle,
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn,
.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group > .btn,
.input-group-btn:last-child > .dropdown-toggle,
.input-group-btn:first-child > .btn:not(:first-child),
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
  @include border-right-radius(0);
  @include border-left-radius(0);
}

.has-error {
  .input-group {
    .input-group-addon {
      background-color: $state-danger-bg;
      color: $state-danger-text;
      text-shadow: none;
    }
  }
}

.form-horizontal {
  .form-group {
    input[type=file] {
      padding-top: 7px;
    }
  }
}

.radio label.hidden-input,
.checkbox label.hidden-input {
  padding-left: 0px;
}

.add-text-input-row {
  .icon {
    margin-top: $line-height-computed/4;
  }

  @media (min-width: $screen-sm-min) {
    +.tooltip {
      min-width: 100px;
    }
  }
}

// Number Counter

.input-group-addon[type="down"],
.input-group-addon[type="up"] {
  cursor: pointer;
  @include button-variant(black, $gray-lighter, $gray-lighter);
  border-color: $btn-default-border;
}

.help-block {
  margin-top: 0px;
  margin-bottom: 3px;
}
