| Derivative Instruments and Hedging Activities (Tables)
 | 6 Months Ended | 
| Dec. 31, 2015 | 
|---|
| Derivative Instruments and Hedging Activities Disclosure [Abstract] |  | 
| Schedule of Derivative Instruments, Location, Designated and Non-Designated, Gains (Losses) | 
The locations and amounts of designated and non-designated derivative instruments’ gains and losses reported in the condensed consolidated financial statements for the indicated periods were as follows: 
|  |  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|   |   | Three months endedDecember 31,
 |   | Six months endedDecember 31,
 |  
| (In thousands) | Location in Financial Statements | 2015 |   | 2014 |   | 2015 |   | 2014 |  
| Derivatives Designated as Hedging Instruments |   |   |   |   |   |   |   |   |  
| Gains (losses) in accumulated OCI on derivatives (effective portion) | Accumulated OCI | $ | 707 | 
 |   | $ | 11,924 | 
 |   | $ | (1,154 | ) |   | $ | 13,957 | 
 |  
| 
Gains (losses) reclassified from accumulated OCI into income (effective portion):
 | Revenues | $ | 324 | 
 |   | $ | 1,933 | 
 |   | $ | 1,009 | 
 |   | $ | 2,202 | 
 |  
|   | Costs of revenues | (678 | ) |   | (475 | ) |   | (1,150 | ) |   | (516 | ) |  
|   | Interest expense | 189 | 
 |   | 126 | 
 |   | 378 | 
 |   | 126 | 
 |  
|   | Net gains reclassified from accumulated OCI into income (effective portion) | $ | (165 | ) |   | $ | 1,584 | 
 |   | $ | 237 | 
 |   | $ | 1,812 | 
 |  
| 
Gains (losses) recognized in income on derivatives (ineffective portion and amount excluded from effectiveness testing)
 | Other expense (income), net | $ | (273 | ) |   | $ | 77 | 
 |   | $ | (399 | ) |   | $ | 120 | 
 |  
| Derivatives Not Designated as Hedging Instruments |   |   |   |   |   |   |   |   |  
| 
Gains (losses) recognized in income
 | Other expense (income), net | $ | 747 | 
 |   | $ | 7,187 | 
 |   | $ | (5,635 | ) |   | $ | 11,112 | 
 |  
|   | Loss on extinguishment of debt and other, net | $ | — | 
 |   | $ | 1,180 | 
 |   | $ | — | 
 |   | $ | 1,180 | 
 |  | 
| Schedule of Notional Amounts of Derivatives Outstanding | 
The U.S. dollar equivalent of all outstanding notional amounts of hedge contracts, with maximum maturity of approximately 10 months, as of the dates indicated below was as follows:
 
|  |  
|  |  |  |  |  |  |  |  |  
| (In thousands) | As of December 31, 2015
 |   | As of June 30, 2015
 |  
| Cash flow hedge contracts |   |   |   |  
| Purchase | $ | 12,163 | 
 |   | $ | 32,775 | 
 |  
| Sell | $ | 88,569 | 
 |   | $ | 88,800 | 
 |  
| Other foreign currency hedge contracts |   |   |   |  
| Purchase | $ | 93,310 | 
 |   | $ | 64,012 | 
 |  
| Sell | $ | 151,330 | 
 |   | $ | 123,091 | 
 |  | 
| Schedule of Derivative Instruments, Fair Value | 
The locations and fair value amounts of the Company’s derivative instruments reported in its Condensed Consolidated Balance Sheets as of the dates indicated below were as follows:  
 
|  |  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|   | Asset Derivatives |   | Liability Derivatives |  
|   | Balance Sheet Location |   | As of December 31, 2015
 |   | As of June 30, 2015
 |   | Balance Sheet Location |   | As of December 31, 2015
 |   | As of June 30, 2015
 |  
| (In thousands) |   | Fair Value |   |   | Fair Value |  
| Derivatives designated as hedging instruments |   |   |   |   |   |   |   |   |   |   |   |  
| Foreign exchange contracts | Other current assets |   | $ | 511 | 
 |   | $ | 1,722 | 
 |   | Other current liabilities |   | $ | 1,009 | 
 |   | $ | 1,920 | 
 |  
