@import (reference) '../theme/variables/antdVariables.less';
@queryFormPrefixCls: ~'ued-queryform';

.@{ant-prefix}-btn-link.ued-button-wrap.@{queryFormPrefixCls}-actions-fold {
    &,
    &.@{ant-prefix}-btn-lg,
    &.@{ant-prefix}-btn-sm {
        padding-left: 8px;
        padding-right: 0;
        
        .anticon {
            margin-left: 4px;
        }
    }
}

// 高级搜搜样式
.@{queryFormPrefixCls}-filter {
  &-drawer {
      &.ued-drawer-wrap {
        .@{ant-prefix}-drawer-body {
          padding: 0;
        }
      }
  }
  &-add {
      display: flex;
      align-items: center;
      &-item {
        .anticon {
          margin-right: 4px;
        }
        cursor: pointer;
        display: flex;
        align-items: center;
      }
  }
  &-popover {
    padding-top: 0;
    .@{ant-prefix}-popover-inner-content {
      padding: 4px;
      width: 216px;
      .@{ant-prefix}-input-affix-wrapper {
        padding: 2px 8px;
      }
    }
  }
  &-select-group {
    .@{queryFormPrefixCls}-filter-select-item {
      width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 28px;
      display: inline-flex;
      align-items: center;
      padding: 0 8px;
      margin-top: 4px;
      border-radius: @border-radius-base;
      cursor: pointer;
      &:hover {
        background-color: @dropdown-hover-bg;
      }
      &.@{queryFormPrefixCls}-filter-select-active-item {
        background-color: transparent;
        color: @disabled-color;
        cursor: not-allowed;
        &:hover {
         background-color: transparent;
        }
      }
    }
  }
  &-item {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 12px;
    & > .@{ant-prefix}-select {
      overflow: hidden;
      flex: 1;
      margin: 0 4px;
    }
    .anticon-minus-circle {
      padding-left: 4px;
      cursor: pointer;
      color: @text-color-secondary;
    }
  }
  &-operator {
    width: 54px;
    height: 28px;
    &-text {
      padding: 0 8px;
      line-height: 28px;
    }
  }
  &-connector {
    width: 108px;
    &.@{ant-prefix}-select {
      flex: none;
    }
  }
  &-editComponent {
    overflow: hidden;
    flex: 1;
    margin-right: 4px;
  }
  &-drawer-content {
    padding: 16px 22px;
  }
  &-drawer-dragging {
    user-select: none;
  }
  &-resize-handler {
    position: absolute;
    width: 13px;
    height: 44px;
    background-color: rgba(229, 229, 229, 1);
    border-radius: 6px;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    left: 0;
  
    &::before, &::after {
      content: '';
      display: block;
      position: absolute;
      width: 2px;
      height: 12px;
      top: 50%;
      transform: translateY(-50%);
      border-radius: 14px;
      background-color: rgba(28, 36, 46, 0.25);
    }
  
    &::after {
      right: 3px;
    }
  
    &::before {
      left: 3px;
    }
  }
  // 已选样式
  &-selected-field {
    display: flex;
    height: 32px;
    align-items: center;
    border: 1px solid rgba(220, 221, 229, 1);
    width: 100%;
    margin-top: 12px;
    overflow: hidden;
    &-label {
      background-color: rgba(247, 248, 250, 1);
      padding: 5px 8px;
      border-right: 1px solid rgba(220, 221, 229, 1);
      height: 100%;
      flex: none;
    }
    &-content {
      display: flex;
      align-items: center;
      height: 100%;
      padding: 4px 8px;
      overflow: auto;
      width: 100%;
      height: 32px;
      column-gap: 4px;
      row-gap: 4px;
      flex-wrap: wrap;
      .@{queryFormPrefixCls}-filter-field-item {
        display: flex;
        align-items: center;
        padding: 0 4px;
        border-radius: 2px;
        background-color: fade(@primary-color, 10%);
        font-size: 13px;
        height: 24px;
        .ued-input-readonly {
          font-size: 13px;
        }
      }
      .@{queryFormPrefixCls}-filter-field-item-remove {
        font-size: 12px;
        margin-left: 4px;
        color: rgba(144, 146, 163, 1);
      }
    }
  }
}

