Annual report [Section 13 and 15(d), not S-K Item 405]

Debt - Additional Information (Details)

v3.25.0.1
Debt - Additional Information (Details)
$ in Thousands
12 Months Ended
Dec. 20, 2022
Dec. 31, 2024
USD ($)
Dec. 31, 2023
USD ($)
Dec. 31, 2022
USD ($)
Mar. 26, 2024
USD ($)
Jan. 31, 2024
USD ($)
Sites
Nov. 21, 2023
USD ($)
Sep. 28, 2023
USD ($)
Oct. 21, 2021
USD ($)
Dec. 21, 2016
USD ($)
Debt Instrument [Line Items]                    
Line of Credit Facility, Current Borrowing Capacity   $ 375,951 $ 332,027              
Amortization Of Financing Costs And Discounts   2,669 2,518 $ 2,514            
Financing Costs [Member]                    
Debt Instrument [Line Items]                    
Payments of Debt Issuance Costs   50 6,300              
Debt Issuance Costs, Gross   16,400 16,600              
Accumulated Amortization, Debt Issuance Costs   5,900 3,500              
Deferred Finance Costs Recorded as Asset   300 400              
Amortization Of Financing Costs And Discounts   $ 2,700 $ 2,500 $ 2,500            
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, Current Borrowing Capacity   $ 800,000                
Line of Credit Facility, Maximum Borrowing Capacity   $ 1,000,000                
Line of credit         $ 36,500          
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%                
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.                
Debt instrument face amount           $ 5,100        
Number of real estate | Sites           50        
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   $ 49,500         $ 44,400     $ 35,000