Goodwill and Intangible Assets, Net of Accumulated Amortization (Tables)  | 
12 Months Ended | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
May 31, 2022  | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Goodwill and Intangible Assets Disclosure [Abstract] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Change in Goodwill | 
 Goodwill and changes in goodwill as of and for the years ended May 31, 2022 and May 31, 2021 were as follows: 
 
  | 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Components of Intangible Assets, at Cost | 
 The Company had certain intangible assets on its Consolidated Balance Sheets. The components of intangible assets, at cost, consisted of the following: 
 
  | 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Estimated Amortization Expense | 
 The estimated amortization expense for the next five fiscal years relating to intangible asset balances is as follows: 
 
  | 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||