@import '../../scss/styles.scss';

@layer payload-default {
  .field-type.textarea {
    position: relative;
    display: flex;
    flex-direction: column;

    textarea {
      @include formInput();
      field-sizing: content;
      overflow-y: auto;
      resize: vertical;
      min-height: base(3);
      height: 100%;
      display: flex;
    }

    &.read-only {
      .textarea-outer {
        @include readOnly;
      }
    }

  }

  html[data-theme='light'] {
    .field-type.textarea {
      &.error {
        textarea {
          @include lightInputError;
        }
      }
    }
  }

  html[data-theme='dark'] {
    .field-type.textarea {
      &.error {
        textarea {
          @include darkInputError;
        }
      }
    }
  }
}
