Long-term Debt | Long-term Debt Revolving Credit Facility On May 7, 2021, the Company entered into an Amended and Restated Credit Agreement (the "2021 Credit Agreement") with Wells Fargo Bank, National Association, as administrative agent and the other lenders parties thereto. The 2021 Credit Agreement provides for revolving credit borrowings up to a maximum principal amount of $200.0 million, subject to a commitment increase of $75.0 million. All outstanding amounts owed under the 2021 Credit Agreement become due and payable no later than the final maturity date of May 7, 2026. As of December 31, 2021, there was no outstanding balance under the 2021 Credit Agreement. The Company incurred $0.6 million of deferred finance fees as a result of the 2021 Credit Agreement for the year ended December 31, 2021. The 2021 Credit Agreement also allows for the issuance of letters of credit in the aggregate amount of up to $10.0 million at any one time; outstanding letters of credit reduce the credit available for revolving credit borrowings. As of December 31, 2021, the Company had two outstanding letters of credit for $0.2 million. Substantially all of the Company’s assets are pledged to secure the credit facility. Borrowings under the 2021 Credit Agreement bear interest at the Company’s option of the prime rate ( 3.25% on December 31, 2021) plus a margin ranging from 0.00% to 1.00% or one-month LIBOR (0.10% o n December 31, 2021) plus a margin ranging from 1.00% to 2.00%. The Company incurs an annual commitment fee of 0.15% to 0.20% on the unused portion of the line of credit. The additional margin amount and annual commitment fee are dependent on the level of outstanding borrowings. As of December 31, 2021, the Company had $199.8 million of unused borrowing capacity. The Company is required to comply with various financial covenants under the 2021 Credit Agreement. Specifically, the Company is required to maintain a ratio of earnings before interest, taxes, depreciation, and amortization (“EBITDA”) plus stock compensation to interest expense for the previous four consecutive fiscal quarters of not less than 3.50 to 1.00, a ratio of indebtedness less the sum of all unsecured indebtedness, on a consolidated basis and without duplication, less all unrestricted cash and cash equivalents not to exceed $50,000,000 to EBITDA plus stock compensation of not more than 2.50 to 1.00, and a ratio of indebtedness less all unrestricted cash and cash equivalents not to exceed $50,000,000 to EBITDA plus stock compensation (“Consolidated Total Net Leverage Ratio”) of not more than 5.00 to 1.00. Additionally, the 2021 Credit Agreement currently restricts the payment of dividends that would result in a pro-forma Consolidated Total Net Leverage Ratio of more than 3.50 to 1.00. At December 31, 2021, the Company was in compliance with all covenants under the 2021 Credit Agreement. Convertible Senior Notes due 2026 On November 9, 2021, the Company i ssued $380.0 million aggregate principal amount of the 2026 Notes in a private placement to qualified institutional buyers pursuant to an exemption from registration provided by Section 4(a)(2) and Rule 144A under the Securities Act of 1933, as amended (the “Securities Act”). The net proceeds from the offerings, after deducting the initial purchasers’ discount and issuance costs of $10.7 million, were $369.3 million. The Company used (i) $311.5 million of the net proceeds and 1,640,152 shares of the Company’s common stock to partially repurchase the 2025 Notes (as defined and described below), and (ii) $42.7 million of the net proceeds to fund the cost of entering into the 2026 Notes Hedges (as defined below), after such cost was partially offset by the proceeds that the Company received from entering into the 2026 Notes Warrants (as defined below). The remaining proceeds of $15.1 million will be used for working capital or other general corporate purposes. The 2026 Notes bear interest at a rate of 0.125% per year. Interest is payable in cash on May 15 and November 15 of each year, with the first payment to be made on May 15, 2022. The 2026 Notes mature on November 15, 2026 unless earlier converted, redeemed or repurchased in accordance with their terms prior to such date. The initial conversion rate is 5.2100 shares of the Company’s common stock per $1,000 principal amount of 2026 Notes, which is equivalent to an initial conversion price of approximately $191.94 per share of common stock. After consideration of the 2026 Notes Hedges and 2026 Notes Warrants, the conversion rate is effectively hedged to a price of $295.29 per shar e of common stock. The conversion rate, and thus the conversion price, may be adjusted under certain circumstances as described in the indenture governing the 2026 Notes (the “2026 Indenture”). The Company may settle conversions by paying or delivering, as applicable, cash, shares of its common stock or a combination of cash and shares of its common stock, at the Company’s election, based on the applicable conversion rate(s). If a “make-whole fundamental change” (as defined in the 2026 Indenture) occurs, then the Company will in certain circumstances increase the conversion rate for a specified period of time. The Company’s intent is to settle the principal amount of the 2026 Notes in cash upon conversion. In accordance with accounting for debt with conversions and other options, the Company bifurcated the principal amount of the 2026 Notes into liability and equity components. The initial liability component of the 2026 Notes was valued at $313.8 million based on th e cont ractual cash flows discounted at an appropriate comparable market non-convertible debt borrowing rate at the date of issuance of 4.0%. This rate was based on the Company’s estimated rate for a similar liability with the same maturity, but without the conversion option. The equity component representing the conversion option and calculated as the residual amount of the proceeds was recorded as an increase in additional paid-in capital within stockholders’ equity of $66.2 million, partially offset by the associated deferred tax effect of $16.9 million. Th e amount recorded within additional paid-in capital i s not to be remeasured as long as it continues to meet the conditions for equity classification. The resulting debt discount of $66.2 million is being amortized to interest expense using the effective interest method with an effective interest rate of 4.0% over t he period from the issuance date through the contractual maturity date of November 15, 2026. The Company utilizes the treasury stock method to calculate the effects of the 2026 Notes on diluted earnings per share. Issuance costs totaling $10.7 million were allocated pro rata based on the relative fair values of the liability and equity components. Issuance co sts of $8.8 million attri butable to the liability component were recorded as a direct deduction from the carrying value of the 2026 Notes and are being amortized to interest expense using the effective interest method over the term of the 2026 Notes. Issuance co sts of $1.9 million attributable to the equity component were recorded as a charge to additional paid-in capital within stockholders’ equity, partially offset by the associated deferred tax effect of $0.5 million. Convertible Senior Notes due 2025 On August 14, 2020, the Company issued $230.0 million aggregate principal amount of the 2025 Notes in a private placement to qualified institutional buyers pursuant to an exemption from registration provided by Section 4(a)(2) and Rule 144A under the Securities Act. The net proceeds from the offerings, after deducting the initial purchasers’ discount and issuance costs of $7.3 million, were $222.7 million. The Company used (i) $172.0 million of the net proceeds to partially repurchase the 2023 Notes (as defined and described below), and (ii) $26.7 million of the net proceeds to fund the cost of entering into the 2025 Notes Hedges (as defined below), after such cost was partially offset by the proceeds that the Company received from entering into the 2025 Notes Warrants (as defined below). The remaining proceeds of $24.0 million were used for working capital or other general corporate purposes. The 2025 Notes bear interest at a rate of 1.250% per year. Interest is payable in cash on February 1 and August 1 of each year, with the first payment made on February 1, 2021. The 2025 Notes mature on August 1, 2025 unless earlier converted, redeemed or repurchased in accordance with their terms prior to such date. The initial conversion rate is 19.3538 shares of the Company’s common stock per $1,000 principal amount of 2025 Notes, which is equivalent to an initial conversion price of approximately $51.67 per share of common stock. After consideration of the 2025 Notes Hedges and 2025 Notes Warrants, the conversion rate is effectively hedged to a price of $81.05 per share of common stock. The conversion rate, and thus the conversion price, may be adjusted under certain circumstances as described in the indenture governing the 2025 Notes (the “2025 Indenture”). The Company may settle conversions by paying or delivering, as applicable, cash, shares of its common stock or a combination of cash and shares of its common stock, at the Company’s election, based on the applicable conversion rate(s). If a “make-whole fundamental change” (as defined in the 2025 Indenture) occurs, then the Company will in certain circu mstances increase the conversion rate for a specified period of time. The Company’s intent is to settle the principal amount of the 2025 Notes in cash upon conversion. In accordance with accounting for debt with conversions and other options, the Company bifurcated the principal amount of the 2025 Notes into liability and equity components. The initial liability component of the 2025 Notes was valued at $181.1 million based on the contractual cash flows discounted at an appropriate comparable market non-convertible debt borrowing rate at the date of issuance of 6.3%. The equity component representing the conversion option and calculated as the residual amount of the proceeds was recorded as an increase in additional paid-in capital within stockholders’ equity of $48.9 million, partially offset by the associated deferred tax effect of $12.6 million. The amount recorded within additional paid-in capital is not to be remeasured as long as it continues to meet the conditions for equity classification. The resulting debt discount of $48.9 million is amortized to interest expense using the effective interest method with an effective interest rate of 6.3% over the period from the issuance date through the contractual maturity date of August 1, 2025. The Company utilizes the treasury stock method to calculate the effects of the 2025 Notes on diluted earnings per share. Issuance costs totaling $7.3 million were allocated pro rata based on the relative fair values of the liability and equity components. Issuance costs of $5.7 million attributable to the liability component were recorded as a direct deduction from the carrying value of the 2025 Notes and are amortized to interest expense using the effective interest method over the term of the 2025 Notes. Issuance costs of $1.6 million attributable to the equity component were recorded as a charge to additional paid-in capital within stockholders’ equity, partially offset by the associated deferred tax effect of $0.4 million. In November and December 2021, the Company repurchased a portion of the outstanding 2025 Notes through individual, privately negotiated transactions (the “2025 Notes Partial Repurchase”), leaving 2025 Notes with aggregate principal amount of $23.3 million outstanding as of December 31, 2021. The Company used $311.5 million of the net proceeds from the 2026 Notes issuance in November 2021, 1,640,152 shares of the Company’s common stock, and $44.0 million of additional cash in December 2021 to complete the 2025 Notes Partial Repurchase, of which a total of $197.4 million and $400.5 million were allocated to the liability and equity components of the 2025 Notes, respectively, and $0.7 million was related to the payment of interest. The amount allocated to equity was partially offset by the associated deferred tax effect of $2.0 million . The consideration allocated to the liability component was based on the fair value of the liability component utilizing an effective discount rate of approximately 3.5%. This rate was based on the Company’s estimated rate for a similar liability with the same maturity, but without the conversion option. The consideration allocated to the equity component was calculated by deducting the fair value of the liability component from the aggregate consideration, excluding interest. The Company subsequently compared the allocated consideration with the carrying value of the liability component to record a loss on extinguishment of $21.9 million, which includes the proportionate amounts of unamortized debt discount and the remaining unamortized debt issuance costs of $3.8 million. A $6.8 million inducement charge representing the difference between the fair value of the consideration delivered to the holders of the repurchased 2025 Notes and the fair value of the consideration issuable under the original conversion terms is included in “Loss on extinguishment of debt” in the accompanying Consolidated Statements of Operations. Convertible Senior Notes due 2023 On September 11, 2018, the Company issued $143.8 million aggregate principal amount of 2.375% Convertible Senior Notes Due 2023 (the “2023 Notes”) in a private placement to qualified institutional purchasers pursuant to an exemption from registration provided by Section 4(a)(2) and Rule 144A under the Securities Act. The net proceeds from the offerings, after deducting the initial purchasers’ discount and issuance costs of $4.4 million, were $139.4 million. In August and December 2020, the Company repurchased a portion of the outstanding 2023 Notes through individual, privately negotiated trans actions (the “2023 Notes Partial Repurchase”), leaving 2023 Notes with aggregate principal amount of $5.1 million outstanding as of December 31, 2020. The Company used $172.0 million of the net proceeds from the 2025 Notes issuance in August 2020 and $9.7 million of additional cash in December 2020 to complete the 2023 Notes Partial Repurchase, of which a total of $127.7 million and $52.7 million were allocated to the liability and equity components of the 2023 Notes, respectively, and $1.3 million was related to the payment of interest. The cash consideration allocated to the liability component was based on the fair value of the liability component utilizing an effective discount rate of approximately 5.0% . This rate was based on the Company’s estimated rate for a similar liability with the same maturity, but without the conversion option. The cash consideration allocated to the equity component was calculated by deducting the fair value of the liability component and interest payment from the aggregate cash consideration. The $4.5 million loss on extinguishment was subsequently determined by comparing the allocated cash consideration with the carrying value of the liability component, which includes the proportionate amounts of unamortized debt discount and the remaining unamortized debt issuance costs of $2.4 million. I n August 2021, the Company repurchased the remainder of the outstanding 2023 Notes through individual, privately negotiated transactions (the “Final 2023 Notes Repurchase”). The Company used $13.9 million of cash to complete the Final 2023 Notes Repurchase, of which $4.9 million and $9.0 million were allocated to the liability and equity components of the 2023 Notes, respectively. The amount allocated to equity was partially offset by the associated deferred tax effect of $0.4 million . The Final 2023 Notes Repurchase resulted in a $0.3 million loss on extinguishment during the twelve months ended December 31, 2021, which includes the proportionate amounts of unamortized debt discount and the remaining unamortized debt issuance costs of $0.1 million. The 2023 Notes bore interest at a rate of 2.375% per year. Interest was payable in cash on March 15 and September 15 of each year. The 2023 Notes were scheduled to mature on September 15, 2023 , unless earlier converted, redeemed or repurchased in accordance with their terms prior to such date. The initial conversion rate was 26.5957 shares of the Company’s common stock per $1,000 principal amount of 2023 Notes, which was equivalent to an initial conversion price of approximately $37.60 per share of common stock. After consideration of the 2023 Notes Hedges (as defined below) and 2023 Notes Warrants (as defined below), the conversion rate was effectively hedged to a price of $46.62 per share of common stock. The conversion rate, and thus the conversion price, could have been adjusted under certain circumstances as described in the indenture governing the 2023 Notes (the “2023 Indenture”). The Company could have settled conversions by paying or delivering, as applicable, cash, shares of its common stock or a combination of cash and shares of its common stock, at the Company’s election, based on the applicable conversion rate(s). If a “make-whole fundamental change” (as defined in the 2023 Indenture) had occurred, then the Company would have in certain circumstances increased the conversion rate for a specified period of time. Other Terms of the Notes The 2025 Notes and 2026 Notes may be converted at the holder’s option prior to the close of business on the business day immediately preceding August 1, 2025 for the 2025 Notes and November 15, 2026 for the 2026 Notes, but only under the following circumstances: • during any calendar quarter commencing after the calendar quarter ending on September 30, 2020 for the 2025 Notes and December 31, 2021 for the 2026 Notes, if the last reported sale price per share of the Company’s common stock exceeds 130% of the applicable conversion price for each of at least 20 trading days during the 30 consecutive trading days ending on, and including, the last trading day of the immediately preceding calendar quarter; • during the five consecutive business days immediately after any 10 consecutive trading day period (such 10 consecutive trading day period, the “measurement period”) in which the trading price per $1,000 principal amount of notes for each trading day of the measurement period was less than 98% of the product of the last reported sale price per share of the Company’s common stock on such trading day and the applicable conversion rate on such trading day; • upon the occurrence of certain corporate events or distributions on the Company’s common stock described in the 2025 Indenture and 2026 Indenture; and • at any time from, and including, February 3, 2025 for 2025 Notes and May 15, 2026 for 2026 Notes, until the close of business on the second scheduled trading day immediately before the maturity date for the 2025 Notes and 2026 Notes. The Company may not redeem the 2025 Notes and 2026 Notes at its option before maturity. If a “fundamental change” (as defined in the 2025 Indenture and 2026 Indenture) occurs, then, except as described in the 2025 Indenture and 2026 Indenture, noteholders may require the Company to repurchase their 2025 Notes and 2026 Notes at a cash repurchase price equal to the principal amount of the 2025 Notes and 2026 Notes to be repurchased, plus accrued and unpaid interest, if any. During the year ended December 31, 2021, the conditional conversion features of the 2025 Notes were triggered as the last reported sale price of the Company's common stock was greater than or equal to 130% of the conversion price for at least 20 trading days in the period of 30 consecutive trading days ending on December 31, 2021 (the last trading day of the fiscal quarter). Therefore, the 2025 Notes are currently convertible, in whole or in part, at the option of the holder during the quarter ending March 31, 2022. Whether the 2025 Notes will be convertible following such period will depend on the continued satisfaction of this condition or another conversion condition in the future. Since the Company has the election of repaying the 2025 Notes in cash, shares of the Company’s common stock, or a combination of both, the Company continued to classify the liability component of the 2025 Notes as long-term debt on the Consolidated Balance Sheet as of December 31, 2021. As of the date of this filing, none of the holders of the 2025 Notes have submitted requests for conversion. As of December 31, 2021, none of the conditions permitting holders to convert their 2026 Notes had been satisfied and no shares of the Company’s common stock had been issued in connection with any conversions of the 2026 Notes. Based on the closing price of the Company's common stock of $129.29 per share on December 31, 2021, the conversion value of the 2026 Notes was less than the principal amount of the 2026 Notes outstanding on a per note basis, and the conversion value of the 2025 Notes was greater than the principal amount of the 2025 Notes outstanding on a per note basis. The liability components of the 2023 Notes, 2025 Notes, and 2026 Notes consisted of the following (in thousands): December 31, 2021 Liability component: 2026 Notes 2025 Notes 2023 Notes Principal $ 380,000 $ 23,293 $ — Less: Unamortized debt discount (64,413) (3,724) — Unamortized debt issuance costs (8,613) (417) — Net carrying amount $ 306,974 $ 19,152 $ — December 31, 2020 Liability component: 2026 Notes 2025 Notes 2023 Notes Principal $ — $ 230,000 $ 5,090 Less: Unamortized debt discount — (45,690) (426) Unamortized debt issuance costs — (5,271) (79) Net carrying amount $ — $ 179,039 $ 4,585 Interest expense for the years ended December 31, 2021, 2020 and 2019 related to the Notes consisted of the following (in thousands): 2026 Notes Year Ended December 31, 2021 2020 2019 Coupon interest $ 69 $ — $ — Amortization of debt discount 1,738 — — Amortization of debt issuance costs 260 — — Total interest expense recognized $ 2,067 $ — $ — 2025 Notes Year Ended December 31, 2021 2020 2019 Coupon interest $ 2,521 $ 1,094 $ — Amortization of debt discount 7,780 3,254 — Amortization of debt issuance costs 1,008 438 — Total interest expense recognized $ 11,309 $ 4,786 $ — 2023 Notes Year Ended December 31, 2021 2020 2019 Coupon interest $ 75 $ 2,200 $ 3,414 Amortization of debt discount 91 2,561 3,773 Amortization of debt issuance costs 18 533 824 Total interest expense recognized $ 184 $ 5,294 $ 8,011 Convertible Notes Hedges In connection with the issuance of the 2026 Notes, 2025 Notes, and 2023 Notes, the Company entered into privately negotiated convertible note hedge transactions (the “2026 Notes Hedges”, the “2025 Notes Hedges”, and the “2023 Notes Hedges,” respectively, and together, the “Notes Hedges”) with certain of the initial purchasers or their respective affiliates and/or other financial institutions (the “Opt ion Counterparties”). The 2026 Notes Hedges provide the Company with the option to acquire, on a net settlement basis, approximately 2.0 million shares of common stock at a strike price of $191.94, w hich is equal to the number of shares of common stock that notionally underlie the 2026 Notes and correspond to the conversion price of the 2026 Notes. The 2025 Notes Hedges provide the Company with the option to acquire, on a net settlement basis, approximately 4.5 million shares of common stock at a strike price of $51.67, which is equal to the number of shares of common stock that notionally underlie the 2025 Notes and correspond to the conversion price of the 2025 Notes. If the Company elects cash settlement and exercises the Notes Hedges, the aggregate amount of cash received from the Option Counterparties will cover the aggregate amount of cash that the Company would be required to pay to the holders of the Notes, less the principal amount thereof. The Notes Hedges do not meet the criteria for separate accounting as a derivative as they are indexed to the Company’s stock and are accounted for as freestanding financial instruments. Upon initial purchase, the 2025 Notes Hedges and 2026 Notes Hedges were recorded as a reduction in additional paid-in capital within stockholders’ equity of $48.9 million and $66.1 million, respectively, partially offset by the deferred tax effect of $12.6 million and $16.8 million, respectively. In August and November 2020, in connection with the 2023 Notes Partial Repurchase, the Company terminated 2023 Notes Hedges corresponding to approximately 3.7 million shares for cash proceeds of $50.1 million . The proceeds were recorded as an increase to additional paid-in capital within stockholders' equity. In August 2021, in connection with the Final 2023 Notes Repurchase, the Company terminated the remainder of the 2023 Notes Hedges corresponding to approximately 0.1 million shares for cash proceeds of $6.1 million . The proceeds were recorded as an increase to additional paid-in capital within stockholders' equity. In November and December 2021, in connection with the 2025 Notes Partial Repurchase, the Company partially repurchased 2025 Notes Hedges corresponding to approximately 4.0 million shares for cash proceeds of $375.2 million. The proceeds were recorded as an increase to additional paid-in capital within stockholders’ equity. Convertible Notes Warrants In connection with the issuance of the 2026 Notes, 2025 Notes, and 2023 Notes, the Company also sold net-share-settled warrants (the “2026 Notes Warrants”, the “2025 Notes Warrants”, and the “2023 Notes Warrants,” respectively, and together, the “Notes Warrants”) in privately negotiated transactions with the Option Counterparties. The strike price of the 2026 Notes Warrants, 2025 Notes Warrants, and 2023 Notes Warrants was appr oximately $295.29, $81.05, and $46.62 per share, respectively, and is subject to certain adjustments under the terms of their respective Notes Warrants. As a result of the 2026 Notes Warrants, 2025 Notes Warrants, and 2023 Notes Warrants and related transactions, the Company is required to recognize incremental dilution of earnings per share to the extent the average share pr ice for any fiscal quarter is over $295.29 for the 2026 Notes Warrants, $81.05 for the 2025 Notes Warrants, and $46.62 for the 2023 Notes Warrants. The 2026 Notes Warrants and the 2025 Notes Warrants expire over a period of 80 trading days commencing on February 15, 2027 and over a period of 100 trading days commencing on November 1, 2025, respectively, and may be settled in net shares of common stock or net cash at the Company’s election. Upon initial sale, the 2025 Notes Warrants and the 2026 Notes Warrants were recorded as an increase in additional paid-in capital within stockholders’ equity of $22.2 million and $23.4 million , respectively. In August and November 2020, in connection with the 2023 Notes Partial Repurchase, the Company repurchased a portion of the 2023 Notes Warrants through a cash payment of $43.0 million |