INCOME TAXES - Schedule of Changes in the Balance of Gross Unrecognized Tax Benefits (Details) - USD ($) $ in Thousands |
12 Months Ended | |
|---|---|---|
Jun. 30, 2026 |
Jun. 30, 2025 |
|
| Reconciliation of Unrecognized Tax Benefits, Excluding Amounts Pertaining to Examined Tax Returns [Roll Forward] | ||
| Unrecognized tax benefits as of beginning of the period | $ 139,791 | $ 180,365 |
| Increases on account of current year positions | 2,607 | 0 |
| Increases on account of prior year positions | 5,609 | 8,024 |
| Decreases on account of prior year positions | (3,609) | (2,612) |
| Decreases due to settlements with tax authorities | (3,502) | (9,569) |
| Decreases due to lapses of statutes of limitations | (19,560) | (36,417) |
| Unrecognized tax benefits as of end of the period | $ 121,336 | $ 139,791 |
| 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
|