// placeholder
@import (optional, reference) '../../style/themes/index';

@table-search-query-filter-prefix-cls: ~'@{mega-prefix}-table-search-query-filter';

.@{table-search-query-filter-prefix-cls} {
  &-content {
    height: 50vh;
    display: flex;
    flex-direction: column;

    &-history {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-bottom: 10px;
      border-bottom: 1px solid @border-color-base;
      gap: 10px;
      padding-right: 16px;
      .title {
        cursor: pointer;
        color: @primary-color;
        position: relative;
      }
      .titleDisabled {
        cursor: default;
        color: rgba(0, 0, 0, 0.65);
        position: relative;
      }

      &-list {
        flex: 1;
        align-items: center;
        display: flex;
        overflow: auto;

        .tag {
          display: inline-block;
          cursor: pointer;
          max-width: 120px;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
          position: relative;
          padding-right: 15px;
        }
        .historyTag {
          color: @primary-color;
          font-weight: bold;
          max-width: 120px;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
          border-color: @primary-color;
          position: relative;
          padding-right: 15px;
        }
        .anticon-close {
          position: absolute;
          right: 5px;
          top: 8px;
        }
        .tagSpan {
          max-width: 90px;
          height: 22px;
          display: inline-block;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
          padding: 3px 4px 0 0;
        }
      }

      .ico {
        cursor: pointer;
        color: @error-color;
      }
    }

    &-filter {
      flex: 1;
      padding: 10px 0;
      overflow: auto;
      scrollbar-gutter: stable;
    }

    &-btn {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-top: 1px solid @border-color-base;
      padding-top: 10px;

      &-opt {
        display: flex;
        align-items: center;
        gap: 20px;

        &-add {
          color: @primary-color;
          cursor: pointer;

          &:hover {
            opacity: 0.8;
          }
        }

        &-clear {
          color: @error-color;
          cursor: pointer;

          &:hover {
            opacity: 0.8;
          }
        }
      }

      .ico {
        margin-right: 6px;
      }
    }

    .radio-badge {
      position: absolute;
      min-width: 20px;
      height: 20px;
      padding: 0 6px;
      color: #fff;
      font-weight: 400;
      font-size: 12px;
      line-height: 20px;
      white-space: nowrap;
      text-align: center;
      background: @primary-color;
      border-radius: 10px;
      box-shadow: 0 0 0 1px #fff;
      top: 0;
      right: 0;
      z-index: 99;
      transform: translate(50%, -50%);
      transform-origin: 100% 0;
    }

    .ant-form-item-hidden {
      display: none;
    }

    .ant-calendar-picker,
    .ant-input,
    .ant-select,
    .ant-input-number {
      width: 100%;
    }

    .form-list-box {
      .form-list-item {
        display: flex;
        // align-items: center;
        // justify-content: space-between;
        gap: 10px;
        // margin-bottom: 4px;

        &-cus {
          flex: 1;
          .ant-calendar-picker {
            width: 100% !important;
          }
        }
        .ico {
          color: @error-color;
          cursor: pointer;
          height: 36px;
          display: flex;
          align-items: center;
        }
        .form-list-index {
          width: 34px;
          height: 34px;
          background-color: #dfeff7;
          color: #000000a6;
          display: flex;
          justify-content: center;
          align-items: center;
          margin-top: 2px;
          border-radius: 5px;
        }
      }
    }
    .historyBox {
      position: absolute;
      top: 105px;
      left: 22px;
      z-index: 99;
      ul {
        width: 120px;
        list-style: none;
        padding: 4px 0;
        text-align: left;
        list-style-type: none;
        background-color: #fff;
        background-clip: padding-box;
        border-radius: 4px;
        outline: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        -webkit-transform: translateZ(0);
        li {
          font-size: 14px;
          line-height: 22px;
          padding: 4px 10px;
          cursor: pointer;
          width: 100%;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }
        li:hover {
          background-color: #dfeff7;
          white-space: nowrap;
          text-overflow: ellipsis;
        }
      }
    }
  }
}
