Consolidated Statements of Redeemable Convertible Preferred Stock and Stockholders' Equity (Deficit) Statement - USD ($) shares in Thousands, $ in Thousands | Total | Special Termination Benefits [Member] | Preferred Stock [Member]Redeemable Convertible Preferred Stock [Member] |
Beginning Balance at Dec. 31, 2013 | $ (5,366) | | $ 77,198 |
Beginning Balance (shares) at Dec. 31, 2013 | | | 30,523 |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | |
Issuance of common stock upon public offerings, net of offering costs | 286,247 | | |
Issuance of common stock upon public offerings, net of offering costs (shares) | | | |
Conversion of preferred stock to common stock upon initial public offering, net of issuance cost accretion | 77,198 | | $ (77,198) |
Conversion of preferred stock to common stock upon initial public offering, net of issuance cost accretion (shares) | | | -30,523 |
Common stock issued under employee benefit plans, net of shares withheld for tax | 7,681 | | |
Common stock issued under employee benefit plans, net of shares withheld for tax (shares) | | | |
Retirement of common stock | -1,177 | | |
Retirement of common stock (shares) | | | |
Stock-based compensation expense | 71,399 | | |
Excess tax benefit from stock-based compensation | 77,134 | | |
Net income (loss) | 128,088 | | |
Ending Balance at Dec. 31, 2014 | 641,204 | | $ 0 |
Ending Balance (shares) at Dec. 31, 2014 | | | 0 |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | |
Common stock issued under employee benefit plans, net of shares withheld for tax | 36,413 | | |
Common stock issued under employee benefit plans, net of shares withheld for tax (shares) | | | |
Taxes paid related to net share settlements | -13,943 | | |
Retirement of common stock (shares) | | | |
Repurchase of outstanding common stock | -35,613 | | |
Repurchase of outstanding common stock (shares) | | | |
Stock-based compensation expense | 80,583 | | |
Excess tax benefit from stock-based compensation | 27,258 | | |
Net income (loss) | 36,131 | | |
Ending Balance at Dec. 31, 2015 | 772,033 | | $ 0 |
Ending Balance (shares) at Dec. 31, 2015 | | | 0 |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | |
Common stock issued under employee benefit plans, net of shares withheld for tax | 10,103 | | |
Common stock issued under employee benefit plans, net of shares withheld for tax (shares) | | | |
Taxes paid related to net share settlements | -6,889 | | |
Shares issued to third-party vendor for services (Note 11) | 7,297 | | |
Shares issued to third-party vendor for services (Note 11) (shares) | | | |
Stock-based compensation expense | 69,499 | $ 15,566 | |
Excess tax benefit from stock-based compensation | -1,661 | | |
Net income (loss) | -419,003 | | |
Ending Balance at Dec. 31, 2016 | $ 446,945 | | $ 0 |
Ending Balance (shares) at Dec. 31, 2016 | | | 0 |