INCOME TAXES - Schedule of Changes in the Balance of Gross Unrecognized Tax Benefits (Details) - USD ($) $ in Thousands |
12 Months Ended | |
|---|---|---|
Jun. 30, 2025 |
Jun. 30, 2024 |
|
| Reconciliation of Unrecognized Tax Benefits, Excluding Amounts Pertaining to Examined Tax Returns [Roll Forward] | ||
| Unrecognized tax benefits as of beginning of the period | $ 180,365 | $ 178,728 |
| Increases on account of current year positions | 0 | 4,074 |
| Increases on account of prior year positions | 8,024 | 16,558 |
| Decreases on account of prior year positions | (2,612) | (3,338) |
| Decreases due to settlements with tax authorities | (9,569) | (11,497) |
| Decreases due to lapses of statutes of limitations | (36,417) | (4,160) |
| Unrecognized tax benefits as of end of the period | $ 139,791 | $ 180,365 |
| 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 unrecognized tax benefits. Reference 1: http://www.xbrl.org/2003/role/exampleRef
|
| X | ||||||||||
- Definition Amount of decrease in unrecognized tax benefits resulting from tax positions taken in prior period tax returns. Reference 1: http://www.xbrl.org/2003/role/exampleRef
|
| X | ||||||||||
- Definition Amount of decrease in unrecognized tax benefits resulting from settlements with taxing authorities. Reference 1: http://www.xbrl.org/2003/role/exampleRef
|
| X | ||||||||||
- Definition Amount of increase in unrecognized tax benefits resulting from tax positions that have been or will be taken in current period tax return. Reference 1: http://www.xbrl.org/2003/role/exampleRef
|
| X | ||||||||||
- Definition Amount of increase in unrecognized tax benefits resulting from tax positions taken in prior period tax returns. Reference 1: http://www.xbrl.org/2003/role/exampleRef
|
| X | ||||||||||
- Definition Amount of decrease in unrecognized tax benefits resulting from lapses of applicable statutes of limitations. Reference 1: http://www.xbrl.org/2003/role/disclosureRef
|