Quarterly report pursuant to Section 13 or 15(d)

Debt - Narrative (Details)

v3.22.2
Debt - Narrative (Details)
3 Months Ended 6 Months Ended
Apr. 05, 2021
USD ($)
$ / shares
shares
Jun. 30, 2022
USD ($)
Jun. 30, 2021
USD ($)
Jun. 30, 2022
USD ($)
employee
tradingDay
businessDay
Jun. 30, 2021
USD ($)
Dec. 31, 2021
USD ($)
Mar. 25, 2021
USD ($)
Dec. 31, 2020
USD ($)
Oct. 20, 2020
USD ($)
Jul. 23, 2018
USD ($)
Debt Instrument [Line Items]                    
Inventory   $ 377,518,000   $ 377,518,000   $ 358,221,000        
Total cash, cash equivalents, and restricted cash   408,201,000 $ 787,682,000 408,201,000 $ 787,682,000 718,281,000   $ 945,820,000    
Adjustments to additional paid in capital, convertible debt, capped call transaction   62,647,000   $ 62,647,000            
Debt Instrument, Redemption, Period Two                    
Debt Instrument [Line Items]                    
Conversion price, percentage       98.00%            
1.75% Convertible Senior Notes due 2023                    
Debt Instrument [Line Items]                    
Aggregated principal amount   23,512,000   $ 23,512,000            
0% Convertible Senior Notes due 2025                    
Debt Instrument [Line Items]                    
Aggregated principal amount   661,250,000   661,250,000            
0.5% Convertible Senior Notes Due 2027                    
Debt Instrument [Line Items]                    
Aggregated principal amount   575,000,000   575,000,000            
Revolving Credit Facility                    
Debt Instrument [Line Items]                    
Net assets   470,950,000   470,950,000   567,128,000        
Inventory   364,962,000   364,962,000   337,630,000        
Total cash, cash equivalents, and restricted cash   76,823,000   76,823,000   101,064,000        
Amortization of debt issuance costs   94,000 50,000 185,000 136,000          
Interest expense, debt   1,243,000 613,000 $ 2,751,000 953,000          
Goldman Sachs Bank USA | Revolving Credit Facility                    
Debt Instrument [Line Items]                    
Debt instrument, term       6 months            
Goldman Sachs Bank USA | Revolving Credit Facility | Secured Overnight Financing Rate (SOFR) Overnight Index Swap Rate                    
Debt Instrument [Line Items]                    
Debt instrument, basis points | employee       11.448            
Minimum | Goldman Sachs Bank USA | Revolving Credit Facility                    
Debt Instrument [Line Items]                    
Debt instrument, floor rate of basis spread on variable rate       0.30%            
Maximum | Goldman Sachs Bank USA | Revolving Credit Facility                    
Debt Instrument [Line Items]                    
Debt instrument, basis spread on variable rate       3.00%            
Senior Notes                    
Debt Instrument [Line Items]                    
Amortization of debt issuance costs   1,288,000 1,286,000 $ 2,575,000 2,075,000          
Interest expense, debt   $ 822,000 819,000 $ 1,644,000 957,000          
Senior Notes | 1.75% Convertible Senior Notes due 2023                    
Debt Instrument [Line Items]                    
Debt instrument, interest rate, stated percentage   1.75%   1.75%            
Amortization of debt issuance costs   $ 38,000 39,000 $ 75,000 110,000          
Interest expense, debt   103,000 104,000 206,000 208,000          
Aggregated principal amount   23,512,000   23,512,000   23,512,000       $ 143,750,000
Repurchased face amount   120,238,000   120,238,000            
Senior Notes | 0% Convertible Senior Notes due 2025                    
Debt Instrument [Line Items]                    
Amortization of debt issuance costs   690,000 690,000 1,380,000 1,380,000          
Interest expense, debt   0 0 0 0          
Aggregated principal amount   $ 661,250,000   $ 661,250,000   661,250,000     $ 661,250,000  
Senior Notes | 0.5% Convertible Senior Notes Due 2027                    
Debt Instrument [Line Items]                    
Debt instrument, interest rate, stated percentage   0.50%   0.50%            
Amortization of debt issuance costs   $ 560,000 557,000 $ 1,120,000 585,000          
Interest expense, debt   719,000 $ 715,000 1,438,000 $ 749,000          
Aggregated principal amount $ 575,000,000 $ 575,000,000   $ 575,000,000   $ 575,000,000 $ 575,000,000      
Common stock covered under capped calls (in shares) | shares 6,147,900                  
Senior Notes | Convertible Senior Notes | Debt Instrument, Redemption, Period One                    
Debt Instrument [Line Items]                    
Threshold trading days | tradingDay       20            
Threshold consecutive trading days | tradingDay       30            
Threshold percentage of stock price trigger       130.00%            
Senior Notes | Convertible Senior Notes | Debt Instrument, Redemption, Period Two                    
Debt Instrument [Line Items]                    
Threshold trading days | businessDay       5            
Threshold consecutive trading days | tradingDay       5            
Senior Notes | Minimum | 0.5% Convertible Senior Notes Due 2027 | Call Option | Capped Call Transaction                    
Debt Instrument [Line Items]                    
Capped call price (in dollars per share) | $ / shares $ 93.53                  
Senior Notes | Maximum | 0.5% Convertible Senior Notes Due 2027 | Call Option | Capped Call Transaction                    
Debt Instrument [Line Items]                    
Capped call price (in dollars per share) | $ / shares $ 138.56