Annual report pursuant to Section 13 and 15(d)

Debt (Interest Expense) (Details)

v3.22.0.1
Debt (Interest Expense) (Details) - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2021
Dec. 31, 2020
Dec. 31, 2019
Debt Disclosure [Abstract]      
Coupon interest $ 9,919 $ 7,442 $ 8,917
Amortization of issuance costs 5,745 3,396 3,703
Undrawn and other fees 1,267 796 795
Accretion of debt discount 0 14,084 15,040
Interest on revolving credit facility 0 5,786 4,065
Total interest expense 16,931 31,504 32,520
Line of Credit Facility [Line Items]      
Interest expense 16,931 31,504 32,520
Coupon interest $ 9,919 7,442 8,917
Convertible Notes due 2023      
Debt Disclosure [Abstract]      
Accretion of debt discount   $ 9,400 $ 9,200
Line of Credit Facility [Line Items]      
Effective interest rate (as a percent) 2.40% 6.00% 6.00%
Convertible Notes due 2025      
Debt Disclosure [Abstract]      
Accretion of debt discount   $ 4,700  
Line of Credit Facility [Line Items]      
Effective interest rate (as a percent) 1.30% 4.00%  
Convertible Notes Payable      
Debt Disclosure [Abstract]      
Coupon interest     $ 2,900
Total interest expense     9,700
Line of Credit Facility [Line Items]      
Interest expense     9,700
Coupon interest     2,900
Amortization of debt issuance costs and discounts     6,800
Convertible Notes Payable | Convertible Notes due 2023      
Debt Disclosure [Abstract]      
Coupon interest $ 6,000 $ 6,000 6,000
Total interest expense 8,000 17,100 16,800
Line of Credit Facility [Line Items]      
Interest expense 8,000 17,100 16,800
Coupon interest 6,000 6,000 6,000
Amortization of debt issuance costs and discounts 2,000 11,100 $ 10,800
Convertible Notes Payable | Convertible Notes due 2025      
Debt Disclosure [Abstract]      
Coupon interest 3,900 1,400  
Total interest expense 6,800 6,900  
Line of Credit Facility [Line Items]      
Interest expense 6,800 6,900  
Coupon interest 3,900 1,400  
Amortization of debt issuance costs and discounts $ 2,900 $ 5,500