Condensed Consolidated Statements of Stockholders' Equity - USD ($) shares in Thousands, $ in Thousands | Total | Cumulative Effect, Period of Adoption, Adjustment | Common Stock | Additional Paid-in Capital | Additional Paid-in Capital Cumulative Effect, Period of Adoption, Adjustment | Accumulated Deficit | Accumulated Deficit Cumulative Effect, Period of Adoption, Adjustment | Accumulated Other Comprehensive Loss |
Beginning balance (in shares) at Dec. 31, 2021 | | | 67,534 | | | | | |
Beginning balance at Dec. 31, 2021 | $ 403,000 | $ (111,000) | $ 0 | $ 599,000 | $ (177,000) | $ (190,000) | $ 66,000 | $ (6,000) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Shares issued pursuant to restricted stock awards, net of tax withholdings related to vesting of restricted stock units (in shares) | | | 434 | | | | | |
Shares issued pursuant to restricted stock unit awards, net of tax withholdings related to vesting of restricted stock units | (14,000) | | | (14,000) | | | | |
Exercise of stock options and issuance of shares in connection with employee stock purchase plan (in shares) | | | 160 | | | | | |
Exercise of stock options and issuance of shares in connection with employee stock purchase plan | 5,000 | | | 5,000 | | | | |
Stock-based compensation | 53,000 | | | 53,000 | | | | |
Cumulative translation adjustment | 2,000 | | | | | | | 2,000 |
Unrealized gain (loss) on investments, net of tax | (2,000) | | | | | | | (2,000) |
Net loss | (105,000) | | | | | (105,000) | | |
Ending balance (in shares) at Mar. 31, 2022 | | | 68,128 | | | | | |
Ending balance at Mar. 31, 2022 | 231,000 | | $ 0 | 466,000 | | (229,000) | | (6,000) |
Beginning balance (in shares) at Dec. 31, 2021 | | | 67,534 | | | | | |
Beginning balance at Dec. 31, 2021 | 403,000 | $ (111,000) | $ 0 | 599,000 | $ (177,000) | (190,000) | $ 66,000 | (6,000) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Cumulative translation adjustment | 5,000 | | | | | | | |
Unrealized gain (loss) on investments, net of tax | (3,000) | | | | | | | |
Net loss | (212,000) | | | | | | | |
Ending balance (in shares) at Jun. 30, 2022 | | | 68,461 | | | | | |
Ending balance at Jun. 30, 2022 | 172,000 | | $ 0 | 512,000 | | (336,000) | | (4,000) |
Beginning balance (in shares) at Mar. 31, 2022 | | | 68,128 | | | | | |
Beginning balance at Mar. 31, 2022 | 231,000 | | $ 0 | 466,000 | | (229,000) | | (6,000) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Shares issued pursuant to restricted stock awards, net of tax withholdings related to vesting of restricted stock units (in shares) | | | 329 | | | | | |
Shares issued pursuant to restricted stock unit awards, net of tax withholdings related to vesting of restricted stock units | (12,000) | | | (12,000) | | | | |
Exercise of stock options and issuance of shares in connection with employee stock purchase plan (in shares) | | | 4 | | | | | |
Exercise of stock options and issuance of shares in connection with employee stock purchase plan | 0 | | | | | | | |
Stock-based compensation | 58,000 | | | 58,000 | | | | |
Cumulative translation adjustment | 3,000 | | | | | | | 3,000 |
Unrealized gain (loss) on investments, net of tax | (1,000) | | | | | | | (1,000) |
Net loss | (107,000) | | | | | (107,000) | | |
Ending balance (in shares) at Jun. 30, 2022 | | | 68,461 | | | | | |
Ending balance at Jun. 30, 2022 | 172,000 | | $ 0 | 512,000 | | (336,000) | | (4,000) |
Beginning balance (in shares) at Dec. 31, 2022 | | | 69,502 | | | | | |
Beginning balance at Dec. 31, 2022 | 174,000 | | $ 0 | 623,000 | | (443,000) | | (6,000) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Shares issued pursuant to restricted stock awards, net of tax withholdings related to vesting of restricted stock units (in shares) | | | 767 | | | | | |
Shares issued pursuant to restricted stock unit awards, net of tax withholdings related to vesting of restricted stock units | (27,000) | | | (27,000) | | | | |
Exercise of stock options and issuance of shares in connection with employee stock purchase plan (in shares) | | | 159 | | | | | |
Exercise of stock options and issuance of shares in connection with employee stock purchase plan | 9,000 | | | 9,000 | | | | |
Stock-based compensation | 60,000 | | | 60,000 | | | | |
Settlement of capped calls (in shares) | | | (10) | | | | | |
Conversion on 2023 Notes, net of tax (in shares) | | | 9 | | | | | |
Conversion of 2023 Notes, net of tax | 0 | | | | | | | |
Cumulative translation adjustment | (4,000) | | | | | | | (4,000) |
Unrealized gain (loss) on investments, net of tax | 2,000 | | | | | | | 2,000 |
Net loss | (89,000) | | | | | (89,000) | | |
Ending balance (in shares) at Mar. 31, 2023 | | | 70,427 | | | | | |
Ending balance at Mar. 31, 2023 | 125,000 | | $ 0 | 665,000 | | (532,000) | | (8,000) |
Beginning balance (in shares) at Dec. 31, 2022 | | | 69,502 | | | | | |
Beginning balance at Dec. 31, 2022 | 174,000 | | $ 0 | 623,000 | | (443,000) | | (6,000) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Cumulative translation adjustment | (8,000) | | | | | | | |
Unrealized gain (loss) on investments, net of tax | 2,000 | | | | | | | |
Net loss | (209,000) | | | | | | | |
Ending balance (in shares) at Jun. 30, 2023 | | | 71,029 | | | | | |
Ending balance at Jun. 30, 2023 | 52,000 | | $ 0 | 716,000 | | (652,000) | | (12,000) |
Beginning balance (in shares) at Mar. 31, 2023 | | | 70,427 | | | | | |
Beginning balance at Mar. 31, 2023 | 125,000 | | $ 0 | 665,000 | | (532,000) | | (8,000) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Shares issued pursuant to restricted stock awards, net of tax withholdings related to vesting of restricted stock units (in shares) | | | 573 | | | | | |
Shares issued pursuant to restricted stock unit awards, net of tax withholdings related to vesting of restricted stock units | (13,000) | | | (13,000) | | | | |
Exercise of stock options and issuance of shares in connection with employee stock purchase plan (in shares) | | | 29 | | | | | |
Exercise of stock options and issuance of shares in connection with employee stock purchase plan | 0 | | | | | | | |
Stock-based compensation | 64,000 | | | 64,000 | | | | |
Cumulative translation adjustment | (4,000) | | | | | | | (4,000) |
Unrealized gain (loss) on investments, net of tax | 0 | | | | | | | |
Net loss | (120,000) | | | | | (120,000) | | |
Ending balance (in shares) at Jun. 30, 2023 | | | 71,029 | | | | | |
Ending balance at Jun. 30, 2023 | $ 52,000 | | $ 0 | $ 716,000 | | $ (652,000) | | $ (12,000) |