@charset "UTF-8";
@import "./input.css";
@import "./common/var.css";
@import "./scrollbar.css";

@component-namespace el {
  @b autocomplete {
    position: relative;
    display: inline-block;
  }
  @b autocomplete-suggestion {
    margin: 5px 0;
    box-shadow: 0 0 6px 0 rgba(0,0,0,0.04), 0 2px 4px 0 rgba(0,0,0,0.12);

    @e wrap {
      max-height: 280px;
      overflow: auto;
      background-color: var(--color-white);
      border: 1px solid var(--color-base-gray);
      padding: 6px 0;
      border-radius: 2px;
      box-sizing: border-box;
    }

    @e list {
      margin: 0;
      padding: 0;
    }

    & li {
      list-style: none;
      line-height: 36px;
      padding: 0 10px;
      margin: 0;
      cursor: pointer;
      color: var(--color-extra-light-black);
      font-size: 14px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;

      &:hover {
        background-color: var(--select-option-hover-background);
      }
      &.highlighted {
        background-color: var(--color-primary);
        color: var(--color-white);
      }
      &:active {
        background-color: darken(var(--color-primary), 0.2);
      }
      &.divider {
        margin-top: 6px;
        border-top: 1px solid var(--color-base-gray);
      }
      &.divider:last-child {
        margin-bottom: -6px;
      }
    }

    @when loading {
      li {
        text-align: center;
        height: 100px;
        line-height: 100px;
        font-size: 20px;
        color: #999;
        @utils-vertical-center;

        &:hover {
          background-color: var(--color-white);
        }
      }

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