| Total derivatives designated as hedging instruments |   |   | $ | 511 | 
 |   | $ | 1,722 | 
 |   |   |   | $ | 1,009 | 
 |   | $ | 1,920 | 
 |  
| Derivatives not designated as hedging instruments |   |   |   |   |   |   |   |   |   |   |   |  
| Foreign exchange contracts | Other current assets |   | $ | 517 | 
 |   | $ | 1,342 | 
 |   | Other current liabilities |   | $ | 3,083 | 
 |   | $ | 1,186 | 
 |  
| Total derivatives not designated as hedging instruments |   |   | $ | 517 | 
 |   | $ | 1,342 | 
 |   |   |   | $ | 3,083 | 
 |   | $ | 1,186 | 
 |  
| Total derivatives |   |   | $ | 1,028 | 
 |   | $ | 3,064 | 
 |   |   |   | $ | 4,092 | 
 |   | $ | 3,106 | 
 |  | 
| Balances and Changes in Accumulated Other Comprehensive Income Related to Derivative Instruments | 
The following table provides the balances and changes in accumulated OCI, before taxes, related to derivative instruments for the indicated periods: 
|  |  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|   | Three months endedDecember 31,
 |   | Six months endedDecember 31,
 |  
| (In thousands) | 2015 |   | 2014 |   | 2015 |   | 2014 |  
| Beginning balance | $ | 4,847 | 
 |   | $ | 1,785 | 
 |   | $ | 7,110 | 
 |   | $ | (20 | ) |  
| Amount reclassified to income | 165 | 
 |   | (1,584 | ) |   | (237 | ) |   | (1,812 | ) |  
| Net change in unrealized gains or losses | 707 | 
 |   | 11,924 | 
 |   | (1,154 | ) |   | 13,957 | 
 |  
| Ending balance | $ | 5,719 | 
 |   | $ | 12,125 | 
 |   | $ | 5,719 | 
 |   | $ | 12,125 | 
 |  | 
| Offsetting of Assets and Liabilities | 
As of December 31, 2015 and June 30, 2015, information related to the offsetting arrangements was as follows (in thousands):
 
|  |  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
| As of December 31, 2015 |   |   |   |   |   | Gross Amounts of Derivatives Not Offset in the Condensed Consolidated Balance Sheets |   |   |  
| Description |   | Gross Amounts of Derivatives |   | Gross Amounts of Derivatives Offset in the Condensed Consolidated Balance Sheets |   | Net Amount of Derivatives Presented in the Condensed Consolidated Balance Sheets |   | Financial Instruments |   | Cash Collateral Received |   | Net Amount |  
| Derivatives - Assets |   | $ | 1,028 | 
 |   | $ | — | 
 |   | $ | 1,028 | 
 |   | $ | (1,028 | ) |   | $ | — | 
 |   | $ | — | 
 |  
| Derivatives - Liabilities |   | $ | (4,092 | ) |   | $ | — | 
 |   | $ | (4,092 | ) |   | $ | 1,028 | 
 |   | $ | — | 
 |   | $ | (3,064 | ) | 
|  |  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
| As of June 30, 2015 |   |   |   |   |   | Gross Amounts of Derivatives Not Offset in the Condensed Consolidated Balance Sheets |   |   |  
| Description |   | Gross Amounts of Derivatives |   | Gross Amounts of Derivatives Offset in the Condensed Consolidated Balance Sheets |   | Net Amount of Derivatives Presented in the Condensed Consolidated Balance Sheets |   | Financial Instruments |   | Cash Collateral Received |   | Net Amount |  
| Derivatives - Assets |   | $ | 3,064 | 
 |   | $ | — | 
 |   | $ | 3,064 | 
 |   | $ | (2,809 | ) |   | $ | — | 
 |   | $ | 255 | 
 |  
| Derivatives - Liabilities |   | $ | (3,106 | ) |   | $ | — | 
 |   | $ | (3,106 | ) |   | $ | 2,809 | 
 |   | $ | — | 
 |   | $ | (297 | ) |  |