/**Variable**/

.vhb-textarea {
  position: relative;
  display: inline-block;
  &:not(.def--cols) {
    width: 100%;
    .vhb-textarea--inner {
      width: 100%;
    }
  }
}

.vhb-textarea--inner {
  border-radius: $vhb-border-radius;
  outline: 0;
  font-size: inherit;
  padding: 0 0.6em;
  color: $vhb-font-color;
  line-height: inherit;
  border: 1px solid $vhb-input-border-color;
  background-color: $vhb-textarea-background-color;
  display: block;
  padding: 0.3em 0.6em;
  &::placeholder {
    color: $vhb-input-placeholder-color;
  }
  &:focus {
    border: 1px solid $vhb-primary-color;
  }
  &[disabled] {
    cursor: not-allowed;
    background-color: $vhb-input-disabled-background-color;
  }
}

.vhb-textarea--inner,
.vhb-textarea--autosize {
  line-height: $vhb-textarea-line-height;
  color: $vhb-font-color;
  font-family: $vhb-font-family;
}

.vhb-textarea--autosize {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 0.3em 0.6em;
  word-wrap: break-word;
  white-space: pre-wrap;
  z-index: -1;
  visibility: hidden;
}

.vhb-textarea--count {
  position: absolute;
  bottom: 0.2em;
  right: 1.4em;
  padding-left: 0.2em;
  color: $vhb-textarea-count-color;
  background-color: $vhb-textarea-count-background-color;
  &.is--error {
    color: $vhb-textarea-count-error-color;
  }
}

.vhb-textarea,
.vhb-textarea--autosize {
  font-size: $vhb-font-size;
  &.size--medium {
    font-size: $vhb-font-size-medium;
  }
  &.size--small {
    font-size: $vhb-font-size-small;
  }
  &.size--mini {
    font-size: $vhb-font-size-mini;
  }
}

.vhb-textarea {
  &:not(.is--autosize) {
    min-height: $vhb-input-height-default;
  }
  &.size--medium {
    font-size: $vhb-font-size-medium;
    &:not(.is--autosize) {
      min-height: $vhb-input-height-medium;
    }
  }
  &.size--small {
    &:not(.is--autosize) {
      min-height: $vhb-input-height-small;
    }
  }
  &.size--mini {
    &:not(.is--autosize) {
      min-height: $vhb-input-height-mini;
    }
  }
}