| Derivative Instruments and Hedging Activities  - Schedule of Notional Amounts (Details) - USD ($) $ in Thousands | 12 Months Ended | |
|---|---|---|
| Jun. 30, 2017 | Jun. 30, 2016 | |
| Derivatives designated as hedging instruments | Purchase | Other foreign currency hedge contracts | ||
| Derivative | ||
| Derivative, notional amount | $ 165,563 | $ 122,275 | 
| Derivatives designated as hedging instruments | Purchase | Cash flow hedge contracts | ||
| Derivative | ||
| Derivative, notional amount | 19,305 | 7,591 | 
| Derivatives designated as hedging instruments | Sell | Other foreign currency hedge contracts | ||
| Derivative | ||
| Derivative, notional amount | 118,504 | 115,087 | 
| Derivatives designated as hedging instruments | Sell | Cash flow hedge contracts | ||
| Derivative | ||
| Derivative, notional amount | $ 128,672 | $ 91,793 | 
| Maximum | ||
| Derivative | ||
| Remaining maturity | 10 months | 7 months | 
| X | ||||||||||
| 
- Definition Aggregate notional amount specified by the derivative(s). Expressed as an absolute value. 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 | ||||||||||
| 
- Definition Period remaining until the derivative contract matures, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days. No definition available. 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 |