Stock-Based Compensation and Incentive Performance Plans - Schedule of Compensation Cost And Related Income Tax Benefits Recognized (Details) - USD ($) $ in Thousands |
12 Months Ended | ||
|---|---|---|---|
Jun. 30, 2024 |
Jun. 30, 2023 |
Jun. 30, 2022 |
|
| Share-based Payment Arrangement, Expensed and Capitalized, Amount [Line Items] | |||
| Related income tax benefit | $ 1,409 | $ 1,734 | $ 1,574 |
| Selling, general and administrative expense | |||
| Share-based Payment Arrangement, Expensed and Capitalized, Amount [Line Items] | |||
| Stock-based compensation expense | $ 12,704 | $ 14,423 | $ 15,611 |