@import "mixins/mixins";
@import "common/var";

@include b(select-dropdown) {
  @include e(item) {
    font-size: $select-font-size;
    padding: 0 20px;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: $select-option-color;
    height: $select-option-height;
    line-height: $select-option-height;
    box-sizing: border-box;
    cursor: pointer;

    @include pf(disabled) {
      color: $select-option-disabled-color;
      cursor: not-allowed;

      &:hover {
        background-color: $color-white;
      }
    }
    &.hover, &:hover {
      background-color: $select-option-hover-bg;
    }

    &.selected {
      color: $select-option-selected-font-color;
      font-weight: bold;
    }
  }
}


@include b(select-group) {
  $g: 20px;

  margin: 0;
  padding: 0;
  @include e(wrap) {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;

    &:not(:last-of-type) {
      padding-bottom: 24px;

      &::after {
        content: '';
        position: absolute;
        display: block;
        left: $g;
        right: $g;
        bottom: 12px;
        height: 1px;
        background: $select-option-line-bg;
      }
    }
  }

  @include e(title) {
    padding-left: $g;
    font-size: $select-group-font-size;
    color: $select-group-color;
    line-height: $select-group-height;
  }

  & .#{$namespace}-select-dropdown_item {
    padding-left: $g;
  }
}
