INCOME TAXES - Reconciliation of Gross Unrecognized Tax Benefits (Details) - USD ($) $ in Thousands |
12 Months Ended | ||
|---|---|---|---|
Jun. 30, 2026 |
Jun. 30, 2025 |
Jun. 30, 2024 |
|
| Reconciliation of Unrecognized Tax Benefits, Excluding Amounts Pertaining to Examined Tax Returns | |||
| Unrecognized tax benefits at the beginning of the year | $ 258,604 | $ 245,707 | $ 213,092 |
| Increases for tax positions taken in current year | 38,538 | 35,429 | 40,209 |
| Increases for tax positions taken in prior years | 10,685 | 10,862 | 23,291 |
| Increases (decreases) for settlements with taxing authorities | 1,808 | (4,687) | 0 |
| Decreases for tax positions taken in prior years | (31,840) | (11,607) | (26,766) |
| Decreases for lapsing of statutes of limitations | (20,028) | (17,100) | (4,119) |
| Unrecognized tax benefits at the end of the year | $ 257,767 | $ 258,604 | $ 245,707 |