@import '../../style/themes/index.less';
.lm_select {
  &.ant-select {
    font-size: @font-size-base;
    // width: 100%;
  }

  .ant-select-selection-overflow-item-rest .ant-select-selection-item {
    color: @primary-color;
    background-color: transparent;
    border-color: transparent;
    word-spacing: -0.3em;
  }
}

.lm_select_dropdown {
  // padding: 0;
}

.lm_select_dropdown_base {
  display: inline-block;
  font-size: @font-size-base;

  .line {
    display: inline-block;
    height: 32px;
    border-right: 1px solid #eee;
  }

  .ant-radio-button-wrapper {
    font-size: @font-size-base;
  }

  .filter_search {
    max-width: 140px;

    // .ant-input-group {
    //   line-height: 1;
    // }

    // input {
    //   font-size: 12px;
    // }
  }

  .filter_item {
    display: inline-flex;
    align-items: center;
    height: 32px;
    line-height: 1;
    border-radius: 1px;
    padding: 0 8px;
    transition: 0.3s;
    cursor: pointer;

    &:hover,
    &.isfiltering {
      background: @text-color-bg;
    }

    .filter_item_label {
      margin-right: 4px;
    }

    .filter_item_value {
      display: inline-flex;
      align-items: center;
      color: @text-color;

      .addonBefore {
        font-size: 16px;
        margin-right: 4px;
      }

      .addonAfter {
        font-size: @font-size-base;
        color: @text-color;
        transition: 0.3s;

        &:hover {
          color: @primary-color;
        }
      }

      .checked + .addonAfter {
        margin-left: 4px;
      }

      .ant-picker {
        font-size: 12px;

        input {
          font-size: 12px;
        }

        .ant-picker-clear {
          color: @text-color;

          &:hover {
            color: @primary-color;
          }
        }
      }

      .picker_separator {
        color: @text-color;
        margin: 0 4px;
      }
    }

    &.filter_item_more .filter_item_value {
      color: @text-color;
    }

    &.isfiltering {
      // 正在过滤中
      .filter_item_value {
        .checked {
          color: @primary-color;

          .ant-picker {
            input {
              color: @primary-color;
            }
          }
        }
      }
    }

    &.active {
      // 下拉
      .filter_item_value {
        .addonAfter {
          transform: rotateZ(180deg);
        }
      }

      &.filter_item_more .filter_item_value {
        color: @primary-color;

        .addonBefore,
        .addonAfter {
          color: @primary-color;
        }
      }
    }
  }
}

.ant-dropdown,
.ant-select-dropdown {
  *::-webkit-scrollbar {
    height: 6px;
    width: 4px;
    border-radius: 6px;
  }

  *::-webkit-scrollbar-track {
    background-color: transparent;
  }

  *::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background-color: #d9d9d9;
    transition: 0.3s;

    &:hover {
      background-color: #999;
    }
  }
}

.select_dropdown {
  display: flex;
  flex-flow: column;
  box-shadow: 0 2px 6px @box-shadow-color;
  background-color: #fff;

  &.filter_cascader_container {
    box-shadow: none;
  }

  .filter_header {
    min-height: 32px;
    padding: 4px 8px;

    .filter_header_operate {
      display: flex;
      align-items: center;
      justify-content: space-between;

      .filter_header_operate_checked {
        display: inline-flex;
        align-items: center;
      }

      .filter_reset {
        font-size: 12px;
        color: @primary-color;
        cursor: pointer;
      }

      .filter_tip {
        font-size: 12px;
        color: @text-color;
      }
    }

    .ant-input-group {
      line-height: 1;
    }

    input {
      font-size: 12px;
    }

    .ant-input-search + .filter_header_operate {
      margin-top: 8px;
    }
  }

  .filter_body {
    width: 100%;

    .virtual_list {
      min-width: 168px;
      max-height: 224px;
      overflow: auto;
    }

    .filter_item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 12px;
      height: 32px;
      min-width: 120px;
      padding: 0 8px;
      transition: 0.3s;
      white-space: nowrap;
      cursor: pointer;
      gap: 8px;

      &.add_more {
        border-top: 1px solid @text-color-bg;
      }

      .filter_item_content {
        flex: auto;
      }

      .filter_item_operate {
        .hover_show {
          font-size: 16px;
          color: @primary-color;
          transition: 0.3s;
          opacity: 0;
        }
      }

      &[disabled],
      &.disabled {
        display: none;
      }

      &.checked {
        background-color: @primary-color-hover;
      }

      &:hover {
        background-color: @primary-color-hover;
        .filter_item_operate .icon_top {
          opacity: 1;
        }
      }
    }
  }

  .filter_empty {
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    min-height: 40px;
    color: #666;
    padding: 16px 8px;
    margin: auto;
    gap: 4px;

    .filter_empty_text {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 20px;
      color: @text-color;
    }
  }

  // 组件的样式重置
  .ant-checkbox-wrapper {
    flex: 1;
    font-size: 12px;
    align-items: center;

    .ant-checkbox {
      top: initial;
    }
  }
}

// 级联选择弹窗
.ant-select-dropdown.ant-cascader-dropdown {
  padding: 0;
}
