Debt - Credit Facility - Additional Information (Details) - USD ($) | Apr. 21, 2017 | Jun. 08, 2012 | Jun. 30, 2018 | Aug. 10, 2018 | Jul. 02, 2018 | Dec. 31, 2017 | Jul. 16, 2013 |
Line of Credit Facility [Line Items] | | | | | | | |
Long term debt outstanding | | | $ 150,007,000 | | | $ 145,959,000 | |
1.50% Cash Convertible Senior Notes Due 2018 | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Debt instrument, face amount | | | | | | | $ 150,000,000 |
Maturity date | | | Jul. 2, 2018 | | | | |
Revolving Credit Facility | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Total availability under the revolving credit facility | | | $ 93,700,000 | | | | |
Prior Credit Agreement | Revolving Credit Facility | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Initiation date | | | Jun. 8, 2012 | | | | |
Maximum borrowing capacity | | $ 125,000,000 | | | | | |
Prior Credit Agreement | Revolving Credit Facility | Minimum | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Unused commitment fee percentage | | 0.30% | | | | | |
Prior Credit Agreement | Revolving Credit Facility | Maximum | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Unused commitment fee percentage | | 0.50% | | | | | |
Prior Credit Agreement | Revolving Credit Facility | LIBOR | Minimum | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Variable rate basis | | 0.00% | | | | | |
Margin rate | | 1.75% | | | | | |
Prior Credit Agreement | Revolving Credit Facility | LIBOR | Maximum | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Margin rate | | 3.00% | | | | | |
Prior Credit Agreement | Revolving Credit Facility | Federal Funds Rate | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Basis spread on variable rate | | 0.50% | | | | | |
Prior Credit Agreement | Revolving Credit Facility | One-Month LIBOR | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Basis spread on variable rate | | 1.00% | | | | | |
Prior Credit Agreement | Revolving Credit Facility | Base Rate | Minimum | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Margin rate | | 0.75% | | | | | |
Prior Credit Agreement | Revolving Credit Facility | Base Rate | Maximum | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Margin rate | | 2.00% | | | | | |
Prior Credit Agreement | Swingline Sub Facility | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Maximum borrowing capacity | | $ 20,000,000 | | | | | |
Prior Credit Agreement | Letters of Credit Sub Facility | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Maximum borrowing capacity | | 75,000,000 | | | | | |
Prior Credit Agreement | Term Loan Facility A | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Debt instrument, face amount | | 200,000,000 | | | | | |
Prior Credit Agreement | Uncommitted Incremental Accordion Facility | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Maximum borrowing capacity | | $ 100,000,000 | | | | | |
Credit Agreement | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Initiation date | | | Apr. 21, 2017 | | | | |
Maturity date | | | Apr. 21, 2022 | | | | |
Credit Agreement | Minimum | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Unused commitment fee percentage | 0.20% | | | | | | |
Credit Agreement | Maximum | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Unused commitment fee percentage | 0.50% | | | | | | |
Credit Agreement | LIBOR | Minimum | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Variable rate basis | 0.00% | | | | | | |
Margin rate | 1.50% | | | | | | |
Credit Agreement | LIBOR | Maximum | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Margin rate | 2.75% | | | | | | |
Credit Agreement | One-Month LIBOR | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Basis spread on variable rate | 1.00% | | | | | | |
Credit Agreement | Base Rate | Minimum | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Margin rate | 0.50% | | | | | | |
Credit Agreement | Base Rate | Maximum | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Margin rate | 1.75% | | | | | | |
Credit Agreement | Federal Funds Rate | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Basis spread on variable rate | 0.50% | | | | | | |
Credit Agreement | Revolving Credit Facility | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Maximum borrowing capacity | $ 100,000,000 | | | | | | |
Credit Agreement | Revolving Credit Facility | Subsequent Event | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Maximum borrowing capacity | | | | $ 100,000,000 | | | |
Credit Agreement | Swingline Sub Facility | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Maximum borrowing capacity | 25,000,000 | | | | | | |
Credit Agreement | Swingline Sub Facility | Subsequent Event | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Maximum borrowing capacity | | | | 25,000,000 | | | |
Credit Agreement | Letters of Credit Sub Facility | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Maximum borrowing capacity | 75,000,000 | | | | | | |
Credit Agreement | Letters of Credit Sub Facility | Subsequent Event | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Maximum borrowing capacity | | | | $ 75,000,000 | | | |
Credit Agreement | Term Loan Facility A | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Debt instrument, face amount | 70,000,000 | | | | | | |
Credit Agreement | Uncommitted Incremental Accordion Facility | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Maximum borrowing capacity | 100,000,000 | | | | | | |
Credit Agreement | Delayed Draw Term Loan Facility | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Debt instrument, face amount | $ 150,000,000 | | | | | | |
Long term debt outstanding | | | $ 0 | | | | |
Credit Agreement | Delayed Draw Term Loan Facility | First 12 Quarters Following the Closing | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Periodic principal payment as percentage of aggregate principal amount | 1.25% | | | | | | |
Credit Agreement | Delayed Draw Term Loan Facility | Remaining Quarters Prior to Maturity | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Periodic principal payment as percentage of aggregate principal amount | 1.875% | | | | | | |
Credit Agreement | Delayed Draw Term Loan Facility | Subsequent Event | 1.50% Cash Convertible Senior Notes Due 2018 | | | | | | | |
Line of Credit Facility [Line Items] | | | | | | | |
Long term debt outstanding | | | | | $ 100,000,000 | | |