| Equity and Long-Term Incentive Compensation Plans  - Share-based Compensation Expense (Details) - USD ($) $ in Thousands | 12 Months Ended | ||
|---|---|---|---|
| Jun. 30, 2017 | Jun. 30, 2016 | Jun. 30, 2015 | |
| Stock-based compensation expense | |||
| Stock-based compensation expense | $ 50,943 | $ 45,050 | $ 55,302 | 
| Employee services share-based compensation, tax benefit realized | 6,600 | ||
| Stock-based compensation capitalized as inventory | 2,820 | 2,685 | |
| Costs of revenues | |||
| Stock-based compensation expense | |||
| Stock-based compensation expense | 5,338 | 4,689 | 7,242 | 
| Research and development | |||
| Stock-based compensation expense | |||
| Stock-based compensation expense | 8,089 | 8,618 | 12,259 | 
| Selling, general and administrative | |||
| Stock-based compensation expense | |||
| Stock-based compensation expense | $ 37,516 | $ 31,743 | $ 35,801 | 
| X | ||||||||||
| 
- Definition Effective Income Tax Rate Reconciliation, Share-based Compensation, Excess Tax Benefit, Amount No definition available. 
 | 
| X | ||||||||||
| 
- Definition Stock Based Compensation Capitalized as Inventory No definition available. 
 | 
| X | ||||||||||
| 
- Definition Represents the expense recognized during the period arising from equity-based compensation arrangements (for example, shares of stock, unit, stock options or other equity instruments) with employees, directors and certain consultants qualifying for treatment as employees. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. No definition available. 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 |