Summary of Supplemental Cash Flow, Balance Sheet, and Other Required Disclosures (Details) - USD ($) $ in Thousands |
12 Months Ended | |
|---|---|---|
May 31, 2024 |
May 31, 2023 |
|
| Leases [Abstract] | ||
| Operating cash outflows from operating leases | $ 81,540 | $ 74,251 |
| Leased assets obtained in exchange for operating lease obligations | 69,749 | 90,399 |
| Current portion of operating leases within other accrued liabilities | $ 66,298 | $ 59,590 |
| Operating Lease, Liability, Current, Statement of Financial Position [Extensible List] | Other accrued liabilities | Other accrued liabilities |
| Weighted average remaining lease term for operating leases (in years) | 7 years 8 months 12 days | 8 years 6 months |
| Weighted average discount rate for operating leases | 4.20% | 3.90% |