CONSOLIDATED STATEMENTS OF CONVERTIBLE AND REDEEMABLE PREFERRED STOCK AND STOCKHOLDERS’ EQUITY (DEFICIT) - USD ($)
$ in Thousands
Total
Warrants
Public Offering
ATM
Convertible and redeemable preferred stock
Common Stock
Common Stock
Warrants
Common Stock
Public Offering
Common Stock
ATM
Additional Paid-in Capital
Additional Paid-in Capital
Warrants
Additional Paid-in Capital
Public Offering
Additional Paid-in Capital
ATM
Accumulated other comprehensive income
Accumulated Deficit
Balance at the beginning (in shares) at Dec. 31, 2019         0                    
Beginning balance at Dec. 31, 2019         $ 0                    
Convertible and redeemable preferred stock                              
Series B-1 and B-2 convertible preferred stock deemed dividends $ 0                            
Balance at the end (in shares) at Dec. 31, 2020         0                    
Ending balance at Dec. 31, 2020         $ 0                    
Beginning balance (in shares) at Dec. 31, 2019           48,137,880                  
Beginning balance at Dec. 31, 2019 15,636         $ 5       $ 528,810       $ 0 $ (513,179)
Increase (Decrease) in Stockholders' Equity [Roll Forward]                              
Issuance of stock (in shares)             200 31,700,000 676,656            
Issuance of stock   $ 2 $ 103,266 $ 3,362       $ 3     $ 2 $ 103,263 $ 3,362    
Issuance of common stock - ESPP and exercise of stock options (in shares)           150,353                  
Issuance of common stock - ESPP and exercise of stock options 360                 360          
Restricted stock awards issued (in shares)           1,356,667                  
Shares withheld to cover taxes related to vesting of restricted stock awards (in shares)           (670,223)                  
Shares withheld to cover taxes related to vesting of restricted stock awards (2,869)                 (2,869)          
Short-swing profit disgorgement 187                 187          
Reclassification from financial instruments liability to equity 11,015                 11,015          
Change in fair value of financial instruments attributed to credit risk change 0                            
Stock-based compensation 12,697                 12,697          
Net loss (142,309)                           (142,309)
Ending balance (in shares) at Dec. 31, 2020           81,351,533                  
Ending balance at Dec. 31, 2020 1,347         $ 8       656,827       0 (655,488)
Convertible and redeemable preferred stock                              
Issuance of series B-1 and B-2 convertible preferred stock in a registered direct offering (in shares)         10,000                    
Issuance of series B-1 and B-2 convertible preferred stock in a registered direct offering (see Note 10)         $ 9,081                    
Converted shares (in shares)         (5,000)                    
Conversion of series B-1 convertible preferred stock         $ (4,631)                    
Series B-1 and B-2 convertible preferred stock deemed dividends 1,047       $ 290         1,047          
Balance at the end (in shares) at Dec. 31, 2021         5,000                    
Ending balance at Dec. 31, 2021         $ 4,740                    
Increase (Decrease) in Stockholders' Equity [Roll Forward]                              
Issuance of stock (in shares)   159,000         159,000 72,262,079              
Issuance of stock   $ 159 $ 80,799         $ 8     $ 159 $ 80,791      
Issuance of common stock - ESPP and exercise of stock options (in shares)           460,636                  
Issuance of common stock - ESPP and exercise of stock options 297                 297          
Common stock issued for conversion of series B-1 convertible preferred stock (in shares)           7,936,508                  
Conversion of series B-1 convertible preferred stock 5,662                 5,662          
Restricted stock awards issued (in shares)           1,777,500                  
Restricted stock awards cancelled (in shares)           (1,073,833)                  
Shares withheld to cover taxes related to vesting of restricted stock awards (in shares)           (372,998)                  
Shares withheld to cover taxes related to vesting of restricted stock awards (327)                 (327)          
Change in fair value of financial instruments attributed to credit risk change 5,089                         5,089  
Stock-based compensation 8,898                 8,898          
Net loss (205,192)                            
Ending balance (in shares) at Dec. 31, 2021           162,500,425                  
Ending balance at Dec. 31, 2021 $ (104,315)         $ 16       $ 751,260       $ 5,089 $ (860,680)