v3.8.0.1
Stock-Based Compensation - Other (Details) - USD ($)
$ / shares in Units, $ in Thousands
12 Months Ended
Dec. 31, 2017
Dec. 31, 2016
Dec. 31, 2015
Additional disclosures      
Compensation cost related to the nonvested awards not yet recognized $ 15,600    
Weighted average period for recognition of compensation cost 2 years 4 months 24 days    
Summary of restricted stock unit activity      
Total unrecognized compensation cost related to unvested RSUs $ 31,500    
Unrecognized compensation cost period expected to be realized 2 years 1 month 6 days    
Stock options      
Stock-Based Compensation      
Vesting period 4 years    
Expiration period 10 years    
Fair value assumptions and methodology      
Risk-free interest rate minimum (as a percent) 2.00% 1.10% 1.50%
Risk-free interest rate maximum (as a percent) 2.10% 1.90% 1.90%
Expected volatility minimum (as a percent) 46.00%    
Expected volatility maximum (as a percent) 49.00%    
Expected volatility (as a percent)   50.00% 50.00%
Dividend yield (as a percent) 0.00% 0.00% 0.00%
Number of Options      
Outstanding balance at the beginning of the period (in shares) 4,882,237    
Granted (in shares) 605,640    
Exercised (in shares) (846,821)    
Forfeited (in shares) (65,853)    
Expired (in shares) (16,027)    
Outstanding balance at the end of the period (in shares) 4,559,176 4,882,237  
Exercisable at the end of the period (in shares) 3,357,682    
Vested and expected to vest at the end of the period (in shares) 4,559,176    
Weighted Average Exercise Price per Share      
Outstanding balance at the beginning of the period (in dollars per share) $ 10.74    
Granted (in dollars per share) 40.90    
Exercised (in dollars per share) 7.81    
Forfeited (in dollars per share) 23.63    
Expired (in dollars per share) 13.26    
Outstanding balance at the end of the period (in dollars per share) 15.10 $ 10.74  
Exercisable at the end of the period (in dollars per share) 8.96    
Vested and expected to vest at the end of the period (in dollars per share) 15.10    
Weighted average grant date fair value (in dollars per share) $ 19.65 $ 11.41 $ 12.54
Weighted Average Remaining Contractual Term      
Outstanding balance 5 years 10 months 17 days 6 years 3 months 18 days  
Granted 8 years 11 months 12 days    
Exercised 3 years 11 months 19 days    
Exercisable at the end of the period 4 years 11 months 1 day    
Vested and expected to vest at the end of the period 5 years 10 months 17 days    
Aggregate Intrinsic Value      
Outstanding balance at the end of the period $ 225,283 $ 95,081  
Exercisable at the end of the period 186,529    
Vested and expected to vest at the end of the period 225,283    
Additional disclosures      
Aggregate intrinsic value of employee options exercised $ 24,900 $ 24,900 $ 25,800
Stock options | Minimum      
Fair value assumptions and methodology      
Expected term in (years) 6 years 5 years 5 months 5 days 5 years 6 months 22 days
Stock options | Maximum      
Fair value assumptions and methodology      
Expected term in (years) 6 years 29 days 6 years 6 months 6 years 29 days
Restricted Stock Units      
Stock-Based Compensation      
Vesting period 4 years    
Summary of restricted stock unit activity      
Outstanding balance at the beginning of the period (in shares) 1,412,934    
Granted (in shares) 620,259    
Vested (in shares) (494,504)    
Forfeited (in shares) (125,266)    
Outstanding balance at the end of the period (in shares) 1,413,423 1,412,934  
Weighted-Average Grant-Date Fair value      
Outstanding at the beginning of the period (in dollars per share) $ 20.60    
Granted (in dollars per share) 41.74    
Vested (in dollars per share) 18.98    
Forfeited (in dollars per share) 26.16    
Outstanding at the end of the period (in dollars per share) $ 29.95 $ 20.60