.size(@w, @h) {
  width: @w;
  height: @h;
}

.square(@w) {
  .size(@w, @w);
}

.tagClose() {
  margin-left: 5px;
  vertical-align: middle;
  cursor: pointer;
}

ul {
  list-style-type: none;
  padding: 0;
}

.super-search {
  &- {
    &tag-outter.disabled {
      cursor: not-allowed;
    }
    &tag-close {
      .tagClose();
    }
    &modal {
      .flex-side {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      .no-event {
        --webkit-pointer-events: none;
        pointer-events: none;
      }
      .ivu-modal {
        top: 50px;

        @media (max-width: 1366px) {
          top: 10px;
        }

        &- {
          &header {
            display: none;
          }
        }
      }

      .super-search- {
        &container {
          padding: 10px 0;
          border-bottom: 1px solid #eee;
        }
        &condition {
          font-size: 13px;
          color: #333;
          transition: color .2s ease-out;

          &.selected {
            color: #4a90e2;
          }
        }
        &title {
          padding-top: 0;
          font-size: 14px;
          color: #333;
        }
        &list-item {
          display: inline-block;
          margin-right: 15px;
          padding-right: 54px;
          border-right: 1px solid #eee;
          cursor: default;

          &:last-child {
            border-right: none;
          }
        }
        &tag {
          color: #4a90e2;
          background: #e2edff;
          border-radius: 10px;

          .ivu-tag-text {
            color: inherit;
          }
          .ivu-icon-ios-close {
            color: inherit;
          }
        }
        &tag-close {
          .tagClose();
        }
        &searcher .ivu-input:not(:focus) {
          border: 1px solid #eee;
          background: #f7f7f7;
        }

        &footer {
          margin-top: 10px;
          text-align: right;

          .ivu-btn {
            width: 89px;
          }
          button + button {
            margin-left: 10px;
          }
        }

        &transfer {
          &- {
            &header {
              margin-bottom: 5px;
              padding: 2px 10px;
              border-bottom: 1px solid #eee;
              background: #f7f7f7;
            }
            &title {
              font-size: 13px;
              font-weight: 500;
              color: #586277;

              > span {
                margin-left: 5px;
              }
            }
            &btn {
              padding: 4px 11px;

              + button {
                margin-left: 5px;
              }
            }
            &searcher {
              padding: 2px 7px;
            }
            &list {
              position: relative;
              width: 316px;
              border: 1px solid #eee;
            }
            &list-content {
              height: 500px;
              overflow: auto;
              padding: 2px 7px;
              transform: translateZ(0);
              backface-visibility: hidden;

              @media (max-width: 1366px) {
                height: 300px;
              }
            }
            &list-item {
              position: relative;
              padding: 5px;
              white-space: nowrap;
              cursor: pointer;

              &:hover {
                background: #efefef;
              }

              &::before {
                content: "";
                position: absolute;
                top: 0;
                left: 0;
                .size(2em, 100%);
                z-index: 3;
              }
              
              > span {
                display: inline-block;
                overflow: hidden;
                max-width: calc(100% - 2em);
                text-overflow: ellipsis;
                vertical-align: top;
              }

              .ivu-tooltip {
                overflow: hidden;
                text-overflow: ellipsis;
              }
            }
            &empty-text {
              position: absolute;
              left: 50%;
              margin-left: -34px;
              padding: 10px;
              text-align: center;
            }
            &indicator {
              display: block;
              position: relative;
              .size(28px, 26px);
              margin: 10px 0;
              padding: 0;
              line-height: 1;
              border-radius: 3px;
            }
          }
        }
      }
    }
    &popper {
      .left {
        float: left;
      }
      .right {
        float: right;
      }
      .clearfix {
        &::before,
        &::after {
          content: "";
          display: table;
        }
        &:after {
          clear: both;
        }
      }
      .mr10 {
        margin-right: 10px;
      }
      .super-search- {
        &select-box {
          width: 176px;
        }
        &select {
          max-height: 650px;
          overflow: auto;
          padding: 8px 5px;
          border: 1px solid #dcdee2;
          cursor: pointer;

          @media (max-width: 1366px) {
            max-height: 420px;
          }
        }
        &option {
          padding: 0 2px;
          font-size: 14px;
          color: #000;
          transition: color 0.2s ease-out, background-color 0.2s ease-out;

          &:hover,
          &.current {
            position: relative;
            background: #eee;
          }
          &.current::after {
            content: "";
            position: absolute;
            top: 50%;
            right: 1px;
            .square(1em);
            margin-top: -0.5em;
            background: #2d8cf0;
            border-radius: 50%;
            transform: scale(1);
            animation: super-search-dot 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
          }
          &.selected {
            color: #fff;
            background: rgb(53, 154, 255);

            &::after,
            &.current::after {
              background: #b9f0ff;
            }
          }
        }
        &table {
          width: 360px;
        }
      }
    }
  }
}

@keyframes super-search-dot {
  from {
    transform: scale(0);
  }
}