| Financial Statement Components  - Consolidated Statements of Operations (Details) - USD ($) $ in Thousands | 12 Months Ended | ||
|---|---|---|---|
| Jun. 30, 2017 | Jun. 30, 2016 | Jun. 30, 2015 | |
| Other expense (income), net: | |||
| Interest income | $ (23,270) | $ (14,507) | $ (12,545) | 
| Foreign exchange losses, net | 641 | 1,235 | 1,764 | 
| Net realized gains on sale of investments | (191) | (311) | (2,119) | 
| Other | 3,359 | (7,051) | 2,431 | 
| Other expense (income), net | $ (19,461) | $ (20,634) | $ (10,469) | 
| X | ||||||||||
| 
- Definition Other Expense (Income), Net No definition available. 
 | 
| X | ||||||||||
| 
- Definition This item represents the difference between the gross realized gains and losses realized on the sale of debt or equity securities categorized neither as held-to-maturity nor trading securities. Additionally, this item would include any losses recognized for other than temporary impairments (OTTI) of the subject investments in debt and equity securities. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- Definition Amount before tax of foreign currency transaction realized and unrealized gain (loss) recognized in the income statement. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- Definition Amount before accretion (amortization) of purchase discount (premium) of interest income on nonoperating securities. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount of income (expense) related to nonoperating activities, classified as other. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 |