@selectScope: ~'@{prefixCls}Select';
@scDropdownCheckbox: ~'@{prefixCls}Dropdown-checkbox';
// scDropdown-checkbox
.ant-select-disabled {
  .anticon-down {
    &::after {
      background: @disabled-bg;
      color: @disabled-color;
    }
  }
}
.ant-select:not(.ant-pagination-options-size-changer) {
  &.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    padding: 0 28px 0 8px;
  }
  &.is-prefix{
    &.ant-select-single:not(.ant-select-customize-input) {
      .ant-select-selector {
        padding: 0 28px 0 30px;
      }
      .ant-select-selector {
        padding-left: var(--preWidth);
        display: inline-flex!important;
      }
      // &.ant-select-show-arrow .ant-select-selection-item {
      //   padding-right: 0;
      // }
    }
  }

  &.is-info {
    &.ant-select-single:not(.ant-select-customize-input) {
      .ant-select-selector {
        padding-right: 50px;
      }
      .ant-select-arrow {
        width: auto;
        height: 16px;
        transform: translateY(-2px);
        pointer-events: unset;
        .sc-you {
          transform: rotate(90deg);
        }
        .is-info--icon {
          display: flex;
          align-items: center;
          .sc-question-circle {
            cursor: pointer;
            font-size: 16px;
            color: @text-color-secondary;
            padding: 0 0 0 8px;
            border-left: 1px solid @border-color-base;
            margin-left: 6px;
            &:hover {
              &::before {
                color: @primary-color;
              }
            }
          }
        }
      }
      &.ant-select-open {
        .ant-select-arrow { 
          .sc-you {
            transform: rotate(270deg);
          }
        }
      }
    }
  }

  &.ant-select:not(.ant-select-disabled):hover { 
    .ant-select-selector {
      border-color: @primary-color;
    }
    .ant-select-arrow {
      .sc-you {
        color: @primary-color;
      }
      // .sc-question-circle {
      //   color: @primary-color;
      //   &::before {
      //     color: @primary-color;
      //   }
      // }
    }
  }
  &.ant-select:not(.ant-select-disabled):focus {
    .ant-select-selector {
      border-color: @primary-color;
      box-shadow: 0 0 0 2px @hover-shadow;
    }
    .ant-select-arrow {
      .sc-you {
        color: @primary-color;
      }
    }
  }
  .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) {
    .ant-select-selector {
      .ant-select-selector {
        border-color: @primary-color;
        box-shadow: 0 0 0 2px @hover-shadow;
      }
      .ant-select-arrow {
        .sc-you {
          color: @primary-color;
        }
      }
    }
  }
}
.ant-select:not(.ant-select-disabled):hover .ant-select-selector {
  border-color: @primary-color;
  box-shadow: 0 0 0 2px @hover-shadow;
}
.ant-select-arrow {
  top: 50%;
  right: 11px;
  color: @heading-color;
}
.ant-select-single {
  .ant-select-selector {
    .ant-select-selection-search {
      left: 7px;
    }
  }
}
.scDropdown {
  min-width: 150px;
  padding: 6px;
  border-radius: @border-r-6;
}
div.ant-select-dropdown {
  padding: 6px 0;
  border-radius: @border-r-6;
}
.ant-select-dropdown {
  .ant-select-item {
    // min-height: 28px;
    // line-height: 28px;
    padding: 0;
    .ant-select-item-option-content {
      margin: 0 6px 0 6px;
      padding: 4px 8px;
      border-radius: @border-r-3;
      &::after {
        content: '';
        display: block;
      }
    }
    
    border-radius: @border-r-3;
    color: @heading-color;
    & + .ant-select-item {
      .ant-select-item-option-content {
        margin-top: 2px;
      }
    }
  }
  .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
    background-color: transparent;
    font-weight: 400;
    .ant-select-item-option-content {
      background-color: @table-Menu-bg;
      color: @primary-color;
    }
  }
  .ant-select-item-option-active:not(.ant-select-item-option-disabled) {
    background-color: transparent;
  }
  .ant-select-item-option-active:not(.ant-select-item-option-disabled):not(.ant-select-item-option-selected):hover {
    background-color: transparent;
    .ant-select-item-option-content {
      background-color: @select-hover-bg;
    }
  }
  .ant-select-item:not(.ant-select-item-option-disabled):not(.ant-select-item-option-selected) {
    &:active {
      .ant-select-item-option-content {
        background-color: @active-bg;
      }
    }
    &:hover {
      .ant-select-item-option-content {
        background-color: @select-hover-bg;
      }
    }
  }
  .ant-select-dropdown-content {
    .ant-checkbox-group {
      width: 100%;
      .ant-checkbox-wrapper {
        width: 100%;
      }
    }
    .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
      .ant-checkbox-wrapper-checked {
        color: @primary-color;
      }
    }
    .tableEmpty {
      min-height: 160px;
    }
  }
  .ant-select-item-option-disabled {
    color: @disabled-color;
  }
  &.dropdown-large {
    .ant-select-item {
      font-size: 16px;
      .ant-select-item-option-content {
        padding:9px 8px;
      }
    }
  }
  &.dropdown-small {
    .ant-select-item {
      font-size: 12px;
      .ant-select-item-option-content {
        padding:0 8px;
      }
    }
  }
  // &.isSelectScroll {
  //   .ant-select-item-option-content {
  //     margin: 0 10px 0 6px;
  //   }
  // }
}
.ant-select {
  // min-width: 216px;
  color: @heading-color;
  &.ant-select-multiple {
    .ant-select-selection-item {
      background: @active-bg;
      padding-inline-end: 12px;
      color: @heading-color;
      border-radius: @border-r-3;
      border: none;
    }
    .ant-select-selection-item-content {
      margin-right: 6px;
    }
    .ant-select-selector {
      padding-left: 6px;
    }
  }
  &.ant-select-sm {
    .ant-select-item-option-content {
      padding: 0 9px;
    }
  }
  &.ant-select-open {
    .ant-select-arrow {
      .anticon-down {
        transform: rotate(180deg) translateX(-4px);
        transition: 0.6s all;
        &::after {
          color: @primary-color;
        }
      }
      i.sc-you {
        transform: rotate(270deg);
        transition: 0.6s all;
        color: @primary-color;
      }
    }
  }
  .ant-select-clear {
    color: @text-color-secondary;
    &:active {
      color: @text-color;
    }
    &:hover {
      color: @text-color;
    }
  }
}
.@{selectScope} {
  display: inline-block;
  min-width: 216px;
  // width: 216px;
  .ant-select {
    width: 100%;
  }
  &-xs {
    width: @input-xs-width;
    max-width: @input-xs-width;
  }
  &-x {
    width: @input-x-width;
    max-width: @input-x-width;
  }
  &-md {
    width: @input-md-width;
    max-width: @input-md-width;
  }
  &-l {
    width: @input-l-width;
    max-width: @input-l-width;
  }
  &-xl {
    width: @input-xl-width;
    max-width: @input-xl-width;
  }
  &.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {
    background: @disabled-bg-color;
  }
  &.ant-select:not(.ant-select-customize-input) .ant-select-selector {
    border-color: @border-color-base;
    border-radius: @border-r-3;
  }
  .ant-select-arrow {
    .sc-you {
      font-size: 16px;
      display: block;
      transform: rotate(90deg) translateX(-4px);
      color: @text-color-secondary;
    }
  }
  .clearSelect {
    position: absolute;
    z-index: 2;
  }
  .is-prefix {
    position: relative;
  }
  &-prefix {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    line-height: 30px;
    z-index: 1;
    pointer-events: none;
  }
  &.is-disabled {
    .@{selectScope}-prefix {
      color: @disabled-color;
    }
  }
  &-tooltip.ant-tooltip-placement-right, &-tooltip.ant-tooltip-placement-left {
    .ant-tooltip-arrow {
      top: 12px
    }
  }
}
.ant-select {
  &.ant-select-show-search {
    &.ant-select-focused {
      .ant-select-arrow {
        // position: relative;
        display: inline-block;
        width: 12px;
        height: 12px;
        svg {
          display: none!important;
        }
        &::after {
          content: "\e663";
          font-family: "sc-ui" !important;
          font-size: 16px;
          font-style: normal;
          -webkit-font-smoothing: antialiased;
          position: absolute;
          left: 0;
          line-height: 16px;
          top: -2px;
          color: @text-color-secondary;
        }
      }
    }
  }
  .anticon-search {
    position: relative;
    display: inline-block;
    width: 12px;
    height: 12px;
    svg {
      display: none!important;
    }
    &::after {
      content: "\e663";
      font-family: "sc-ui" !important;
      font-size: 16px;
      font-style: normal;
      -webkit-font-smoothing: antialiased;
      position: absolute;
      left: 0;
      line-height: 16px;
      top: -2px;
      color: @text-color-secondary;
    }
  }
}

