@import "mixins/mixins";
@import "common/var";
@import "./popper";
@import "./icon";

@include b(select-dropdown) {
  position: absolute;
  z-index: #{$--index-top + 1};
  border-radius: $--select-border-radius;
  background-color: $--select-dropdown-bg-color;
  box-shadow: $--select-dropdown-box-shadow;
  box-sizing: border-box;
  margin: 5px 0;

  &.el-popper {
    .popper__arrow {
      display: none;
    }
    &[x-placement^="top"] {
      margin-bottom: 5px;
    }
    &[x-placement^="bottom"] {
      margin-top: 5px;
    }
  }

  // 单个选项下的 多选样式
  @include when(multiple) {
    & .el-select-dropdown__item.selected {
      // 选中对勾样式
      &::after {
        position: absolute;
        right: 10px;
        font-family: "shop-icons";
        content: "\e907";
        font-size: $--select-option-choose-size;
        font-weight: bold;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        color: $--select-option-font-color-selected;
      }
    }
  }

  .el-scrollbar.is-empty .el-select-dropdown__list {
    padding: 0;
  }
  // 单个选项 选中状态样式
  .el-select-dropdown__item {
    &.selected {
      color: $--select-option-font-color-selected;
      background-color: $--select-dropdown-bg-color;
      font-weight: $--select-font-weight-selected;

      &:hover {
        background-color: $--select-option-bg-color-hover;
      }
    }
    // 单个选项禁用
    &.is-disabled {
      color: $--select-option-font-color-disabled;
      cursor: not-allowed;
    }
  }
}