@import '../../style/themes/default';
@import '../../style/mixins/index';
@import '../../button/style/mixin';
@import './mixin';

@search-prefix: ~'@{yg-prefix}-input-search';

.@{search-prefix}.@{yg-prefix}-input-affix-wrapper .@{yg-prefix}-input:not(:last-child) {
  padding-right: 28px;
  width: calc(100% - 42px);
}
.@{search-prefix} {
  &-icon {
    color: @text-color-secondary;
    cursor: pointer;
    transition: all 0.3s;
    &:hover {
      color: fade(@black, 80%);
    }
  }

  &-enter-button {
    input {
      border-right: 0;
    }

    .@{yg-prefix}-input-group > .@{yg-prefix}-input:first-child, .@{yg-prefix}-input-group-addon:first-child {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
      width: ~'calc(100% - 55px)';
    }
    & + .@{yg-prefix}-input-group-addon,
    input + .@{yg-prefix}-input-group-addon {
      padding: 0;
      border: 0;
      .@{search-prefix}-button {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        padding: 0 10px;
      }
    }
  }
}
