@import url(../var.less);
@import url(../mixins/utils.less);
@import url(../components/index.less);
@import url(../components/scrollbar.less);
@import url(../components/popper.less);

@autocomplete-prefix: ~"@{prefix}autocomplete";
@autocomplete-suggestion-prefix: ~"@{prefix}autocomplete-suggestion";

.@{autocomplete-prefix}{
  position: relative;
  display: inline-block;
}

.@{autocomplete-suggestion-prefix} {
  margin: 5px 0;
  box-shadow: @box-shadow-light;
  border-radius: @border-radius-base;
  border: 1px solid @border-light-color;
  box-sizing: border-box;
  background-color: @color-white;

  &__wrap {
    max-height: 274px;
    padding: 10px 0;
    box-sizing: border-box;
  }

  &__list {
    margin: 0;
    padding: 0;
  }

  & li {
    padding: 0 20px;
    margin: 0;
    line-height: 28px;
    cursor: pointer;
    color: @regular-text-color;
    font-size: @font-size-base;
    list-style: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    &:hover {
      background-color: @select-option-hover-background;
    }

    &.highlighted {
      background-color: @select-option-hover-background;
    }

    &.divider {
      margin-top: 6px;
      border-top: 1px solid @color-black;
    }

    &.divider:last-child {
      margin-bottom: -6px;
    }
  }

  &.is-loading {
    li {
      text-align: center;
      height: 100px;
      line-height: 100px;
      font-size: 20px;
      color: #999;
      .utils-vertical-center();

      &:hover {
        background-color: @color-white;
      }
    }

    & .el-icon-loading {
      vertical-align: middle;
    }
  }

  &__group {
    margin: 0;
    line-height: 28px;
    &--label {
      padding: 0 14px;
      color: @secondary-text-color;
      font-size: @font-size-auxiliary;
    }
  }
}