@import '../../style/themes/index.less';

.lm_adv_filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px @gap-base;
  align-items: center;
  font-size: @font-size-base;
}

.lm_filter_search {
  display: inline-flex;
  width: 140px;
}

// 自定义筛选
.lm_adv_filter_custom {
  display: inline-flex;
  gap: @gap-base;

  .lm_adv_filter_custom_select_wrapper {
    display: inline-flex;
    border-collapse: separate;
    border-spacing: 0;

    .lm_adv_filter_custom_select {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
      margin-right: -1px;
    }
    .lm_adv_filter_custom_addon {
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;

      &.addon_highlight {
        color: @primary-color;
      }
    }
  }

  .lm_adv_filter_custom_select {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-width: 100px;
    max-width: 180px;
    height: @height-base;
    padding: 0 @padding-xs;
    color: @text-color-secondary-deep;
    line-height: 1;
    border: @border-width-base @border-style-base @border-color-base;
    border-radius: @border-radius-base;
    cursor: pointer;
    transition: 0.3s;
    gap: 4px;

    &.small {
      height: @height-sm;
    }

    .lm_adv_filter_custom_select_label {
      overflow: hidden;
      text-overflow: ellipsis;

      span {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
    }

    .lm_adv_filter_custom_select_icon {
      color: @text-color-secondary;
      font-size: @font-size-base;
      transition: 0.3s;
    }

    &:hover {
      z-index: 1;
      border-color: @primary-color-hover;
    }

    &.expand {
      z-index: 1;
      color: @text-color-secondary;
      border-color: @primary-color-hover;

      .lm_adv_filter_custom_select_icon {
        transform: rotateX(180deg);
      }
    }
  }

  .lm_adv_filter_custom_line {
    width: @border-width-base;
    height: @height-base;
    background-color: @border-color-split;
  }
}

.filter_body_range {
  display: flex;
  align-items: center;
  gap: @gap-base;

  .number_range {
    display: flex;
    min-width: 128px;
    align-items: center;
    border: @border-width-base @border-style-base @input-border-color;
    border-radius: @control-border-radius;
    .ant-input-number-input {
      text-align: center;
    }
  }

  .ant-input-number-handler-wrap {
    display: none;
  }
}

.lm_adv_filter_custom_save {
  padding: @padding-lg;

  .custom_save_modal_title {
    font-size: @font-size-lg;
    font-weight: bold;
    line-height: @line-height-base;
    color: @text-color;
  }

  .custom_save_modal_content {
    font-size: @font-size-base;
    color: @text-color-secondary-deep;
    margin: @padding-xs 0 @padding-lg;
  }

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

    .footer_link_text {
      font-size: @font-size-base;
      color: @primary-color;
      cursor: pointer;
    }
  }
}

.lm_adv_filter_custom_append {
  .custom_append_modal_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: @padding-sm @padding-lg;

    .custom_append_modal_title {
      font-size: @font-size-lg;
      font-weight: bold;
      line-height: @line-height-base;
      color: @text-color;
    }
  }

  .custom_append_modal_body {
    padding: 0 @padding-lg;
  }

  .custom_append_modal_footer {
    padding: @padding-sm @padding-lg;
    text-align: right;

    .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
      margin-left: 8px;
    }
  }

  .ant-form-item-label {
    font-size: @font-size-base;
    font-weight: 600;
  }
  .form_label {
    font-size: @font-size-base;
    font-weight: 600;
    padding-bottom: @padding-xs;
  }
}

.lm_adv_filter {
  &._small {
    .lm_adv_filter_custom_line {
      height: @height-sm;
    }
  }

  &.large {
  }
}
