/*
 * Textarea component
 *
 * Base field styles (border, states, min-height) live in _input.scss on .pkt-input:is(textarea).
 * Wrapper label/helptext scale lives in _inputwrapper.scss (--small / --xsmall).
 * Counter stays in normal flow below the field for all sizes (see textarea.astro).
 */
@use 'sass:map';
@use '../abstracts/variables';
@use '../abstracts/mixins/typography';

:where(.pkt-textarea:has(textarea.pkt-input:not(.pkt-input--fullwidth):not([cols]))) {
  width: min(31rem, 100%);
}

.pkt-textarea:has(textarea.pkt-input--fullwidth) {
  width: 100%;
}

textarea.pkt-input {
  &:not(.pkt-input--fullwidth):not([cols]) {
    width: 100%;
  }

  &--small,
  &--xsmall {
    padding: map.get(variables.$spacing, 'size-8') map.get(variables.$spacing, 'size-16');
  }

  &--small {
    @include typography.get-text('pkt-txt-16-light');
  }

  &--xsmall {
    @include typography.get-text('pkt-txt-14-light');
  }
}
