.form-group {
  position: relative;

  &:not(:last-child) {
    margin-bottom: .75rem;
  }

  & label {
    display: inline-block;
    margin-bottom: .5rem;
  }

  .form-field {
    position: relative;
  }

  .form-icon-left {
    & .form-control {
      padding-left: 2.25em;
    }
  }

  .form-icon-right {
    & .form-control {
      padding-right: 2.25em;
    }
  }
}

.form-control {
  display: inline-flex;
  width: 100%;
  background-color: #fff;
  height: 2.25em;
  border: 1px solid #dbdbdb;
  border-radius: 4px;
  padding: .375rem .75rem;
  font-size: 1rem;
  line-height: 1.5;
  outline: none;

  &:focus {
    border-color: #3273dc;
    box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25);
  }
}

textarea.form-control {
  height: auto;
}

@each $color, $value in $colors {
  .form-control-#{$color} {
    border-color: $value;

    &:focus {
      border-color: $value;
      box-shadow: 0 0 0 0.125em rgba($value, 0.25);
    }
  }
}

.form-icon {
  position: absolute;
  top: 0;
  width: 2.25em;
  pointer-events: none;
  height: 2.25em;
  z-index: 4;
  align-items: center;
  display: inline-flex;
  justify-content: center;
  color: #dbdbdb;
}

.form-radio {
  cursor: pointer;
}

.form-check {
  label {
    margin-bottom: 0;
    cursor: pointer;
  }
}

// addons
.form-addons {
  display: flex;

  & .form-control:not(:last-child), & .form-control:first-child:not(:only-child) {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
  }

  & .form-control:not(:first-child):not(:last-child) {
    border-radius: 0;
  }

  .btn {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
  }
}

.form-file-wrap {
  align-items: stretch;
  display: inline-flex;
  cursor: pointer;
  justify-content: flex-start;
  overflow: hidden;
  position: relative;
}

.form-control-file {
  position: absolute;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  outline: 0;
  cursor: pointer;
}
