In _format_content there is the possibility that the width value evaluates to a negative value which will throw a ValueError: Sign not allowed in string format specifier. Adding a minimum 0 value ensures that only positive values are used during string formatting.
In calculate_content_width the returned value can result in a value less than 1 which causes issues. Ensuring a value of 1 or greater solves this.
In _format_content there is the possibility that the width value evaluates to a negative value which will throw a ValueError: Sign not allowed in string format specifier. Adding a minimum 0 value ensures that only positive values are used during string formatting.
In calculate_content_width the returned value can result in a value less than 1 which causes issues. Ensuring a value of 1 or greater solves this.