
:root {
    --textarea-autogrow-min-height: 44px;
    --textarea-autogrow-max-height: 176px;
}

textarea {
    resize: none;
    max-width: 100%;
    min-height: var(--textarea-autogrow-min-height);
    max-height: var(--textarea-autogrow-max-height);
    overflow-wrap: break-word;
    word-break: break-word;
}

textarea:hover:not(:disabled):not(:read-only) {
    border-color: var(--border-strong, #94a3b8);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 3px var(--textarea-focus-ring-color, rgba(59, 130, 246, 0.15));
}

textarea:disabled {
    cursor: not-allowed;
    opacity: 1;
    color: var(--text-muted, #94a3b8);
    background-color: var(--bg-secondary, #f6f8fb);
}

textarea:read-only:not(:disabled) {
    cursor: default;
    background-color: var(--bg-secondary, #f6f8fb);
}

textarea.is-invalid {
    border-color: var(--danger-color, #ef4444);
}

textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px var(--textarea-error-focus-ring-color, rgba(239, 68, 68, 0.15));
}
