Income taxes - Schedule of Provision for Income Taxes (Details) - USD ($) $ in Thousands |
12 Months Ended | ||
|---|---|---|---|
Dec. 31, 2016 |
Dec. 31, 2015 |
Dec. 31, 2014 |
|
| Current tax provision (benefit): | |||
| U.S. federal | $ (131) | $ 383 | $ 6,105 |
| State | (792) | 1,201 | 2,136 |
| Foreign | 54,076 | 63,692 | 56,029 |
| Total current | 53,153 | 65,276 | 64,270 |
| Deferred tax provision (benefit): | |||
| U.S. federal | 62,672 | (29,962) | 12,434 |
| State | 2,306 | (484) | (753) |
| Foreign | 6,629 | 4,716 | 3,091 |
| Total deferred | 71,607 | (25,730) | 14,772 |
| Provision for income taxes | $ 124,760 | $ 39,546 | $ 79,042 |