@import './function';

.rui-textarea {
  min-height:32px;
  background:#fff;
  box-sizing: border-box;
  border:1px solid #dfdfdf;
  border-radius:6px 6px;
  margin:0;
  outline:none;
  resize:none;
  padding:8px;
  color:$text2;
  width:100%;
  height:100%;
  line-height:22px;
  transition : box-shadow .3s ease-out,left .3s ease-out,top .3s ease-out,opacity .3s ease-out,transform .3s ease-out,border-color .3s ease-out,border-width .3s ease-out,color .3s ease-out,width .3s ease-out,background-color .3s ease-out;

  &.disable {
    background:#ececec;
    cursor: not-allowed;
    &:hover {
      border-color:$border;
    }
  }

  &-container {
    position:relative;
    width:100%;
    height:100%;

    .rui-icon-resize {
      position: absolute;
      right: 1px;
      bottom: 6px;
      cursor: nesw-resize;
    }
  }

  .right {
    span {
      color: $text2;
    }
  }

  &-limittext {
    color:$primary;
    font-size:14px;
    font-weight:500;

    &.warning {
      color:$textWarning;
    }
  }

  &:hover {
    border:1px solid $primary;
  }

  &:focus {
    border:1px solid $primary;
    @include prefixer('box-shadow', 0 0 0 2px $primary_border);
  }
}