Condensed Consolidated Statements of Stockholders' Equity (Unaudited) - USD ($) shares in Thousands, $ in Thousands | Total | Class A and Class B Common Stock | Common Stock Class A and Class B Common Stock | Additional Paid-in Capital | Accumulated Deficit |
Beginning balance (in shares) at Dec. 31, 2021 | | 400,562 | | | |
Beginning balance at Dec. 31, 2021 | $ 831,680 | | $ 40 | $ 2,247,347 | $ (1,415,707) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | |
Stock options exercised (in shares) | | 749 | | | |
Stock options exercised | 3,699 | | | 3,699 | |
Stock-based compensation | 32,161 | | | 32,161 | |
Vesting and settlement of restricted stock units (in shares) | | 822 | | | |
Common stock withheld for tax obligations and net settlement (in shares) | | (364) | | | |
Common stock withheld related to net share settlement | (9,561) | | | (9,561) | |
Repurchases of Class A common stock (in shares) | | (5,637) | | | |
Repurchases of Class A common stock | (83,765) | | | (83,765) | |
Net income (loss) | 12,293 | | | | 12,293 |
Ending balance (in shares) at Mar. 31, 2022 | | 396,132 | | | |
Ending balance at Mar. 31, 2022 | 786,507 | | 40 | 2,189,881 | (1,403,414) |
Beginning balance (in shares) at Dec. 31, 2021 | | 400,562 | | | |
Beginning balance at Dec. 31, 2021 | 831,680 | | 40 | 2,247,347 | (1,415,707) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | |
Net income (loss) | (30,856) | | | | |
Ending balance (in shares) at Sep. 30, 2022 | | 396,065 | | | |
Ending balance at Sep. 30, 2022 | 788,403 | | 40 | 2,234,926 | (1,446,563) |
Beginning balance (in shares) at Mar. 31, 2022 | | 396,132 | | | |
Beginning balance at Mar. 31, 2022 | 786,507 | | 40 | 2,189,881 | (1,403,414) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | |
Stock options exercised (in shares) | | 1,176 | | | |
Stock options exercised | 4,109 | | | 4,109 | |
Stock-based compensation | 33,466 | | | 33,466 | |
Vesting and settlement of restricted stock units (in shares) | | 1,059 | | | |
Common stock withheld for tax obligations and net settlement (in shares) | | (459) | | | |
Common stock withheld related to net share settlement | (4,727) | | | (4,727) | |
Net income (loss) | (1,415) | | | | (1,415) |
Ending balance (in shares) at Jun. 30, 2022 | | 397,908 | | | |
Ending balance at Jun. 30, 2022 | 817,940 | | 40 | 2,222,729 | (1,404,829) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | |
Stock options exercised (in shares) | | 245 | | | |
Stock options exercised | 1,271 | | | 1,271 | |
Stock-based compensation | 32,151 | | | 32,151 | |
Vesting and settlement of restricted stock units (in shares) | | 1,256 | | | |
Common stock withheld for tax obligations and net settlement (in shares) | | (525) | | | |
Common stock withheld related to net share settlement | (3,269) | | | (3,269) | |
Repurchases of Class A common stock (in shares) | | (2,819) | | | |
Repurchases of Class A common stock | (17,956) | | | (17,956) | |
Net income (loss) | (41,734) | | | | (41,734) |
Ending balance (in shares) at Sep. 30, 2022 | | 396,065 | | | |
Ending balance at Sep. 30, 2022 | 788,403 | | 40 | 2,234,926 | (1,446,563) |
Beginning balance (in shares) at Dec. 31, 2022 | | 397,025 | | | |
Beginning balance at Dec. 31, 2022 | 814,827 | | 40 | 2,263,322 | (1,448,535) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | |
Stock options exercised (in shares) | | 192 | | | |
Stock options exercised | 895 | | | 895 | |
Stock-based compensation | 28,263 | | | 28,263 | |
Vesting and settlement of restricted stock units (in shares) | | 1,668 | | | |
Common stock withheld for tax obligations and net settlement (in shares) | | (666) | | | |
Common stock withheld related to net share settlement | (3,710) | | | (3,710) | |
Repurchases of Class A common stock (in shares) | | (1,570) | | | |
Repurchases of Class A common stock | (9,517) | | | (9,517) | |
Net income (loss) | (3,290) | | | | (3,290) |
Ending balance (in shares) at Mar. 31, 2023 | | 396,649 | | | |
Ending balance at Mar. 31, 2023 | 827,468 | | 40 | 2,279,253 | (1,451,825) |
Beginning balance (in shares) at Dec. 31, 2022 | | 397,025 | | | |
Beginning balance at Dec. 31, 2022 | 814,827 | | 40 | 2,263,322 | (1,448,535) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | |
Net income (loss) | 17,001 | | | | |
Ending balance (in shares) at Sep. 30, 2023 | | 398,362 | | | |
Ending balance at Sep. 30, 2023 | 881,273 | | 40 | 2,312,767 | (1,431,534) |
Beginning balance (in shares) at Mar. 31, 2023 | | 396,649 | | | |
Beginning balance at Mar. 31, 2023 | 827,468 | | 40 | 2,279,253 | (1,451,825) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | |
Stock options exercised (in shares) | | 204 | | | |
Stock options exercised | 560 | | | 560 | |
Stock-based compensation | 21,354 | | | 21,354 | |
Vesting and settlement of restricted stock units (in shares) | | 2,148 | | | |
Common stock withheld for tax obligations and net settlement (in shares) | | (827) | | | |
Common stock withheld related to net share settlement | (4,526) | | | (4,526) | |
Repurchases of Class A common stock (in shares) | | (1,663) | | | |
Repurchases of Class A common stock | $ (8,920) | | | (8,920) | |
Issuance of common stock through employee stock purchase plan (in shares) | 161 | | | | |
Issuance of common stock through employee stock purchase plan | $ 649 | | | | |
Net income (loss) | 58,786 | | | | 58,786 |
Ending balance (in shares) at Jun. 30, 2023 | | 396,672 | | | |
Ending balance at Jun. 30, 2023 | 895,371 | | 40 | 2,288,370 | (1,393,039) |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | |
Stock options exercised (in shares) | | 1,138 | | | |
Stock options exercised | 3,118 | | | 3,118 | |
Stock-based compensation | 36,346 | | | 36,346 | |
Vesting and settlement of restricted stock units (in shares) | | 2,749 | | | |
Common stock withheld for tax obligations and net settlement (in shares) | | (1,059) | | | |
Common stock withheld related to net share settlement | (7,355) | | | (7,355) | |
Repurchases of Class A common stock (in shares) | | (1,138) | | | |
Repurchases of Class A common stock | (7,712) | | | (7,712) | |
Net income (loss) | (38,495) | | | | (38,495) |
Ending balance (in shares) at Sep. 30, 2023 | | 398,362 | | | |
Ending balance at Sep. 30, 2023 | $ 881,273 | | $ 40 | $ 2,312,767 | $ (1,431,534) |