.rds-textarea-container {
  display: flex;
  flex-direction: column;
  gap: var(--rds-textarea-stack-gap, 3px);
  margin-bottom: var(--rds-spacing-md, 16px);

  .textarea-label {
  font-family: var(--rds-font-family-base);
  font-size: var(--rds-font-size-md, 14px);

    .required-asterisk {
      color: var(--rds-error-main);
      font-weight: 600;
    }
  }

  .textarea-wrapper {
    position: relative;

    &.textarea-pill-wrapper {
      border-radius: var(--rds-border-radius-pill, var(--rds-border-radius-full, 9999px));
      border: 1px solid var(--rds-border-default);
      overflow: hidden;
      background-color: var(--rds-background-paper);
      transition: border-color var(--rds-transition-base, 0.2s) ease-in-out;

      &.textarea-active {
        border-color: var(--rds-primary-main);
      }

      &.textarea-selected {
        border-color: var(--rds-border-selected);
      }

      &.textarea-disabled {
        background-color: var(--rds-background-disabled);
        border-color: var(--rds-border-disabled);
      }

      &.textarea-error {
        border-color: var(--rds-error-main);
      }

      .rds-textarea.textarea-pill {
        border: none;
        border-radius: 0;
        background-color: transparent;
        resize: none;

        &.textarea-disabled {
          background-color: transparent;
        }
      }
    }
  }

 .rds-textarea {
  width: 100%;
  min-height: var(--rds-textarea-min-height, 120px);
  padding: var(--rds-spacing-sm, 6px) var(--rds-spacing-md, 8px);
  font-size: var(--rds-font-size-md, 14px);
  font-family: var(--rds-font-family-base);
  line-height: 1.5;
  border: 1px solid var(--rds-border-default);
  outline: none;
  resize: vertical;
  transition: all var(--rds-transition-base, 0.2s) ease-in-out;
  background-color: var(--rds-background-paper);

    &::placeholder {
      color: var(--rds-text-secondary);
      font-weight: 400;
    }

    &:focus {
      outline: none;
    }

    &.textarea-style-default {
      border-radius: var(--rds-border-radius-md, 4px);
    }

    &.textarea-pill {
      border-radius: var(--rds-border-radius-pill, var(--rds-border-radius-full, 9999px));
      padding: var(--rds-spacing-lg, 24px);
      box-sizing: border-box;
    }

    &.textarea-bottom-outline {
      border-radius: var(--rds-border-radius-md, 4px);
      border-bottom: var(--rds-textarea-bottom-border-width, 2px) solid var(--rds-border-default) !important;
      padding: var(--rds-spacing-sm, 6px) var(--rds-spacing-md, 8px);
      background-color: var(--rds-background-paper);
    }

    &.textarea-default {
      border-color: var(--rds-border-default);
    }

    &.textarea-active {
      border-color: var(--rds-primary-main);

      &.textarea-bottom-outline {
        border-bottom: var(--rds-textarea-bottom-border-width-active, 3px) solid var(--rds-primary-main) !important;
      }
    }

    &.textarea-selected {
      border-color: var(--rds-border-selected);

      &.textarea-bottom-outline {
        border-bottom: var(--rds-textarea-bottom-border-width-active, 3px) solid var(--rds-border-selected) !important;
      }
    }

    &.textarea-disabled {
      background-color: var(--rds-background-disabled);
      border-color: var(--rds-border-disabled);
      color: var(--rds-text-disabled);
      cursor: not-allowed;
      
      &::placeholder {
        color: var(--rds-text-disabled);
      }

      &.textarea-bottom-outline {
        background-color: var(--rds-background-disabled) !important;
        border-bottom: var(--rds-textarea-bottom-border-width-active, 3px) solid var(--rds-border-disabled) !important;
      }
    }

    &.textarea-error {
      border-color: var(--rds-error-main);

      &.textarea-bottom-outline {
        border-bottom: var(--rds-textarea-bottom-border-width-active, 3px) solid var(--rds-error-main) !important;
      }
    }
  }

  .error-message {
    font-size: var(--rds-font-size-sm, 13px);
    color: var(--rds-error-main);
    font-family: var(--rds-font-family-base);
    font-weight: 400;
  }
}
[data-theme="dark"] {
  .rds-textarea {
    background-color: var(--rds-background-paper);
    color: var(--rds-text-primary);

    &::placeholder {
      color: var(--rds-text-secondary);
    }

    &.textarea-bottom-outline {
      background-color: var(--rds-background-paper) !important;
      color: var(--rds-text-primary) !important;
      border-bottom: var(--rds-textarea-bottom-border-width-active, 3px) solid var(--rds-primary-main) !important;
    }

    &.textarea-active {
      border-color: var(--rds-primary-main);

      &.textarea-bottom-outline {
        border-bottom: var(--rds-textarea-bottom-border-width-active, 3px) solid var(--rds-primary-main) !important;
      }
    }

    &.textarea-selected {
      border-color: var(--rds-border-selected);

      &.textarea-bottom-outline {
        border-bottom: var(--rds-textarea-bottom-border-width-active, 3px) solid var(--rds-border-selected) !important;
      }
    }

    &.textarea-disabled {
      background-color: var(--rds-background-disabled);
      border-color: var(--rds-border-disabled);
      color: var(--rds-text-disabled);

      &::placeholder {
        color: var(--rds-text-disabled);
      }

      &.textarea-bottom-outline {
        background-color: var(--rds-background-disabled) !important;
        border-bottom: var(--rds-textarea-bottom-border-width-active, 3px) solid var(--rds-border-disabled) !important;
      }
    }

    &.textarea-error {
      border-color: var(--rds-error-main);

      &.textarea-bottom-outline {
        border-bottom: var(--rds-textarea-bottom-border-width-active, 3px) solid var(--rds-error-main) !important;
      }
    }
  }
}
