Income Taxes - Unrecognized Tax Benefits (Details) - USD ($) $ in Thousands |
12 Months Ended | ||
---|---|---|---|
Dec. 31, 2017 |
Dec. 31, 2016 |
Dec. 31, 2015 |
|
Income Tax Disclosure [Abstract] | |||
Balance at beginning of year | $ 13,505 | $ 24,010 | $ 7,275 |
Additions based on tax positions related to current year | 9,338 | 6,777 | 15,628 |
Additions for tax positions of prior years | 5,534 | 877 | 5,505 |
Reductions for tax positions of prior years | (18,159) | (4,398) | |
Balance at end of year | $ 28,377 | $ 13,505 | $ 24,010 |