| Convertible Senior Notes (Details) $ in Thousands | 6 Months Ended | |||
|---|---|---|---|---|
| Dec. 31, 2022  USD ($) | Feb. 01, 2021  USD ($) | Jun. 30, 2023  USD ($) | Jun. 30, 2022  USD ($) | |
| Debt Instrument, Redemption [Line Items] | ||||
| Aggregate principal amount | $ 400,000 | |||
| Repurchase/repayment of convertible senior notes | 13,169 | $ 143,774 | ||
| Convertible senior notes | $ 282,496 | $ 267,791 | ||
| Maturity Year 2026 | ||||
| Debt Instrument, Redemption [Line Items] | ||||
| Convertible senior notes conversion ratio | 0.0338752 | 0.0338752 | ||
| Convertible Debt [Member] | Maturity Year 2026 | ||||
| Debt Instrument, Redemption [Line Items] | ||||
| Aggregate principal amount | $ 287,500 | $ 271,900 | ||
| Proceeds from convertible senior notes | $ 279,900 | |||
| Convertible senior notes interest rate per annum | 6.25% | |||
| Principal amount repurchased | $ 15,600 | |||
| Repurchase/repayment of convertible senior notes | 13,200 | |||
| Gain on repurchase of convertible notes | $ 2,200 | |||
| X | ||||||||||
| 
- Definition Including the current and noncurrent portions, carrying value as of the balance sheet date of a written promise to pay a note, initially due after one year or beyond the operating cycle if longer, which can be exchanged for a specified amount of one or more securities (typically common stock), at the option of the issuer or the holder. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Ratio applied to the conversion of debt instrument into equity with equity shares divided by debt principal amount. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
 | 
| X | ||||||||||
| 
- Definition Face (par) amount of debt instrument at time of issuance. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
 | 
| X | ||||||||||
| 
- Definition Contractual interest rate for funds borrowed, under the debt agreement. 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 | ||||||||||
| 
- Definition Amount of principal of debt repaid. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
 | 
| X | ||||||||||
| 
- Definition Difference between the fair value of payments made and the carrying amount of debt which is extinguished prior to maturity. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition The cash inflow during the period from additional borrowings in aggregate debt. Includes proceeds from short-term and long-term debt. Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef 
 | 
| X | ||||||||||
| 
- Definition The cash outflow from the repayment of a long-term debt instrument which can be exchanged for a specified amount of another security, typically the entity's common stock, at the option of the issuer or the holder. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 |