@import '../../style/theme/index';

$search_bar-prefix-cls: #{$anna-prefix}-search_bar;

.#{$search_bar-prefix-cls} {
  display: flex;
  align-items: center;
  overflow: hidden; //防止取消按钮露出
  &-input{
    max-width: 100%; //防止input长度超出
    box-sizing: border-box;
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    height: 64px;
    border-radius: 64px;
    padding: 16px;
    background-color: $light-6;
    &-square{
      border-radius: 8px;
    }
    &-synthetic{
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
      display: flex;
      align-items: center;
      color: #999;
      &-icon{
        color: #666;
      }
      &-placeholder{
        padding-left: 10px;
        font-size: 28px;
      }
    }
    &-is_left{
      left: 16px;
      transform: translate(0, -50%);
    }
    &-value{
      flex: 1;
      padding: 0 10px 0 46px;
      background-color: transparent;
      color: #333;
      font-size: 28px;
      outline: none;  
      border: none;
    }
    &-clear{
      color: #CCC;
    }
  }
  &-action_button{
    padding-left: 20px;
    margin-right: -100px;
    font-size: 30px;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    cursor: pointer;
  }
  &-show_action_button{
    margin-right: 0;
  }
}

.#{$search_bar-prefix-cls}-large {
  .#{$search_bar-prefix-cls}-input {
    height: 72px;
    border-radius: 72px;
    &-synthetic{
      &-placeholder{
        font-size: 30px;
      }
    }
    &-value{
      font-size: 30px;
    }
  }
  .#{$search_bar-prefix-cls}-action_button {
    font-size: 32px;
  }
}

.#{$search_bar-prefix-cls}-small {
  .#{$search_bar-prefix-cls}-input {
    height: 56px;
    border-radius: 56px;
    &-synthetic{
      &-placeholder{
        font-size: 28px;
      }
    }
    &-value{
      font-size: 28px;
    }
  }
  .#{$search_bar-prefix-cls}-action_button {
    font-size: 30px;
  }
}