STOCKHOLDERS' EQUITY - Schedule of Other Comprehensive Income (Loss) and Accumulated Other Comprehensive Loss (Details) - USD ($) $ in Thousands |
3 Months Ended | 9 Months Ended | 12 Months Ended | ||
|---|---|---|---|---|---|
May 31, 2026 |
May 31, 2025 |
May 31, 2026 |
May 31, 2025 |
Aug. 31, 2025 |
|
| Amount | |||||
| Beginning balance | $ 1,333,039 | $ 1,172,586 | $ 1,247,372 | $ 1,122,965 | $ 1,122,965 |
| Ending balance | 1,392,408 | 1,214,193 | 1,392,408 | 1,214,193 | 1,247,372 |
| Accumulated Other Comprehensive Loss | |||||
| Amount | |||||
| Beginning balance | (123,496) | (160,640) | (161,439) | (164,590) | (164,590) |
| Ending balance | (109,267) | (158,870) | (109,267) | (158,870) | (161,439) |
| Foreign currency translation adjustments | |||||
| Amount | |||||
| Other comprehensive income, before reclassification | 14,316 | 2,048 | 48,708 | 6,540 | 3,879 |
| Defined benefit pension plans | |||||
| Amount | |||||
| Other comprehensive income, before reclassification | 52 | 49 | 144 | 176 | 275 |
| Derivative instruments | |||||
| Amount | |||||
| Other comprehensive income, before reclassification | $ (139) | $ (327) | $ 3,320 | $ (996) | (1,274) |
| Amounts reclassified from accumulated other comprehensive loss | |||||
| Amount | |||||
| Amounts reclassified from accumulated other comprehensive loss | $ 271 | ||||