| Commitments and Contingencies - Narrative (Details)
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 2 Months Ended | 3 Months Ended | 12 Months Ended |  |  |  |  |  |  |  | 
| Feb. 15, 2024  USD ($) | Jan. 18, 2024  USD ($) | Dec. 18, 2023  USD ($) | Dec. 01, 2023  USD ($) | Nov. 01, 2023  USD ($) | Oct. 25, 2023  USD ($) | Oct. 16, 2023  USD ($) | Oct. 10, 2023  USD ($) | Sep. 22, 2023  USD ($) | Aug. 22, 2023  USD ($) | Jul. 21, 2023  USD ($) | Jun. 14, 2023  USD ($) | Jun. 08, 2023  USD ($) | Mar. 27, 2023  USD ($) | Mar. 20, 2023  USD ($) | Jan. 20, 2023  USD ($) | Jan. 18, 2023  USD ($) | Dec. 13, 2022  USD ($) | Dec. 01, 2022  USD ($) | Nov. 14, 2022  USD ($)  lawsuit | Aug. 01, 2022  USD ($) | Aug. 02, 2021  USD ($) | May 13, 2021  USD ($) | Mar. 25, 2020  USD ($) | Mar. 01, 2024  USD ($) | Dec. 01, 2023  USD ($) | Sep. 30, 2021  USD ($) | Mar. 31, 2021  USD ($) | Dec. 31, 2023  USD ($)  lawsuit | Dec. 31, 2022  USD ($) | Dec. 31, 2021  USD ($) | Dec. 21, 2022  USD ($) | Nov. 21, 2022  USD ($) | Sep. 21, 2021  USD ($) | Jul. 23, 2021  USD ($) | May 26, 2021  USD ($)  contractComplianceIssue | Jan. 21, 2020  USD ($) | Sep. 10, 2019  individual  defendant | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Unrecorded unconditional purchase obligation |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 0 |  |  |  |  |  |  |  |  |  | 
| Recorded unconditional purchase obligation |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 0 |  |  |  |  |  |  |  |  |  | 
| Insurance deductible |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 300,000 | $ 100,000 |  |  |  |  |  |  |  |  | 
| Insurance aggregate stop loss |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 5,400,000 | 5,400,000 |  |  |  |  |  |  |  |  | 
| Workers' compensation liability, current |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 1,300,000 | 1,500,000 |  |  |  |  |  |  |  |  | 
| Workers compensation and auto claims insurance, directors and officers liability |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 1,000,000 | 1,000,000 |  |  |  |  |  |  |  |  | 
| Workers compensation and auto claims insurance, directors and officers liability aggregate limit |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 10,000,000 | 10,000,000 |  |  |  |  |  |  |  |  | 
| Workers compensation and auto claims insurance, aggregate stop loss per claim basis |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 200,000 |  |  |  |  |  |  |  |  |  | 
| Workers compensation and auto claims insurance, aggregate stop loss per calendar year |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 5,800,000 |  |  |  |  |  |  |  |  |  | 
| Insurance reserves |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 1,500,000 | 1,500,000 |  |  |  |  |  |  |  |  | 
| Warranty accrual, term |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 1 year |  |  |  |  |  |  |  |  |  | 
| Warranty accrual |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 0 | 0 |  |  |  |  |  |  |  |  | 
| Product warranty expense |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 0 | 0 | $ 0 |  |  |  |  |  |  |  | 
| Commitments and contingencies |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Recovery amount in undisputed claims |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 61,700,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Number of FEMA contract compliance issues raised | contractComplianceIssue |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 2 |  |  | 
| Litigation settlement, expense |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 379,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 5,400,000 |  |  |  |  |  |  |  | 
| Proceeds from financing transaction, net |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 46,120,000 | 0 | 0 |  |  |  |  |  |  |  | 
| Revenues |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 309,492,000 | 362,086,000 | 228,962,000 |  |  |  |  |  |  |  | 
| Change in provision for expected credit losses |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 47,000 | 3,550,000 | 41,873,000 |  |  |  |  |  |  |  | 
| Legal settlement, amount |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 9,250,000 |  | $ 9,250,000 | $ 6,500,000 |  |  |  |  |  |  |  |  | 25,000,000 |  |  |  |  |  |  |  | 
| FEMA Official |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Fine issued for indictment |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 15,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Cobra Acquisitions |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Invoices amount approved |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 233,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Amount awarded |  |  |  |  |  |  |  |  |  |  |  |  |  | 210,000,000 |  |  | $ 13,400,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Litigation settlement, amount to be received |  |  |  |  |  |  |  |  |  |  | $ 72,000,000 |  |  | 99,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Proceeds from legal settlements |  |  |  | $ 46,100,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Proceeds from financing transaction, net |  |  |  | 46,100,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Number of lawsuits pending | lawsuit |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 13 |  |  |  |  |  |  |  |  |  | 
| Number of claims judgment issued and under appeal | lawsuit |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 1 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Number of other individuals indicted | individual |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 2 | 
| Number of other individuals indicted, charges dismissed | defendant |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 2 | 
| Cobra Acquisitions | Former President |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Fine issued for indictment |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 25,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Puerto Rico Electric Power Authority (PREPA) |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Litigation settlement, amount to be received |  |  |  |  |  |  |  |  |  |  |  |  | $ 99,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Cash paid for settlement |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 70,400,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Construction exercise taxes |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 9,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Puerto Rico Electric Power Authority (PREPA) | Subsequent Event |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Litigation amount in dispute |  | $ 70,400,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Withheld payments revoked | $ 9,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Number of days to request reconsideration | 15 days |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Minimum |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Litigation settlement, interest-bearing, interest rate |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 6.00% |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Maximum |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Litigation settlement, interest-bearing, interest rate |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 12.00% |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Puerto Rico Electric Power Authority (PREPA) |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Interest charged on accounts receivable |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 197,500,000 | 152,000,000 |  |  |  |  |  |  |  |  | 
| Accounts receivable, contract costs, amount expected to be authorized |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 68,100,000 | $ 5,600,000 |  | $ 47,000,000 | $ 47,000,000 |  |  | 
| Staffing costs |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 24,400,000 |  |  |  | 
| Percent of federal funded portion for determination memorandum |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 100.00% |  |  |  |  |  | 
| Percent of federal cost share portion for determination memorandum |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 90.00% |  |  |  |  |  |  | 
| Puerto Rico Electric Power Authority (PREPA) | Cobra Acquisitions |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Debt instrument, payment pending from third party |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 204,800,000 |  |  |  |  |  |  |  |  |  | 
| Proceeds from legal settlements |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 22,200,000 |  |  |  |  |  |  |  |  |  | 
| Litigation amount in dispute |  |  |  |  | $ 1,500,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Proceeds from financing transaction, net |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 8,600,000 |  |  |  |  |  |  |  |  |  |  |  |  | 
| Loss contingency, damages awarded, value |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 8,500,000 |  |  |  |  | $ 9,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Puerto Rico Electric Power Authority (PREPA) | Cobra Acquisitions And SPCP Group | Subsequent Event |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Proceeds from financing transaction, net |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 64,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Gulfport | Gulfport |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Unliquidated damages |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 46,400,000 |  |  |  |  |  |  |  |  |  |  | 
| Revenues |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | (27,100,000) |  |  |  |  |  |  |  |  |  |  | 
| Change in provision for expected credit losses |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | (3,800,000) |  |  |  |  |  |  |  |  |  |  | 
| Gulfport | Gulfport | Pre-Petition Products And Services |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Accounts receivable, after allowance for credit loss, current |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | (6,100,000) |  |  |  |  |  |  |  |  |  |  | 
| Gulfport | Gulfport | Pre-Petition Receivables |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Accounts receivable, after allowance for credit loss, current |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | (500,000) |  |  |  |  |  |  |  |  |  |  | 
| Gulfport | Muskie and Gulfport |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Change in provision for expected credit losses |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 200,000 |  |  |  | 200,000 |  |  |  |  |  |  |  | 
| General unsecured claim |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 3,100,000 |  |  |  |  | 
| Gulfport | Stingray Pressure Pumping |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Unliquidated damages |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 37,900,000 |  |  |  |  |  |  |  |  |  |  | 
| Change in provision for expected credit losses |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 2,900,000 |  |  | 31,000,000 |  |  |  |  |  |  |  | 
| Other expenses |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ (1,300,000) |  |  |  |  |  |  |  | 
| Mastec Renewables Puerto Rico, LLC |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Contracts amount |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 500,000,000 |  | 
| Foreman Electric Services, Inc. |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Loss contingency, damages awarded, value |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 250,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Cobra Acquisitions | Puerto Rico Electric Power Authority (PREPA) |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Accounts receivable, contract costs, amount expected to be authorized |  |  |  |  |  |  | $ 54,400,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Litigation settlement, amount to be received |  |  |  |  | $ 82,400,000 |  |  |  |  |  |  |  |  | $ 111,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Cash paid for settlement |  |  |  |  |  | $ 1,200,000 | 1,700,000 | $ 5,700,000 | $ 800,000 | $ 2,000,000 | $ 8,400,000 | $ 10,800,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Reimbursement remaining amount |  |  |  |  |  |  | $ 81,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Construction exercise taxes |  |  | $ 9,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| SPCP Group | Cobra Acquisitions |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Accounts receivable, contract costs, amount expected to be authorized |  |  |  | $ 54,400,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 54,400,000 |  |  |  |  |  |  |  |  |  |  |  |  | 
| SPCP Group | Cobra Acquisitions | Subsequent Event |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Proceeds from financing transaction, net |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 9,600,000 |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Performance And Payment Bond |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Commitments and contingencies |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 10,000,000 | 8,600,000 |  |  |  |  |  |  |  |  | 
| Estimated cost to complete the project |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 2,500,000 | 1,400,000 |  |  |  |  |  |  |  |  | 
| Outstanding Bid Bond |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Guarantor Obligations [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Commitments and contingencies |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 200,000 | $ 0 |  |  |  |  |  |  |  |  |