| Schedule II Valuation and Qualifying Accounts (Details) - USD ($) $ in Thousands | 12 Months Ended | ||
|---|---|---|---|
| Jun. 30, 2023 | Jun. 30, 2022 | Jun. 30, 2021 | |
| Allowance for Credit Losses | |||
| Movement in Valuation Allowances and Reserves | |||
| Balance at Beginning of Period | $ 20,631 | $ 18,036 | $ 11,822 | 
| Charged to Expense | 19,894 | 5,710 | 2,246 | 
| Deductions/ Adjustments | (6,893) | (3,115) | 3,968 | 
| Balance at End of Period | 33,632 | 20,631 | 18,036 | 
| Allowance for Deferred Tax Assets | |||
| Movement in Valuation Allowances and Reserves | |||
| Balance at Beginning of Period | 244,429 | 204,433 | 181,846 | 
| Charged to Expense | 0 | 8,096 | 2,650 | 
| Deductions/ Adjustments | 14,743 | 31,900 | 19,937 | 
| Balance at End of Period | $ 259,172 | $ 244,429 | $ 204,433 | 
| X | ||||||||||
| 
- Definition SEC Schedule, 12-09, Valuation Allowances And Reserves, Deductions/Adjustments No definition available. 
 | 
| X | ||||||||||
| 
- Definition A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period. No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount of valuation and qualifying accounts and reserves. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
 | 
| X | ||||||||||
| 
- Definition Amount of increase in valuation and qualifying accounts and reserves from charge to cost and expense. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 |