.@{scDropdownCheckbox}.ant-select-dropdown {
  .ant-select-item {
    position: relative;
    .ant-select-item-option-state {
      display: none;
    }
    .ant-select-item-option-content {
      position: relative;
      padding-left: 30px;
      &::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 6px;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        background-color: @white-color;
        border: 1px solid @border-pagination-color;
        border-radius: 3px;
        border-collapse: separate;
        transition: all .3s;
        z-index: 1;
      }
    }
    &.ant-select-item-option-selected {
      .ant-select-item-option-content {
        &::before {
          position: absolute;
          top: 50%;
          left: 6px;
          transform: translateY(-50%);
          width: 16px;
          height: 16px;
          border: 1px solid @primary-color;
          background-color: @primary-color;
          border-radius: 3px;
          content: "";
          z-index: 1;
        }
        &::after {
          position: absolute;
          display: table;
          left: 10px;
          top: 48%;
          transform: translateY(-50%);
          width: 6px;
          height: 10px;
          border: 2px solid @white-color;
          border-top: 0;
          border-left: 0;
          transform: rotate(45deg) scale(1) translate(-50%,-50%);
          opacity: 1;
          transition: all .2s cubic-bezier(.12,.4,.29,1.46) .1s;
          content: " ";
          z-index: 2;
        }
      }
    }
  }
}
.@{selectScope} {
  .ant-select-single {
    .ant-select-selector {
      .ant-select-selection-search {
        left: var(--preWidth);
      }
    }
  }
}
.ant-select-show-arrow.ant-select-show-search.ant-select-open {
  .sc-you {
    display: none !important;
  }
}

