XML 89 R78.htm IDEA: XBRL DOCUMENT
v3.23.2

Fair Value of Financial Instruments - Summary of Financial Instruments Measured at Fair Value on Recurring Basis (Details) - Fair Value, Recurring - Level 3 - USD ($) $ in Thousands | 6 Months Ended
--- | ---
Jun. 30, 2023 | Jun. 30, 2022
Fair Value Assets And Liabilities Measured On Recurring And Nonrecurring Basis [Line Items] |  |  |  |
Beginning balance |  | $ 33,986 |  | $ 58,881
Total Assets, Beginning balance |  | 6,046 |  |
Acquisitions |  | 25 |  | 1,216
Changes in fair value included in earnings |  | 1,379 |  | 663
Asset value, Changes in fair value included in earnings |  | 416 |  | 3,982
Payment of contingent consideration payable |  | (1,805) |  | (30,179)
Ending balance |  | 33,585 |  | 30,581
Total Assets, Ending balance |  | 6,462 |  | 3,982
Business Acquisitions Contingent Consideration, Current |  |  |  |
Fair Value Assets And Liabilities Measured On Recurring And Nonrecurring Basis [Line Items] |  |  |  |
Beginning balance |  | 3,801 |  | 31,450
Acquisitions |  | 25 |  |
Changes in fair value included in earnings |  | (162) |  | (73)
Payment of contingent consideration payable |  | (1,805) |  | (30,179)
Reclass of long term to short term contingent liabilities |  | 2,260 |  | 1,616
Ending balance |  | 4,119 |  | 2,814
Business Acquisitions Contingent Consideration, Long-Term |  |  |  |
Fair Value Assets And Liabilities Measured On Recurring And Nonrecurring Basis [Line Items] |  |  |  |
Beginning balance |  | 4,454 |  | 4,350
Acquisitions |  |  |  | 1,216
Changes in fair value included in earnings |  | 117 |  | (390)
Reclass of long term to short term contingent liabilities |  | (2,260) |  | (1,616)
Ending balance |  | 2,311 |  | 3,560
Conversion Option |  |  |  |
Fair Value Assets And Liabilities Measured On Recurring And Nonrecurring Basis [Line Items] |  |  |  |
Beginning balance |  | 25,731 |  | 23,081
Changes in fair value included in earnings |  | 1,424 |  | 1,126
Ending balance |  | 27,155 |  | 24,207
Interest Rate Swap |  |  |  |
Fair Value Assets And Liabilities Measured On Recurring And Nonrecurring Basis [Line Items] |  |  |  |
Total Assets, Beginning balance | [1] | 6,046 |  |
Asset value, Changes in fair value included in earnings |  | 416 |  | 3,982
Total Assets, Ending balance |  | $ 6,462 | [1] | $ 3,982
[1] | Included in other assets in the unaudited condensed consolidated statement of financial position.

X
- Definition Fair value measurement with unobservable inputs reconciliation recurring basis liability reclass of long term to short term contingent liabilities. + References No definition available. + Details
Name: | meg_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityReclassOfLongTermToShortTermContingentLiabilities
Namespace Prefix: | meg_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

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. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 820 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (a) -Publisher FASB -URI https://asc.fasb.org//1943274/2147482106/820-10-50-2 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 820 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (b) -Publisher FASB -URI https://asc.fasb.org//1943274/2147482106/820-10-50-2 Reference 3: http://www.xbrl.org/2003/role/disclosureRef -Topic 820 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 3 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482106/820-10-50-3 + Details
Name: | us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Amount of gain (loss) recognized in income from asset measured at fair value on recurring basis using unobservable input (level 3). + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 820 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1) -Publisher FASB -URI https://asc.fasb.org//1943274/2147482106/820-10-50-2 + Details
Name: | us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInEarnings1
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Fair value of financial instrument classified as an asset measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c) -SubTopic 10 -Topic 820 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482106/820-10-50-2 + Details
Name: | us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetValue
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Amount of gain (loss) recognized in income from liability measured at fair value on recurring basis using unobservable input (level 3). + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 820 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1) -Publisher FASB -URI https://asc.fasb.org//1943274/2147482106/820-10-50-2 + Details
Name: | us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Amount of purchases of financial instrument classified as a liability measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 820 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (c)(2) -Publisher FASB -URI https://asc.fasb.org//1943274/2147482106/820-10-50-2 + Details
Name: | us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityPurchases
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Amount of settlements of financial instrument classified as a liability measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 820 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (c)(2) -Publisher FASB -URI https://asc.fasb.org//1943274/2147482106/820-10-50-2 + Details
Name: | us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySettlements
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Fair value of financial instrument classified as a liability measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c) -SubTopic 10 -Topic 820 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482106/820-10-50-2 + Details
Name: | us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Details
Name: | us-gaap_FairValueByMeasurementFrequencyAxis=us-gaap_FairValueMeasurementsRecurringMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_FairValueByFairValueHierarchyLevelAxis=us-gaap_FairValueInputsLevel3Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_FairValueByLiabilityClassAxis=meg_BusinessAcquisitionsContingentConsiderationCurrentMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_FairValueByLiabilityClassAxis=meg_BusinessAcquisitionsContingentConsiderationLongTermMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_FairValueByLiabilityClassAxis=meg_ConversionOptionMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_FinancialInstrumentAxis=us-gaap_InterestRateSwapMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |