@import './index.less';
@import './mixin.less';

@input-affix-margin: 4 * @hd;

.@{input-prefix-cls} {
  &-affix-wrapper {
    .input();
    display: inline-flex;

    &:not(&-disabled):hover {
      .hover();
      z-index: 1;
      .@{input-prefix-cls}-search-with-button & {
        z-index: 0;
      }
    }

    &-focused,
    &:focus {
      z-index: 1;
    }

    &-disabled {
      .@{input-prefix-cls}[disabled] {
        background: transparent;
      }
    }

    > input.@{input-prefix-cls} {
      padding: 0;
      border: none;
      outline: none;

      &:focus {
        box-shadow: none;
      }
    }

    &::before {
      width: 0;
      visibility: hidden;
      content: '\a0';
    }
  }

  &-prefix,
  &-suffix {
    display: flex;
    flex: none;
    align-items: center;
  }

  &-prefix {
    margin-right: @input-affix-margin;
  }

  &-suffix {
    margin-left: @input-affix-margin;
  }
}
