Stock-Based Compensation - Additional Information (Details) - USD ($) $ in Millions |
3 Months Ended | 6 Months Ended | ||
|---|---|---|---|---|
Dec. 31, 2023 |
Dec. 31, 2022 |
Dec. 31, 2023 |
Dec. 31, 2022 |
|
| Share-Based Payment Arrangement [Abstract] | ||||
| Stock-based compensation expense | $ 20.5 | $ 20.9 | $ 36.9 | $ 36.5 |
| Related tax benefits | 4.2 | $ 4.8 | 7.0 | $ 8.3 |
| Unrecognized compensation cost related to non-vested stock options | 12.2 | 12.2 | ||
| Unrecognized compensation cost related to restricted stock unit awards | $ 80.3 | $ 80.3 | ||
| Amortization period of unrecognized compensation cost for non-vested stock options | 1 year 10 months 24 days | |||
| Amortization period of unrecognized compensation cost for restricted stock awards | 2 years | |||