Leases (Details 2) $ in Thousands  | 
6 Months Ended | 
|---|---|
| 
 Jun. 30, 2019  
USD ($) 
 | |
| Cash paid for amounts included in the measurement of lease liabilities: | |
| Operating cash outflows from operating leases | $ 18,537 | 
| Operating cash outflows from finance leases | 542 | 
| Financing cash outflows from finance leases | 1,193 | 
| Right-of-use assets obtained in exchange for lease obligations: | |
| Operating leases | 6,530 | 
| Finance leases | $ 423 | 
| X | ||||||||||
- References No definition available. 
  | 
| X | ||||||||||
- References No definition available. 
  | 
| X | ||||||||||
- Definition Amount of interest paid on finance lease liability. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
  | 
| X | ||||||||||
- Definition Amount of cash outflow for principal payment on finance lease. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
  | 
| X | ||||||||||
- Definition Amount of cash outflow from operating lease, excluding payments to bring another asset to condition and location necessary for its intended use. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
  | 
| X | ||||||||||
- Definition Amount of increase in right-of-use asset obtained in exchange for finance lease liability. Reference 1: http://www.xbrl.org/2003/role/exampleRef 
  | 
| X | ||||||||||
- Definition Amount of increase in right-of-use asset obtained in exchange for operating lease liability. Reference 1: http://www.xbrl.org/2003/role/exampleRef 
  |