.#{$ns}FilterCards{

  width: 100%;
  max-height: 0;
  position: relative;
  border-bottom: 0;
  transition: max-height .2s cubic-bezier(0.2, 0, 0.8, 1);
  overflow-y: auto;
  will-change: transform;
  display: flex;
  flex-direction: column;

  &-show{
    max-height: 345px;
  }

  &-header{
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    border-top: 1px solid #dedede;
    border-bottom: 1px solid #dedede;
    user-select: none;
    flex: 0 0 48px;

    &-left{
      position: relative;
      flex-grow: 0;
      flex-shrink: 1;
      overflow: hidden;
    }

    &-right{
      display: flex;
      flex-shrink: 0;
      flex-grow: 1;
    }

    &--tabs{
      display: flex;
      height: 48px;
      width: 100%;
      white-space: nowrap;
      overflow-x: auto;
      overflow-y: hidden;
    }

    &--tab{
      display: flex;
      align-items: center;
      position: relative;
      padding: 0 10px;
      cursor: pointer;
      transition: color .3s;

      &::before{
        position: absolute;
        opacity: 0;
        bottom: 5px;
        left: 2px;
        right: 2px;
        content: '';
        height: 2px;
        background-color: $primary;
        transition: all .3s;
        transform: translateY(5px);
      }

      &:not(:last-child){

        &::after{
          position: absolute;
          top: 50%;
          right: 0;
          content: '';
          width: 1px;
          height: 20px;
          background-color: #dedede;
          transform: translateY(-50%);
        }
      }

      &.is-active, &:hover{
        color: $primary;
        font-weight: 500;

        &::before{
          opacity: 1;
          transform: translateY(0);
        }
      }
    }


    &--tools{
      display: flex;
      align-items: center;
      height: 26px;
      background: #f3f3f3;
      border-radius: 13px;
      color: #606060;

      span{
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        height: 20px;
        padding: 0 10px;
        cursor: pointer;

        &:not(:last-child){
          border-right: 1px solid #dedede;
        }

        &:hover{
          color: $primary;
        }
      }
    }

    &--plusIcon{
      line-height: 1px;
      display: flex;
      align-items: center;
      border-radius: 3px;
      height: 26px;
      padding: 0px 5px;
      transition: all 0.3s ease 0s;
      color: rgba(0, 0, 0, .45);
      cursor: pointer;
      margin-right: auto;
      margin-left: 5px;

      &:hover{
        background-color: rgb(243, 243, 243);
      }

      svg{
        fill: currentColor;
        line-height: 1;
        vertical-align: middle;
        border-radius: 3px;
        box-sizing: border-box;
        display: inline-block;
        height: 14px;
        line-height: 14px;
        width: 14px;
        transition: opacity .2s;
        border-radius: 0;
      }
    }

    &--listIcon{
      background-color: rgb(243, 243, 243);
      line-height: 1px;
      display: flex;
      align-items: center;
      border-radius: 3px;
      height: 26px;
      padding: 0px 5px;
      transition: all 0.3s ease 0s;
      margin-left: 15px;
      color: rgb(48, 48, 48);
      cursor: pointer;

      svg{
        fill: currentColor;
        line-height: 1;
        vertical-align: middle;
        border-radius: 3px;
        box-sizing: border-box;
        display: inline-block;
        height: 16px;
        line-height: 14px;
        width: 16px;
        transition: opacity .2s;
        border-radius: 0;
      }
    }
  }

  &-editor{
    position: relative;
    flex-grow: 1;
    overflow-x: hidden;
    overflow-y: auto;
    
    &-title{
      padding: 10px 20px;
      font-weight: 500;
    }
  }

  .#{$ns}FilterCards-group-wrapper{
    margin: 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e8e8;
  }
  .#{$ns}FilterCards-group{

    .#{$ns}Group-split-line{
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      padding-bottom: 5px;

      .#{$ns}Group-split-text{
        padding: 0 10px;
        background-color: #fff;
        position: relative;
        z-index: 1;
      }

      &::after{
        content: "";
        display: block;
        height: 1px;
        width: 100%;
        background-color: #e8e8e8;
        position: absolute;
      }
    }

    &-item{
      display: flex;
      margin-bottom: 10px;

      .icon-content{
        border: 1px solid #909090;
        margin: 3px 10px 3px 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        min-width: 22px;
        height: 22px;
        border-radius: 22px;

        svg{
          color: #909090;
          width: 12px;
          height: 12px;
          fill: currentColor;
          vertical-align: middle;
          box-sizing: border-box;
          display: inline-block;
          line-height: 14px;
          transition: opacity .2s;
          border-radius: 0;
        }

        &:hover{
          border-color: #ea0d0d;

          svg{
            color: #ea0d0d;
          }
        }
      }

      



      &-and{
        min-width: 15px;
        margin-right: 10px;
        line-height: px2rem(28px);
      }

      &-field, &-opr, &-value{
        min-width: px2rem(130px);
        width: px2rem(130px);
        vertical-align: top;
        display: inline-block;
        margin-right: px2rem(10px);

        & > .#{$ns}Select{
          min-width: 100%;
          max-width: 100%;
          display: inline-flex !important;

          .#{$ns}Select-valueWrap{
            width: 0;
          }
        }
      }

      &-opr{
        min-width: px2rem(90px);
        width: px2rem(90px);
      }

      &-value{
        & > .#{$ns}DateRangePicker{
          min-width: px2rem(255px);
          width: px2rem(255px);
        }

        
        & > .#{$ns}DatePicker{
          min-width: px2rem(150px);
          width: px2rem(150px);
        }

        & > .#{$ns}Select,
        & > .#{$ns}Number,
        & > .#{$ns}InputBox{
          min-width: px2rem(280px);
          width: px2rem(280px);
        }

        &-between{
          display: flex;
          & > span{
            margin: 0 10px;
            line-height: px2rem(28px);
          }
          & > .#{$ns}Number{
            min-width: px2rem(120px);
            width: px2rem(120px);
          }
        }

      }

    }

    &-item-add{
      display: inline-flex;
      align-items: center;
      color: #338fe5;
      user-select: none;
      cursor: pointer;

      span{
        border: 1px solid #338fe5;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        min-width: 22px;
        height: 22px;
        border-radius: 22px;
        margin-right: 10px;

        svg{
          width: 12px;
          height: 12px;
          color: #338fe5;
          fill: currentColor;
          vertical-align: middle;
          box-sizing: border-box;
          display: inline-block;
          line-height: 14px;
          transition: opacity .2s;
          border-radius: 0;
        }
      }

      &:hover{
        color: #64aaeb;

        span{
          border-color: #64aaeb;
        }
      }
    }
  }

  .#{$ns}FilterCards-editor-empty{
    padding-bottom: 10px;
    color: #909090;
    display: flex;
    justify-content: center;

    &-add{
      display: inline-block;
      padding: 0 5px;
      color: #338fe5;
      cursor: pointer;
      transition: color .2s;

      &:hover{
        color: #303030;
      }
    }
  }

  .#{$ns}FilterCards-editor-group-add{
    height: 40px;
    color: #606060;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    svg{
      color: #606060;
      margin-right: 5px;
      fill: currentColor;
      vertical-align: middle;
      box-sizing: border-box;
      display: inline-block;
      height: 16px;
      line-height: 14px;
      width: 16px;
      transition: opacity .2s;
      border-radius: 0;
    }

    &:hover{
      background-color: #f9fbfe;
      color: #338fe5;

      svg{
        color: #338fe5;
      }
    }
  }
}

// 动态组件
.#{$ns}Dynamic-component{
  margin-right: calc(var(--Form-item-gap) / 2);
  display: flex;

  &>div:last-child{
    margin-left: -1px;
    .#{$ns}Select-valueWrap{
      width: 130px;
      min-width: 130px;
      max-width: 130px;
    }

    &.#{$ns}InputBox{
      width: 123px;
      min-width: 123px;
      max-width: 123px;
    }
  }

  &>div{
    &.is-opened, &.is-focused, &:hover{
      z-index: 99;
    }
  }


}