@import "input";

.el-autocomplete{
  position: relative;
}

.el-autocomplete-suggestions{
  position: absolute;
  left: 0;
  top:110%;
  margin: 0;
  background-color: $color-white;
  border:1px solid #d3dce6;
  width: 100%;
  padding:6px 0;
  z-index: 10;
  border-radius: 2px;
  max-height: 280px;
  box-sizing: border-box;
  overflow: auto;
  box-shadow: 0 0 6px 0 rgba(0,0,0,0.04),
              0 2px 4px 0 rgba(0,0,0,0.12);

  & li{
    list-style: none;
    line-height: 36px;
    padding: 0 10px;
    margin: 0;
    cursor: pointer;
    color: #475669;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    &.highlighted,
    &:hover{
      background-color: $color-primary;
      color: #fff;
    }

    &:active{
      background-color: darken($color-primary,0.2);
    }

    &.divider{
      margin-top: 6px;
      border-top:1px solid #d3dce6;
    }

    &.divider:last-child{
      margin-bottom: -6px;
    }
  }

  &.is-loading{
    li{
      text-align: center;
      height: 100px;
      line-height: 100px;
      font-size: 20px;
      color: #999;

      &:after{
        display: inline-block;
        content: "";
        height: 100%;
        vertical-align: middle;
      }

      :hover{
        background-color: #fff;
      }
    }

    & .el-icon-loading{
      vertical-align: middle;
    }
  }
}