@import '~antd/es/style/themes/default.less';

.headerSearch {
  // position: relative;
  // display: block;
  margin-right: 0px;
  .input {
    width: 0;
    min-width: 0;
    overflow: hidden;
    background: transparent;
    border-radius: 0;
    transition: width 0.3s, margin-left 0.3s;

    :global(.@{ant-prefix}-select-selection) {
      background: transparent;
    }
    input {
      padding-right: 0;
      padding-left: 0;
      border: 0;
      box-shadow: none !important;
    }
    &,
    &:hover,
    &:focus {
      // border-bottom: 1px solid @border-color-base;
    }
    &.show {
      width: 320px;
      margin-left: 8px;
    }
  }
  :global {
    .@{ant-prefix}-select-selection-search {
      .@{ant-prefix}-input-affix-wrapper {
        border: 1px solid #b1b9c7;
        border-radius: 28px;
        width: 320px !important;
        color: #555555;
      }
    }
    .@{ant-prefix}-input-affix-wrapper {
      padding-right: 12px;
      width: 320px;
      min-width: 120px;
      max-width: 320px;
      border-radius: 28px;
    }
    .anticon-search {
      color: #888888;
    }
  }
}

.searchPanel {
  z-index: 4000;
  &.hidden {
    display: block;
    position: absolute;
    visibility: hidden;
    opacity: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 3px;
    box-sizing: border-box;
    background-color: rgb(255, 255, 255);
    min-width: 120px;
    font-size: 12px;
    color: rgb(51, 51, 51);
    transition: all 360ms ease 0s;
  }
  &.active {
    display: block;
    position: absolute;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 3px;
    box-sizing: border-box;
    background-color: rgb(255, 255, 255);
    min-width: 120px;
    font-size: 12px;
    color: rgb(51, 51, 51);
    transition: all 360ms ease 0s;
    visibility: visible;
    opacity: 1;
  }
  .container {
    padding: 8px 0px;
    outline: none;
    .body {
      min-width: 480px;
      max-width: 600px;
      font-size: 12px;
      // .content {
      //   display: flex;

      // }
      .flexItem {
        flex: 1 1 0%;
        overflow: hidden;
        .historyTitle {
          display: flex;
          -webkit-box-align: center;
          align-items: center;
          -webkit-box-pack: justify;
          justify-content: space-between;
          // margin: 16px 0px 0px;
          font-family: 'PingFang SC', sans-serif;
          font-weight: 400;
          color: rgb(136, 136, 136);
          padding: 0px 12px;
          height: 28px;
          line-height: 28px;
          font-size: 12px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
        .historyHref {
          padding: 0px 12px;
          height: 28px;
          line-height: 28px;
          font-size: 12px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          display: flex;
          -webkit-box-align: center;
          align-items: center;
          outline: none;
          text-decoration: none;
          color: rgb(85, 85, 85);
          transition: all 250ms linear 0s;
          &:link,
          &:visited {
            color: rgb(17, 17, 17);
          }
          .title {
            flex: 1 1 0%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
          &:hover {
            background-color: rgb(247, 247, 247);
            text-decoration: none;
            color: rgb(17, 17, 17);
          }
          .featIn {
            margin-left: 8px;
            color: rgb(193, 193, 193);
          }
        }
      }
      .item,
      .flexItem {
        margin-bottom: 4px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgb(242, 242, 242);
        .title {
          padding: 0px 12px;
          height: 28px;
          line-height: 28px;
          color: rgb(136, 136, 136);
        }
        .label {
          display: flex;
          flex-wrap: wrap;
          -webkit-box-pack: start;
          justify-content: flex-start;
          margin: 0px -3px -4px;
          height: auto;
          padding: 0px 12px;
          height: 28px;
          line-height: 28px;
          font-size: 12px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          max-height: 24px;
          overflow: hidden;
          .btn {
            box-sizing: border-box;
            outline: medium;
            background: none rgb(250, 250, 250);
            cursor: pointer;
            font-family: inherit;
            font-size: inherit;
            text-decoration: none;
            // transition: all 0.3s ease-out 0s;
            transition: all 250ms linear 0s;
            display: inline-block;
            border: 1px solid rgba(0, 0, 0, 0.1);
            overflow: hidden;
            vertical-align: middle;
            text-align: center;
            color: rgb(85, 85, 85);
            white-space: nowrap;
            padding: 0px 8px;
            height: 24px;
            line-height: 22px;
            margin: 4px 3px;
            border-radius: 14px;
            margin-top: 0px;
            margin-bottom: 0px;
            &:hover {
              background-color: rgb(247, 247, 247);
            }
          }
        }
      }
      .features {
        display: flex;
        .flex {
          flex: 1 1 0%;
          overflow: hidden;
          .title {
            padding: 0px 12px;
            height: 28px;
            line-height: 28px;
            font-size: 12px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            margin: 16px 0px 0px;
            font-family: 'PingFang SC', sans-serif;
            font-weight: 400;
            color: rgb(136, 136, 136);
            display: flex;
            -webkit-box-align: center;
            align-items: center;
            -webkit-box-pack: justify;
            justify-content: space-between;
            &:first-child {
              margin-top: 0;
            }
          }
          .feature {
            flex: 1 1 0%;
            overflow: hidden;
            .featureItem {
              padding: 0px 12px;
              height: 28px;
              line-height: 28px;
              font-size: 12px;
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
              display: flex;
              -webkit-box-align: center;
              align-items: center;
              outline: none;
              text-decoration: none;
              color: rgb(85, 85, 85);
              transition: all 250ms linear 0s;
              cursor: pointer;
              &:link,
              &:visited {
                color: rgb(17, 17, 17);
              }
              &:hover, &:focus {
                background-color: rgb(247, 247, 247);
                text-decoration: none;
                color: rgb(17, 17, 17);
                .text {
                  .href {
                    opacity: 1;
                  }
                }
              }

              .text {
                flex: 1 1 0%;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                display: flex;
                align-items: center;
                em {
                  font-style: normal;
                  color: @primary-color;
                  font-weight: 500;
                }
                .href {
                  opacity: 0;
                  margin-left: 4px;
                  color: rgb(193, 193, 193);
                  transition: none 0s ease 0s;
                }
              }
              .featIn {
                flex: 0 1 auto;
                max-width: 40%;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                margin-left: 8px;
                color: rgb(193, 193, 193);
              }
            }
          }
        }
      }
    }
    .footer {
      padding: 8px 12px 0px;
      border-top: 1px solid rgb(242, 242, 242);
      box-sizing: content-box;
      height: 16px;
      line-height: 16px;
      span {
        line-height: 12px;
        cursor: pointer;
        &:hover {
          color: @primary-color;
        }
      }
    }
  }
}

.searchOverfy {
  box-sizing: border-box;
  :global(.@{ant-prefix}-popover-arrow) {
    display: none;
  }
  :global(.@{ant-prefix}-popover-inner) {
    width: 100%;
    height: 100%;
    position: absolute;
    top: -19px;
  }
}
.empty {
  color: rgb(193, 193, 193);
  // text-align: center;
  padding-left: 4px;
  width: 100%;
  padding: 0px 12px;
  height: 28px;
  line-height: 28px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
