.InputWrapper {
  position: relative;

  &.has-counter {
    padding-bottom: 20px;

    & + .HelpText {
      margin-top: -20px;
    }
  }
}

.Input {
  display: block;
  box-sizing: border-box;
  width: $input-width;
  min-height: $input-min-height;
  margin: $input-margin;
  padding: $input-padding;
  border: $input-border;
  border-radius: $input-border-radius;
  font-family: $input-font-family;
  font-size: $input-font-size;
  line-height: $input-line-height;
  color: $input-color;
  background: $input-bg;
  resize: $input-resize;
  -webkit-tap-highlight-color: transparent;
  transition: 0.2s ease-in-out;
  -webkit-appearance: none;

  &:focus {
    outline: none;
    border-color: var(--brand-1);
  }

  &:focus:not([disabled]):not([readonly]) {
    & ~ .Input-line {
      &:before,
      &:after {
        width: 50%;
      }
    }
  }

  &::placeholder {
    color: var(--gray-4);
  }

  &--filled {
    border-color: transparent;
    background-color: var(--gray-6);
  }

  &--flushed {
    padding: 2px var(--gutter);
    border-width: 0 0 1px;
    border-radius: 0;
    background: none;

    &:focus {
      box-shadow: var(--brand-1) 0px 1px 0px 0px;
    }
  }
}

.Input-counter {
  // absolute has issues on iOS, causing input shifts in message lists
  position: relative;
  z-index: 1;
  float: right;
  margin-right: var(--gutter);
  color: var(--gray-3);
  font-size: $font-size-xs;
}
