ui-dropdown-input {
  position: relative;
  display: block;
  text-align: left;
  z-index: 0;
  &:hover {
    .ui-dropdown-input-clean:not(.ui-hide) {
      display: flex;
    }
  }
  .ui-dropdown-input {
    width: 100%;
    text-align: inherit;
    padding-right: 1.4em;
  }
}

.ui-dropdown-input-arrow {
  position: absolute;
  z-index: 1;
  right: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s;
  pointer-events: none;
  &.ui-open {
    transform: rotateZ(180deg);
  }
}

.ui-dropdown-input-clean {
  position: absolute;
  z-index: 2;
  right: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  padding-left: 2px;
  align-items: center;
  font-size: 12px;
  display: none;
  > span {
    display: inline-flex;
    width: 14px;
    height: 14px;
    background-color: $color-gray;
    color: #fff;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    &:hover {
      background-color: $color-gray-dark;
    }
  }
  &.ui-hide {
    display: none;
  }
}

ui-dropdown {
  &.ui-focus {
    > ui-dropdown-input > .ui-dropdown-input:not([disabled]) {
      @include input-focus($form-control-border-color-primary);
    }
  }
  &.ui-open {
    > ui-dropdown-input > .ui-dropdown-input-arrow {
      transform: rotateZ(180deg);
    }
  }
}
