@import "mixins/mixins";
@import "common/var";

@include b(select-dropdown) {
  // 下拉框选的每一个 item 
  @include e(item) {
    font-size: $--select-font-size;
    padding: 0 10px;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: $--select-font-color;
    height: $--select-height;
    line-height: $--select-height;
    box-sizing: border-box;
    cursor: pointer;

    // 单个选项禁用
    @include when(disabled) {
      color: $--select-option-font-color-disabled;
      cursor: not-allowed;

      &:hover {
        background-color: $--select-option-bg-color;
      }
    }

    // &.hover,
    &:hover {
      background-color: $--select-option-bg-color-hover;
    }

    &.selected {
      color: $--select-option-font-color-selected;
      background-color: $--select-dropdown-bg-color;
      font-weight: $--select-font-weight-selected;
    }
    & .is-active {
      color: $--select-option-font-color-selected;
    }
  }
}

// 空结果
@include b(select-dropdown__empty) {
  padding: $--select-dropdown-padding-empty;
  margin: 0;
  text-align: left;
  color: $--select-dropdown-font-color-empty;
  font-size: $--select-font-size;
  line-height: $--select-height;
}

@include b(select-dropdown__wrap) {
  max-height: $--select-dropdown-max-height;
}

@include b(select-dropdown__list) {
  list-style: none;
  padding: $--select-dropdown-padding-empty 0;
  margin: 0;
  box-sizing: border-box;
}
