| Commitments and Contingencies - Leases (Details 2) - USD ($) $ in Thousands | 3 Months Ended | 6 Months Ended | ||
|---|---|---|---|---|
| Jun. 30, 2018 | Jun. 30, 2017 | Jun. 30, 2018 | Jun. 30, 2017 | |
| Commitments and Contingencies Disclosure [Abstract] | ||||
| 2018 (6 months) | $ 1,456 | $ 1,456 | ||
| 2019 | 3,604 | 3,604 | ||
| 2020 | 4,088 | 4,088 | ||
| 2021 | 4,152 | 4,152 | ||
| 2022 | 879 | 879 | ||
| Thereafter | 352 | 352 | ||
| Total minimum rental income | 14,531 | 14,531 | ||
| Operating Leases, Rent Expense, Sublease Rentals | $ 600 | $ 500 | $ 900 | $ 1,000 | 
| X | ||||||||||
| 
- Definition Operating Leases, Future Sublease Income Due No definition available. 
 | 
| X | ||||||||||
| 
- Definition Operating Leases, Future Sublease Income, Due Thereafter No definition available. 
 | 
| X | ||||||||||
| 
- Definition Operating Leases, Future Sublease Income, Due in Five Years No definition available. 
 | 
| X | ||||||||||
| 
- Definition Operating Leases, Future Sublease Income, Due in Four Years No definition available. 
 | 
| X | ||||||||||
| 
- Definition Operating Leases, Future Sublease Income, Due in Three Years No definition available. 
 | 
| X | ||||||||||
| 
- Definition Operating Leases, Future Sublease Income, Due in Two Years No definition available. 
 | 
| X | ||||||||||
| 
- Definition Operating Leases, Future Sublease Income, Remainder of Fiscal Year No definition available. 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- Definition The total amount of sublease rental income recognized during the period that reduces the entity's rent expense incurred under operating leases. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 |