$search-bar-bg-color:#ddd;

@import "../1px/style";

.mx-search-bar{
  padding: 7px 8px;
  background-color: $search-bar-bg-color;
  display: flex;
  align-items: center;
  height: 47px;
  overflow: hidden;
  @extend .mx-1px-top-normal;
  @extend .mx-1px-bottom-normal;
  .mx-search-bar-input{
    flex: 1;
    display: flex;
    align-items: center;
    .input{
      flex: 1;
      height: 31px;
      background-color: #fff;
      padding:3px 5px;
      border-radius: 5px;
      width: 100%;
      display: flex;
      align-items: center;
      i.mx-icon-search{
        color:#ddd;
        padding:0px 3px;
      }
      i.mx-icon-close-circle{
        font-size: 12px;
        padding:0px 2px;
        color:#ddd;
      }
      input{
        color:#999;
        flex:1;
        transition: all .3s ease;
        margin-right: 0;
      }
    }
  }

  .cancel{
    color: #108ee9;
    background: #ddd;
    right: 0px;
    top: 0px;
    display: flex;
    transform: translateX(100%);
    transition: all .3s ease;
    align-items: flex-start;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
    text-overflow: ellipsis;
    line-height:20px;
    height:20px;
    width: 0;
  }
}

.mx-search-bar.mx-search-bar-with-cancel {
  .cancel {
    transform: translateX(0);
    opacity: 1;
    transition: all .3s ease;
    padding: 0px 0px 0px 8px;
    overflow: auto;
  }

  .mx-search-bar-input{
    transition: all .3s ease;
  }
}

.mx-search-result{
  position: absolute;
  width: 100%;
  overflow: scroll;
  max-height: 120px;
  background: rgba(255,255,255,0.9);
}
