Quarterly report pursuant to Section 13 or 15(d)

Stock-Based Compensation - Summary of Stock-Based Compensation Expense (Details)

v3.22.2
Stock-Based Compensation - Summary of 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 Payment Arrangement, Expensed and Capitalized, Amount [Line Items]        
Compensation expense recognized $ 26,653 $ 43,463 $ 65,872 $ 121,492
Stock-based compensation expense capitalized 2,500   7,400  
Cost of customer agreements and incentives        
Share-based Payment Arrangement, Expensed and Capitalized, Amount [Line Items]        
Compensation expense recognized 2,169 1,992 5,356 4,224
Cost of solar energy systems and product sales        
Share-based Payment Arrangement, Expensed and Capitalized, Amount [Line Items]        
Compensation expense recognized 1,682 1,045 5,014 2,349
Sales and marketing        
Share-based Payment Arrangement, Expensed and Capitalized, Amount [Line Items]        
Compensation expense recognized 13,490 23,227 37,624 50,333
Research and development        
Share-based Payment Arrangement, Expensed and Capitalized, Amount [Line Items]        
Compensation expense recognized 743 803 1,696 1,479
General and administration        
Share-based Payment Arrangement, Expensed and Capitalized, Amount [Line Items]        
Compensation expense recognized $ 8,569 $ 16,396 $ 16,182 $ 63,107