.#{$select-prefix-cls} {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  width: 100%;
  outline: none;

  i[data-ani-icon]{
    transition: all $transition-time;
    transform: rotate(0deg);
  }

  &__selection{
    @extend .#{$input-prefix-cls};
    position: relative;
    display: block;
    padding: 0 !important;
    cursor: pointer;
  }

  &__placeholder {
    color: $input-color-placeholder;
  }

  // 避免覆盖后面的图标按钮
  &__selected-value,
  &__input,
  .list-inline,
  &__placeholder{
    padding-right: $select-selection-icon-font-size + $select-selection-icon-spacer;
    padding-left: $input-padding-x;
  }

  &__placeholder,
  &__selected-value{
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  &__selection-icon {
    position: absolute;
    top: 50%;
    right: $input-padding-x;
    transform: translateY(-50%);
    & .aid-chevron-down,
    & .aid-chevron-up {
      font-size:$select-selection-icon-font-size;
    }
    & .aid-close-circle{
      font-size:$select-clear-icon-font-size;
    }
  }

  .list-inline-item {
    max-width: 100%;
    .#{$tag-prefix-cls} {
      max-width:100%;
      white-space: nowrap;
      &__title {
        max-width: 85%;
        @include text-truncate;
      }
    }
  }

  &__input {
    @extend .#{$input-prefix-cls};
    border: none;
    height: $input-height - $border-width * 2;
    line-height: $input-height - $border-width * 2;
    cursor: text;
    background: transparent;
    &:focus {
      box-shadow: none;
      background: transparent;
    }
  }

  .list-inline {
    &:empty{
      padding:0 !important;
    }
    margin-bottom: 0;
    line-height: 1.5;
    padding-top: ($input-height - $border-width*2 - $tag-height - $tag-margin-y*2)/2 !important;
    padding-bottom:($input-height - $border-width*2 - $tag-height - $tag-margin-y*2)/2 !important;
    &-item{
      margin-right:0;//overwrite default 5px
    }
  }

  &__menu{
    @extend .#{$dropdown-prefix-cls}__menu;
    max-height: $pre-scrollable-max-height;
    overflow-y: auto;
  }

  // 结构生成在select下
  .#{$select-prefix-cls}__menu {
    display: none;
    min-width:100%;
  }



  &__options {
    padding:0;
    margin:0;

    // 分组
    .#{$select-prefix-cls}__group-title {
      display: block;
      width: 100%; // For `<button>`s
      padding: $dropdown-group-title-padding-y $dropdown-item-padding-x;
      clear: both;
      font-weight: $font-weight-normal;
      color: $dropdown-group-title-color;
      font-size: $dropdown-group-title-font-size;
      white-space: nowrap; // prevent links from randomly breaking onto new lines
    }
    ul {
      list-style: none;
      padding-left: 0;
      margin:0;
      .#{$select-prefix-cls}__item {
        padding-left: $dropdown-item-padding-x*2;
        padding-right: $dropdown-item-padding-x*2;
      }
    }
  }

  &__tips {
    @extend .#{$select-prefix-cls}__item;
    text-align: center;
  }

  &__item {
    @extend .#{$dropdown-prefix-cls}__item;

    //响应‘↑’ ‘↓’ 键
    &--focus {
      color: $dropdown-link-hover-color;
      text-decoration: none;
      background-color: $dropdown-link-hover-bg;
    }

    //disabled
    @include status-disabled {
      color: $dropdown-link-disabled-color;
      background-color: transparent;
      @if $enable-gradients {
        background-image: none;
      }
    }

    //checked
    @include checked-active {
      color: $dropdown-link-hover-color;
      text-decoration: none;
      background-color:$dropdown-link-active-bg;
    }
  }

  &--focus {
    .#{$select-prefix-cls}__selection {
      box-shadow: $input-box-shadow-focus;
      border-color: $input-border-focus;
    }
  }

  &--disabled {
    .#{$select-prefix-cls}__selection {
      @extend .#{$input-prefix-cls}--disabled;
    }
  }

  &--multiple {
    .#{$select-prefix-cls}__selection {
      height: auto !important;
      line-height:$input-height - $border-width * 2;
      min-height:$input-height;
      &--lg{
        min-height:$input-height-lg;
      }
      &--sm{
        min-height:$input-height-sm;
      }
    }
    //checked
    .#{$select-prefix-cls}__item{
      @include checked-active {
        background-color: transparent;
        color:$dropdown-link-check-icon-color;
        padding-right:calc(#{$dropdown-item-padding-x} + #{$font-size-sm} * 1.2);
        &:after {
          content: "\f27b";
          @extend %aid-icon;
          transform: scale(1.2) translate(0, 0);
          position: absolute;
          right: $dropdown-item-padding-x;
          color: $dropdown-link-check-icon-color;
        }
      }
      @include hover-focus{
        background-color: $dropdown-link-hover-bg;
      }
    }
  }

  &--open {
    .#{$select-prefix-cls}__selection {
      box-shadow: $input-box-shadow-focus;
      border-color: $input-border-focus;
    }

    >.#{$select-prefix-cls}__menu{
      display: block;
    }
    // Remove the outline when :focus is triggered
    > a {
      outline: 0;
    }
    i.aid-chevron-down {
      transition: all $transition-time;
      transform: rotate(180deg);
    }
  }


  //
  //size
  //

  &--sm {
    .#{$select-prefix-cls}__selected-value,
    .#{$select-prefix-cls}__input,
    .list-inline,
    .#{$select-prefix-cls}__placeholder{
      padding-right: $select-sm-selection-icon-font-size + $select-selection-icon-spacer;
    }

    .#{$select-prefix-cls}__selection-icon{
      right: $input-padding-x-sm;
      & .aid-chevron-down,
      & .aid-chevron-up {
        font-size:$select-sm-selection-icon-font-size;
      }
      & .aid-close-circle{
        font-size:$select-sm-clear-icon-font-size;
      }
    }

    .#{$select-prefix-cls}__selection,
    .#{$select-prefix-cls}__input{
      @extend .#{$input-prefix-cls}--sm;
    }

    .#{$select-prefix-cls}__selection{
      min-height: $input-height-sm;
    }

    .#{$select-prefix-cls}__input{
      min-height: $input-height-sm - $border-width * 2;
      height: $input-height-sm - $border-width * 2;
      line-height: $input-height-sm - $border-width * 2;
    }
    .list-inline{
      padding-top: ($input-height-sm - $border-width * 2 - $tag-height - $tag-margin-y * 2) / 2 !important;
      padding-bottom: ($input-height-sm - $border-width * 2 - $tag-height - $tag-margin-y * 2) / 2 !important;
    }
  }

  &--lg{
    .#{$select-prefix-cls}__selected-value,
    .#{$select-prefix-cls}__input,
    .list-inline,
    .#{$select-prefix-cls}__placeholder{
      padding-right: $select-lg-selection-icon-font-size + $select-selection-icon-spacer;
    }

    .#{$select-prefix-cls}__selection-icon{
      right: $input-padding-x-lg;
      & .aid-chevron-down,
      & .aid-chevron-up {
        font-size:$select-lg-selection-icon-font-size;
      }
      & .aid-close-circle{
        font-size:$select-lg-clear-icon-font-size;
      }
    }

    .#{$select-prefix-cls}__selection,
    .#{$select-prefix-cls}__input{
      @extend .#{$input-prefix-cls}--lg;
    }

    .#{$select-prefix-cls}__selection{
      min-height: $input-height-lg;
    }

    .#{$select-prefix-cls}__input{
      min-height: $input-height-lg - $border-width * 2;
      height: $input-height-lg - $border-width * 2;
      line-height: $input-height-lg - $border-width * 2;
    }

    .list-inline{
      padding-top:($input-height-lg - $border-width * 2 - $tag-height - $tag-margin-y * 2) / 2 !important;
      padding-bottom:($input-height-lg - $border-width * 2 - $tag-height - $tag-margin-y * 2) / 2 !important;
    }
  }

}
