max-height property. By default, it is set to 0. When opened, JavaScript calculates the scrollHeight of the inner content and applies it as an inline style. This allows CSS transitions to animate smoothly from 0 to the specific height of the content.