@import '../variables.scss';
@import './variables.scss';
@import '../utils.scss';
@import '../input/variables.scss';
@import '../tag/variables.scss';
@import "~@alifd/next/lib/core/index-noreset";
@import '~@alifd/next/lib/select/scss/variable';
@import '~@alifd/next/lib/menu/scss/variable';
@import '~@alifd/next/lib/select/scss/mixin';
@import '~@alifd/next/lib/menu/scss/mixin';
//默认带打勾的去掉，改在menu,focus背景色改在menu

//select 清除按钮
#{$select-prefix} {
  .#{$css-prefix}select-clear {
    .#{$css-prefix}icon-delete-filling {
      &::before {
        content: $input-feedback-clear-icon;
        // content: '\E81B';
      }
    }
  }

  .#{$css-prefix}input.#{$css-prefix}focus {
    box-shadow: none;
  }

  &-popup-wrap,
  &-single-menu,
  &-auto-complete-menu,
  &-multiple-menu {

    margin-top: $s-2;
  }

  //select中tag的样式
  &.#{$css-prefix}xs {
    #{$select-prefix}-inner {
      // height: $b-design-form-element-xs-height;

      #{$select-prefix}-values {
        @include select-size($b-design-form-element-xs-height, $select-s-lineheight);
        padding: auto $s-3;
      }

      .#{$css-prefix}input-control {
        padding-right: $s-2;
      }
    }

  }

  &-multiple,
  &-tag {
    &.#{$css-prefix}large {
      .#{$css-prefix}select-values {
        padding-top: $b-design-select-tag-large-padding-tb;
        padding-bottom: $b-design-select-tag-large-padding-tb;

        input {
          height: $tag-size-l-height !important;
          line-height: $tag-size-l-height;
        }
      }

      .#{$css-prefix}tag {
        height: $tag-size-l-height;
        line-height: calc(#{$tag-size-l-height} - #{$tag-border-width} - #{$tag-border-width});
      }
    }

    &.#{$css-prefix}medium {
      .#{$css-prefix}select-values {
        padding-top: $b-design-select-tag-medium-padding-tb;
        padding-bottom: $b-design-select-tag-medium-padding-tb;
        line-height: $tag-size-m-height;

        input {
          height: $tag-size-m-height !important;
          line-height: $tag-size-m-height;
        }
      }

      .#{$css-prefix}tag {
        padding: 0;
        height: $tag-size-m-height;
        line-height: calc(#{$tag-size-m-height} - #{$tag-border-width} - #{$tag-border-width});

        .#{$css-prefix}tag-body {
          line-height: calc(#{$tag-size-m-height} - #{$tag-border-width} - #{$tag-border-width});
        }

        .#{$css-prefix}tag-close-btn {
          line-height: calc(#{$tag-size-m-height} - #{$tag-border-width} - #{$tag-border-width});

        }
      }
    }

    &.#{$css-prefix}small {
      .#{$css-prefix}select-values {
        padding-top: $b-design-select-tag-small-padding-tb;
        padding-bottom: $b-design-select-tag-small-padding-tb;
        line-height: 24px;

        .#{$css-prefix}select-trigger-search {
          margin-bottom: 0px;
        }

        input {
          height: $tag-size-s-height !important;
          line-height: $tag-size-s-height;
        }
      }

      .#{$css-prefix}tag {
        padding: 0;
        height: $tag-size-s-height;
        line-height: $tag-size-s-height;

        .#{$css-prefix}tag-body {
          line-height: $tag-size-s-height;
        }

        .#{$css-prefix}tag-close-btn {
          line-height: $tag-size-s-height;

        }
      }
    }

    &.#{$css-prefix}xs {
      #{$select-prefix}-values {
        @include select-size($b-design-form-element-xs-height, $select-s-lineheight);
        padding-top: $b-design-select-tag-xs-padding-tb !important;
        padding-bottom: $b-design-select-tag-xs-padding-tb !important;
        line-height: calc(#{$b-design-form-element-xs-height} - #{$b-design-select-tag-xs-padding-tb} * 4) !important;

        .#{$css-prefix}select-trigger-search {
          margin-bottom: 0px;
        }

        input {
          height: $b-design-tag-size-xs-height !important;
          line-height: $b-design-tag-size-xs-height;
        }
      }

      #{$select-prefix}-values-compact {
        height: $b-design-form-element-xs-height !important;
      }

      #{$tag-prefix} {
        border: 0;
        @include select-tag-size($select-s-lineheight, calc(0px - 1px));

        &-body {
          line-height: $select-s-lineheight;
        }
      }

      .#{$css-prefix}tag {
        padding: 0;
        height: $b-design-tag-size-xs-height;
        line-height: $b-design-tag-size-xs-height;

        .#{$css-prefix}tag-body {
          line-height: $b-design-tag-size-xs-height;
          padding-left: $b-design-tag-size-xs-padding-lr;
          max-width: calc(100% - #{$b-design-tag-size-xs-margin-l} - #{$b-design-tag-size-xs-padding-r} - #{$b-design-tag-size-xs-padding-lr});
        }

        .#{$css-prefix}tag-close-btn {
          line-height: $b-design-tag-size-xs-height;
          margin-left: $b-design-tag-size-xs-margin-l;

          padding-right: $b-design-tag-size-xs-padding-r;

          .#{$css-prefix}icon:before {
            font-size: 12px !important;
            width: 12px !important;
          }

          .#{$css-prefix}icon:after {
            width: $b-design-tag-size-xs-icon-bg-size !important;
            height: $b-design-tag-size-xs-icon-bg-size !important;
            left: calc(50% - #{$b-design-tag-size-xs-icon-bg-size} / 2) !important;
            top: calc(50% - #{$b-design-tag-size-xs-icon-bg-size} / 2) !important;
          }
        }
      }

      .#{$css-prefix}input-label,
      .#{$css-prefix}input-control,
      #{$select-prefix}-tag-compact {
        line-height: calc(#{$b-design-form-element-xs-height} - 2px);
      }
    }
  }

  &.#{$css-prefix}white {
    .#{$css-prefix}select-inner {
      .#{$css-prefix}tag {
        border-color: white !important;
        background-color: white !important;

        &:hover {
          .#{$css-prefix}tag-close-btn {
            .#{$css-prefix}icon::after {
              background-color: $b-design-select-white-tag-hover-close-btn-bg !important;
            }
          }
        }

      }
    }



  }


  //后缀字体颜色更改

  .#{$css-prefix}input-inner.#{$css-prefix}after,
  .#{$css-prefix}input-label {
    color: $b-design-select-label-color;
  }
}

#{$menu-prefix} {
  &-item {
    &:not(.#{$css-prefix}disabled):not(.#{$css-prefix}selected).#{$css-prefix}focused {
      color: $menu-color;
    }
  }
}

.#{$css-prefix}select-menu,
.#{$css-prefix}select-menu-wrapper {
  border: 0px;

  &::-webkit-scrollbar-thumb {
    background-color: $color-fill1-3;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
  }

  &:hover::-webkit-scrollbar-thumb {
    background-color: $color-fill1-3;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
  }

  &::-webkit-scrollbar {
    width: 4px;
    height: 4px;
    background-color: white;
  }

  &::-webkit-scrollbar-track {
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
  }


}

.#{$css-prefix}white {

  .#{$css-prefix}select-menu,
  .#{$css-prefix}select-menu-wrapper {
    &::-webkit-scrollbar {
      background-color: $color-fill1-10;
    }
  }

}