| Equity, Long-Term Incentive Compensation Plans and Non-controlling Interest  - Share-based Compensation Expense (Details) - USD ($) $ in Thousands | 3 Months Ended | ||
|---|---|---|---|
| Sep. 30, 2019 | Sep. 30, 2018 | Jun. 30, 2019 | |
| Stock-based compensation expense | |||
| Stock-based compensation expense | $ 26,944 | $ 16,138 | |
| Stock-based compensation capitalized as inventory | 4,909 | $ 4,819 | |
| Costs of revenues | |||
| Stock-based compensation expense | |||
| Stock-based compensation expense | 2,864 | 1,831 | |
| Research and development | |||
| Stock-based compensation expense | |||
| Stock-based compensation expense | 5,287 | 2,519 | |
| Selling, general and administrative | |||
| Stock-based compensation expense | |||
| Stock-based compensation expense | $ 18,793 | $ 11,788 | |
| X | ||||||||||
| 
- Definition Stock Based Compensation Capitalized as Inventory No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount of expense for award under share-based payment arrangement. Excludes amount capitalized. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| 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 
 |