LEASES - Supplemental Cash Flow Information Related to Leases (Details) - USD ($) $ in Thousands  | 
12 Months Ended | |
|---|---|---|
Jun. 30, 2022  | 
Jun. 30, 2021  | 
|
| Leases [Abstract] | ||
| Operating cash outflows from operating leases | $ 37,994 | $ 38,118 | 
| ROU assets obtained in exchange for new operating lease liabilities | $ 55,886 | $ 39,292 | 
| X | ||||||||||
- References No definition available. 
  | 
| X | ||||||||||
- Definition Amount of cash outflow from operating lease, excluding payments to bring another asset to condition and location necessary for its intended use. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
  | 
| X | ||||||||||
- Definition Amount of increase in right-of-use asset obtained in exchange for operating lease liability. Reference 1: http://www.xbrl.org/2003/role/exampleRef 
  |