// Variables
// ----------------------------
$large-icon-form-height: 3.2rem !default;
$small-icon-form-height: 2.2rem !default;

// Text input groups
// -------------------------

.input-group-text {
  height: $input-height; // for ie-s

  .checkbox-custom,
  .radio-custom {
    margin: 0;
  }
}

.input-group-prepend,
.input-group-append {
  transition: border .25s linear, color .25s linear, background-color .25s linear;
}

// .input-group-btn
.input-group-prepend,
.input-group-append {
  .btn {
    // padding: 0 10px;

    > .icon {
      line-height: inherit;
      vertical-align: bottom;
    }

    & ~ .dropdown-toggle::after {
      margin-left: 0;
    }
  }

  &:last-child {
    > .btn,
    > .btn-group {
      z-index: $zindex-base;
    }
  }
}

// for vertical align
.input-group-lg {
  .input-group-prepend,
  .input-group-append {
    line-height: $line-height-lg;
  }
}

.input-group-sm {
  .input-group-prepend,
  .input-group-append {
    line-height: $line-height-sm;
  }
}

.input-group-lg > .form-control,
.input-group-lg > .input-group-prepend,
.input-group-lg > .input-group-append,
.input-group-lg > .input-group-prepend > .btn,
.input-group-lg > .input-group-append > .btn,
.input-group-lg > .input-group-prepend > .input-group-text,
.input-group-lg > .input-group-append > .input-group-text {
  @extend .form-control-lg;
}

.input-group-sm > .form-control,
.input-group-sm > .input-group-prepend,
.input-group-sm > .input-group-append,
.input-group-sm > .input-group-prepend > .btn,
.input-group-sm > .input-group-append > .btn,
.input-group-sm > .input-group-prepend > .input-group-text,
.input-group-sm > .input-group-append > .input-group-text {
  @extend .form-control-sm;
}

// form icons
// ================================
.form-icons {
  .form-control-icon {
    position: absolute;
    top: 50%;
    left: 10px;
    z-index: 99;
    transform: translateY(-50%);

    & + .form-control {
      padding-left: 30px;
      border-top-left-radius: $input-border-radius;
      border-bottom-left-radius: $input-border-radius;
    }
  }

  .round-input-control .form-control {
    border-radius: 200px;
  }

  .large-icon .form-control {
    height: $large-icon-form-height !important;
  }

  .small-icon .form-control {
    height: $small-icon-form-height !important;
  }

  .form-control-icon-right {
    right: 10px;
    left: auto;

    & + .form-control {
      padding-right: 30px;
      padding-left: $input-btn-padding-x;
    }
  }
}
