Summary of Significant Accounting Policies (Details)
$ in Thousands
6 Months Ended
Jun. 30, 2017
USD ($)
segment
Jun. 30, 2016
USD ($)
Jan. 01, 2017
USD ($)
Accounting Policies [Abstract]      
Number of Operating Segments | segment 1    
New Accounting Pronouncements or Change in Accounting Principle [Line Items]      
Net cash provided by operating activities $ 134,531 $ 61,033 [1]  
Net cash provided by (used in) financing activities $ 18,368 (18,040) [1]  
ASU 2016-09      
New Accounting Pronouncements or Change in Accounting Principle [Line Items]      
Net cash provided by operating activities   600  
Net cash provided by (used in) financing activities   $ 600  
ASU 2016-09 | Accumulated deficit      
New Accounting Pronouncements or Change in Accounting Principle [Line Items]      
Cumulative-effect increase to our accumulated deficit for previously estimated forfeitures     $ 400
ASU 2016-09 | Pro forma      
New Accounting Pronouncements or Change in Accounting Principle [Line Items]      
Deferred tax assets     $ 180,900
[1] (1) We adopted Accounting Standards Update ("ASU") 2016-09 in the first quarter of 2017. Prior to the adoption of ASU 2016-09, excess tax benefits related to stock awards were required to be presented as an inflow from financing activities and an outflow from operating activities on the statement of cash flows. Under the new standard, all tax-related cash flows resulting from share-based payments are reported as operating activities. We adopted the new requirement retrospectively, and for the six months ended June 30, 2016, this resulted in an increase to net cash provided by operating activities of $0.6 million and a corresponding decrease to net cash provided by (used in) financing activities of $0.6 million.