Recent accounting pronouncements - Narrative (Details) - USD ($) $ in Thousands  | 
3 Months Ended | ||
|---|---|---|---|
Mar. 31, 2017  | 
Dec. 31, 2016  | 
Dec. 31, 2015  | 
|
| New Accounting Pronouncements or Change in Accounting Principle [Line Items] | |||
| Tax benefit | $ 26,861 | $ 16,046 | |
| Subsequent Event | Accounting Standards Update 2016-09 | Pro Forma | |||
| New Accounting Pronouncements or Change in Accounting Principle [Line Items] | |||
| Tax benefit | $ (2,100) | ||
| X | ||||||||||
- Definition Amount of current income tax expense (benefit) and deferred income tax expense (benefit) pertaining to continuing operations. 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 | ||||||||||
- Details 
  | 
| X | ||||||||||
- Details 
  | 
| X | ||||||||||
- Details 
  |