@import '../../src/style/tools.css';

.bx-search {
  width: 100%;
  height: 37px;
  background: var(--search-bg);
  padding-top: 7px;
  position: relative;
}

.bx-search-box {
  background: var(--color-bg-primary);
  margin: 0 15px;
  height: 30px;
  line-height: 30px;
  border-radius: 30px;
  position: relative;

  & .bx-search-icon {
    position: absolute;
    left: 9px;
    height: 30px;
    color: var(--search-icon-color);
    top: 0;

    & .bx-icon {
      position: absolute;
      left: 0;
      top: 50%;
      transform: translate3d(0, -50%, 0);
    }
  }

  & .bx-search-form {
    margin: 0 36px 0 30px;
    height: 30px;
    font-size: 14px;

    & .bx-search-input {
      background: none;
      line-height: 20px;
      border: none;
      height: 30px;
      outline: none;
      font-size: 14px;
      width: 100%;
      caret-color: var(--color-primary);
    }

    & .bx-search-input::-webkit-input-placeholder {
      color: var(--color-text-patch);
    }
  }

  & .bx-search-clear {
    position: absolute;
    right: 9px;
    top: 0;
    height: 30px;
    color: var(--color-text-assist);

    & .bx-icon {
      position: absolute;
      right: 0;
      top: 50%;
      transform: translate3d(0, -50%, 0);
    }
  }
}

.bx-search-box--with-action {
  margin: 0 60px 0 15px;
}

.bx-search-action {
  position: absolute;
  right: 0;
  width: 60px;
  top: 7px;
  font-size: 15px;
  color: var(--search-action-color);
  text-align: center;
  line-height: 30px;
}

.bx-search-suggestion-overlay {
  position: fixed;
  left: 0;
  top: 0;
  z-index: var(--zindex-10);
  background: var(--color-bg-primary);
  width: 100%;
  height: 100%;
  transform: translate3d(100%, 0, 0);
  animation: right_show 0.2s 0s forwards;
}

.bx-search-block {
  background: #fff;
  margin-bottom: 4px;
  padding: 15px;
  color: #333;

  & .bx-search-block-title {
    font-size: 16px;
    line-height: 21px;
    margin-bottom: 8px;
    font-weight: bold;
  }

  & .bx-search-history {
    font-size: 14px;
    line-height: 32px;

    & .bx-search-history-one {
      position: relative;
      color: #999;
    }

    & .bx-search-history-text {
      font-style: normal;
      margin-left: 14px;
      color: #333;
    }

    & .bx-search-history-close {
      position: absolute;
      right: 0;
      top: 0;
      color: #ccc;
    }
  }

  & .bx-search-history-clear {
    margin-top: 6px;
    color: #999;
    font-size: 13px;
    text-align: center;
    line-height: 20px;
  }
}

@keyframes right_show {
  0% {
    transform: translate3d(100%, 0, 0);
  }

  100% {
    transform: translate3d(0, 0, 0);
  }
}