.ant-select-show-arrow.ant-select-show-search.ant-select-focused {
  .ant-select-arrow {
    &::after {
      display: none;
    }
  }
}
.ant-select-show-arrow.ant-select-show-search.ant-select-focused.ant-select-open {
  .ant-select-arrow {
    &::after {
      display: inline-block;
    }
  }
}

.ant-select-single.ant-select-show-arrow .ant-select-selection-item, 
.ant-select-single.ant-select-show-arrow .ant-select-selection-placeholder {
  padding-right: 2px;
}

.effect() {
  animation-duration: 0.15s;
  animation-fill-mode: both;
  transform-origin: 0 0;
}
@keyframes rcSelectDropdownSlideUpIn {
  0% {
    opacity: 0;
    transform-origin: 0% 0%;
    transform: scaleY(0);
  }
  100% {
    opacity: 1;
    transform-origin: 0% 0%;
    transform: scaleY(1);
  }
}
@keyframes rcSelectDropdownSlideUpOut {
  0% {
    opacity: 1;
    transform-origin: 0% 0%;
    transform: scaleY(1);
  }
  100% {
    opacity: 0;
    transform-origin: 0% 0%;
    transform: scaleY(0);
  }
}

@keyframes rcSelectLoadingIcon {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}

.ant-select-dropdown {
  &.slide-up-enter,
  &.slide-up-appear {
    // animation: none !important;
    // display: none;
    .effect();
    opacity: 0;
    animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
    animation-play-state: paused;
  }

  .slide-up-leave {
    // animation: none !important;
    // display: none;
    .effect();
    opacity: 1;
    animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
    animation-play-state: paused;
  }

  &.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
  &.slide-up-appear.slide-up-appear-active&-placement-bottomLeft {
    // animation: none !important;
    // opacity: 1;
    animation-name: rcSelectDropdownSlideUpIn;
    animation-play-state: running;
  }

  &.slide-up-leave.slide-up-leave-active&-placement-bottomLeft {
    // animation: none !important;
    // display: none;
    animation-name: rcSelectDropdownSlideUpOut;
    animation-play-state: running;
  }

  &.slide-up-enter.slide-up-enter-active&-placement-topLeft,
  &.slide-up-appear.slide-up-appear-active&-placement-topLeft {
    // animation: none !important;
    // opacity: 1;
    animation-name: rcSelectDropdownSlideDownIn;
    animation-play-state: running;
  }

  &.slide-up-leave.slide-up-leave-active&-placement-topLeft {
    // animation: none !important;
    // display: none;
    animation-name: rcSelectDropdownSlideDownOut;
    animation-play-state: running;
  }
}