XML 102 R79.htm IDEA: XBRL DOCUMENT
v3.24.0.1

Lease obligations - Extension options (Details) - USD ($) $ in Thousands | Dec. 31, 2023 | Dec. 31, 2022
--- | --- | ---
Disclosure of Finance Leases [Line Items] |  |
Lease liabilities recognized (discounted) | $ 872,120 |
Potential future lease payments not included in lease liabilities (undiscounted) | 51,778 | $ 53,500
Ocean-going vessels |  |
Disclosure of Finance Leases [Line Items] |  |
Lease liabilities recognized (discounted) | 662,903 |
Potential future lease payments not included in lease liabilities (undiscounted) | 1,512 |
Terminals and tanks |  |
Disclosure of Finance Leases [Line Items] |  |
Lease liabilities recognized (discounted) | 174,019 |
Potential future lease payments not included in lease liabilities (undiscounted) | 38,987 |
Other |  |
Disclosure of Finance Leases [Line Items] |  |
Lease liabilities recognized (discounted) | 35,198 |
Potential future lease payments not included in lease liabilities (undiscounted) | $ 11,279 |

X
- Definition [Line Items] for Disclosure of Finance Leases [Table] + References No definition available. + Details
Name: | mx_DisclosureofFinanceLeasesLineItems
Namespace Prefix: | mx_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Finance Lease, Liability, Payment, Due1 + References No definition available. + Details
Name: | mx_FinanceLeaseLiabilityPaymentDue1
Namespace Prefix: | mx_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Lessee, Finance Lease, Option to Extend, Amount + References No definition available. + Details
Name: | mx_LesseeFinanceLeaseOptiontoExtendAmount
Namespace Prefix: | mx_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Details
Name: | mx_TypeofLeasedPropertyAxis=mx_VesselsMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | mx_TypeofLeasedPropertyAxis=mx_TerminalsAndTanksMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | mx_TypeofLeasedPropertyAxis=mx_OtherLeasedPropertyMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |