STOCKHOLDERS' EQUITY - Schedule of Share Repurchases (Details) - USD ($) $ in Thousands |
3 Months Ended | 9 Months Ended | ||
|---|---|---|---|---|
May 31, 2026 |
May 31, 2025 |
May 31, 2026 |
May 31, 2025 |
|
| Equity [Abstract] | ||||
| Repurchases of common stock under the share repurchase program (in shares) | 926,370 | 184,050 | 2,056,220 | 425,239 |
| Repurchases of common stock under the share repurchase program | $ 203,070 | $ 80,696 | $ 506,000 | $ 193,838 |
| Repurchases of common stock to satisfy tax withholding requirements due upon vesting of stock-based awards (in shares) | 2,015 | 1,634 | 24,370 | 32,504 |
| Repurchases of common stock to satisfy tax withholding requirements due upon vesting of stock-based awards | $ 459 | $ 710 | $ 6,417 | $ 14,938 |
| Excise tax on share repurchases | $ 2,000 | $ 700 | $ 4,800 | $ 2,000 |
| X | ||||||||||
- Definition Amount of decrease to equity for grantee's tax withholding obligation for award under share-based payment arrangement. Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef
|
| X | ||||||||||
- References No definition available.
|
| X | ||||||||||
- Definition Amount of excise tax on share purchased under share repurchase plan. Includes, but is not limited to, repurchase of stock and unit of ownership. Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef
|
| X | ||||||||||
- Definition Number of shares used to settle grantee's tax withholding obligation for award under share-based payment arrangement. Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef
|
| X | ||||||||||
- Definition Number of shares that have been repurchased during the period and are being held in treasury. Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef
|
| X | ||||||||||
- Definition Equity impact of the cost of common and preferred stock that were repurchased during the period. Recorded using the cost method. Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef
|