INCOME TAXES - Unrecognized Tax Benefits Roll Forward (Details) - USD ($) $ in Thousands |
12 Months Ended | ||
|---|---|---|---|
Jun. 30, 2020 |
Jun. 30, 2019 |
Jun. 30, 2018 |
|
| Reconciliation of Unrecognized Tax Benefits, Excluding Amounts Pertaining to Examined Tax Returns [Roll Forward] | |||
| Unrecognized benefit—beginning of year | $ 30,850 | $ 29,144 | $ 27,438 |
| Gross increases—current year tax positions | 4,169 | 3,852 | 4,762 |
| Gross decreases—prior year tax positions due to statute lapse | (3,669) | (2,146) | (3,056) |
| Unrecognized benefit—end of year | $ 31,350 | $ 30,850 | $ 29,144 |