Annual report pursuant to Section 13 and 15(d)

Debt - Additional Information (Details)

v3.24.0.1
Debt - Additional Information (Details)
$ in Thousands
12 Months Ended
Dec. 20, 2022
Dec. 09, 2022
Dec. 31, 2023
USD ($)
Dec. 31, 2022
USD ($)
Dec. 31, 2021
USD ($)
Jan. 31, 2024
USD ($)
Nov. 21, 2023
USD ($)
Sep. 28, 2023
USD ($)
Sites
May 05, 2023
USD ($)
Oct. 21, 2021
USD ($)
Dec. 21, 2016
USD ($)
Debt Instrument [Line Items]                      
Credit agreement amendment description     Prior to the Eighth Amendment, the PNC Line of Credit bore interest, as elected by GPM at: (a) LIBOR plus a margin of 1.75% or (b) a rate per annum equal to the alternate base rate plus a margin of 0.5%, which was equal to the greatest of (i) the PNC base rate, (ii) the overnight bank funding rate plus 0.5%, and (iii) LIBOR plus 1.0%, subject to the definitions set in the agreement. Every quarter, the LIBOR margin rate and the alternate base rate margin rate were updated based on the quarterly average undrawn availability of the PNC Line of Credit.                
Line of Credit Facility, Current Borrowing Capacity     $ 332,027 $ 256,430              
Amortization Of Financing Costs And Discounts     2,518 2,514 $ 9,304            
Financing Costs [Member]                      
Debt Instrument [Line Items]                      
Payments of Debt Issuance Costs     6,300 600              
Debt Issuance Costs, Gross     16,600 14,100              
Accumulated Amortization, Debt Issuance Costs     3,500 4,800              
Deferred Finance Costs Recorded as Asset     400 500              
Amortization Of Financing Costs And Discounts     $ 2,500 2,500 $ 9,300            
Senior Notes [Member]                      
Debt Instrument [Line Items]                      
Debt instrument, interest rate, stated percentage     5.125%             5.125%  
Debt instrument face amount     $ 450,000                
Purchase Agreement Description     On October 21, 2021, the Company completed a private offering of $450 million aggregate principal amount of 5.125% Senior Notes due 2029 (the “Senior Notes”), pursuant to a note purchase agreement dated October 14, 2021, by and among the Company, certain of the Company’s wholly owned domestic subsidiaries (the “Guarantors”), and BofA Securities, Inc., as representative of the several initial purchasers named therein. The Senior Notes are guaranteed, on an unsecured senior basis, by all of the Guarantors.                
Senior Notes, Noncurrent                   $ 450,000  
Revolving Credit Facility [Member] | GPM [Member]                      
Debt Instrument [Line Items]                      
Line of Credit Facility, Maximum Borrowing Capacity                 $ 1,000,000    
Capital One Credit Facility [Member]                      
Debt Instrument [Line Items]                      
Credit agreement amendment description   On December 9, 2022, GPMP entered into an amendment to the Capital One Line of Credit to replace LIBOR with SOFR as an interest rate benchmark. Prior to the amendment, the Capital One Line of Credit bore interest, as elected by GPMP at: (a) LIBOR plus a margin of 2.25% to 3.25% or (b) a rate per annum equal to base rate plus a margin of 1.25% to 2.25%, which was equal to the greatest of (i) Capital One’s prime rate, (ii) the one-month LIBOR plus 1.0%, and (iii) the federal funds rate plus 0.5%, subject to the definitions set in the agreement. The margin was determined according to a formula in the Capital One Line of Credit that depends on GPMP’s leverage.                  
Capital One Credit Facility [Member] | Federal Funds Rate [Member]                      
Debt Instrument [Line Items]                      
Debt instrument, interest rate, stated percentage   0.50%                  
Capital One Credit Facility [Member] | LIBOR [Member]                      
Debt Instrument [Line Items]                      
Debt instrument, interest rate, stated percentage   1.00%                  
Maximum [Member] | Revolving Credit Facility [Member] | GPM [Member]                      
Debt Instrument [Line Items]                      
Line of Credit Facility, Current Borrowing Capacity                 $ 800,000    
Maximum [Member] | Capital One Credit Facility [Member]                      
Debt Instrument [Line Items]                      
Debt floating rate   3.25%                  
Maximum [Member] | Capital One Credit Facility [Member] | Base Rate [Member]                      
Debt Instrument [Line Items]                      
Debt floating rate   2.25%                  
Minimum [Member] | Revolving Credit Facility [Member] | GPM [Member]                      
Debt Instrument [Line Items]                      
Line of Credit Facility, Current Borrowing Capacity       $ 500,000              
Minimum [Member] | Capital One Credit Facility [Member]                      
Debt Instrument [Line Items]                      
Debt floating rate   2.25%                  
Minimum [Member] | Capital One Credit Facility [Member] | Base Rate [Member]                      
Debt Instrument [Line Items]                      
Debt floating rate   1.25%                  
PNC Credit Line Agreement [Member]                      
Debt Instrument [Line Items]                      
Credit agreement amendment description On December 20, 2022, GPM entered into an eighth amendment to the PNC Credit Agreement (the “Eighth Amendment”) which effected the following primary changes: (1) extended the maturity date by five years to December 22, 2027; (2) replaced LIBOR with SOFR (as defined in the Eighth Amendment) as an interest rate benchmark, including the replacement of LIBOR Rate Loans, with interest periods of one, two and three months, with adjusted Term SOFR Rate Loans (as defined in the Eighth Amendment), with interest periods of one and three months; (3) revised certain negative covenants to provide additional flexibility, including increased fixed dollar baskets and introduction of basket increases based on average undrawn availability; (4) added cardlock receivables as a portion of the borrowing base under certain circumstances; and (5) increased certain thresholds for events of default. The Company did not incur additional debt or receive any proceeds in connection with the Eighth Amendment.                    
PNC Credit Line Agreement [Member] | Minimum [Member]                      
Debt Instrument [Line Items]                      
Covenant threshold     10.00%                
GPM PNC Term Loan [Member]                      
Debt Instrument [Line Items]                      
Debt instrument, principal payment     $ 32,400                
Agreement with M T Bank [Member]                      
Debt Instrument [Line Items]                      
Credit agreement amendment description     On September 28, 2023, GPM amended its credit agreement with M&T Bank (the “M&T Credit Agreement”) to increase the line of credit for purchases of equipment thereunder from $20.0 million to $45.0 million, which line may be borrowed in tranches until September 28, 2026.                
Number of real estate | Sites               43      
Agreement with M T Bank [Member] | GPM [Member]                      
Debt Instrument [Line Items]                      
Line of Credit Facility, Capacity Available for Trade Purchases               $ 45,000     $ 20,000
Agreement with M T Bank [Member] | GPM [Member] | Real Estate Loan [Member]                      
Debt Instrument [Line Items]                      
Debt instrument face amount             $ 44,400       $ 35,000
Agreement with M T Bank [Member] | Subsequent Event [Member]                      
Debt Instrument [Line Items]                      
Debt instrument face amount           $ 5,100