v3.25.2
Acquisitions and Divestitures - Additional Information (Details)
$ in Thousands
12 Months Ended
Apr. 30, 2025
USD ($)
Jan. 20, 2023
USD ($)
May 31, 2025
USD ($)
Segment
Entity
May 31, 2024
USD ($)
Entity
Segment
May 31, 2023
USD ($)
Business Acquisition [Line Items]          
Business Combination, Purchase price $ 487,400        
Number of business acquisition | Entity     6 2  
Number of reportable segments | Segment     4 4  
Acquisition-related costs     $ 11,300    
Proceeds from divestiture of businesses, net of cash disposed   $ 49,200      
Gain on divestiture         $ 24,700
Goodwill     1,617,626 $ 1,308,911 $ 1,293,588
Maximum          
Business Acquisition [Line Items]          
Acquisition aggregate consideration $ 106,900        
2025 Acquisitions          
Business Acquisition [Line Items]          
Goodwill     306,025    
Indefinite-lived trade names     95,804    
Other intangible assets     213,262    
2025 Acquisitions | Star Brands Group          
Business Acquisition [Line Items]          
Goodwill     229,800    
Indefinite-lived trade names     89,800    
Other intangible assets     179,600    
Business Acquisition, Goodwill, Expected Tax Deductible Amount     $ 35,700    
Clean Topco Limited          
Business Acquisition [Line Items]          
Percentage of the stocks acquired 100.00%