| Stock-Based Compensation - Stock-Based Compensation Expense (Details) - USD ($) $ in Thousands | 3 Months Ended | 6 Months Ended | ||
|---|---|---|---|---|
| Jun. 30, 2022 | Jun. 30, 2021 | Jun. 30, 2022 | Jun. 30, 2021 | |
| Share-based Compensation Arrangement by Share-based Payment Award [Line Items] | ||||
| Stock-based compensation expense | $ 19,469 | $ 13,966 | $ 38,023 | $ 26,921 | 
| Cost of net revenue | ||||
| Share-based Compensation Arrangement by Share-based Payment Award [Line Items] | ||||
| Stock-based compensation expense | 162 | 148 | 325 | 317 | 
| Research and development | ||||
| Share-based Compensation Arrangement by Share-based Payment Award [Line Items] | ||||
| Stock-based compensation expense | 9,983 | 7,267 | 19,659 | 14,429 | 
| Selling, general and administrative | ||||
| Share-based Compensation Arrangement by Share-based Payment Award [Line Items] | ||||
| Stock-based compensation expense | $ 9,324 | $ 6,551 | $ 18,039 | $ 12,175 | 
| X | ||||||||||
| 
- Definition Amount of expense for award under share-based payment arrangement. Excludes amount capitalized. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
 | 
| X | ||||||||||
| 
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. No definition available. 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 |