{
 "instance": {
  "mtrx-20220331.htm": {
   "axisCustom": 0,
   "axisStandard": 9,
   "contextCount": 142,
   "dts": {
    "calculationLink": {
     "local": [
      "mtrx-20220331_cal.xml"
     ]
    },
    "definitionLink": {
     "local": [
      "mtrx-20220331_def.xml"
     ]
    },
    "inline": {
     "local": [
      "mtrx-20220331.htm"
     ]
    },
    "labelLink": {
     "local": [
      "mtrx-20220331_lab.xml"
     ]
    },
    "presentationLink": {
     "local": [
      "mtrx-20220331_pre.xml"
     ]
    },
    "schema": {
     "local": [
      "mtrx-20220331.xsd"
     ],
     "remote": [
      "http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xl-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xlink-2003-12-31.xsd",
      "http://www.xbrl.org/2005/xbrldt-2005.xsd",
      "http://www.xbrl.org/2006/ref-2006-02-27.xsd",
      "http://www.xbrl.org/lrr/role/negated-2009-12-16.xsd",
      "http://www.xbrl.org/lrr/role/net-2009-12-16.xsd",
      "http://www.xbrl.org/lrr/role/reference-2009-12-16.xsd",
      "https://www.xbrl.org/2020/extensible-enumerations-2.0.xsd",
      "https://www.xbrl.org/dtr/type/2020-01-21/types.xsd",
      "https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd",
      "https://xbrl.fasb.org/srt/2021/elts/srt-roles-2021-01-31.xsd",
      "https://xbrl.fasb.org/srt/2021/elts/srt-types-2021-01-31.xsd",
      "https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd",
      "https://xbrl.fasb.org/us-gaap/2021/elts/us-roles-2021-01-31.xsd",
      "https://xbrl.fasb.org/us-gaap/2021/elts/us-types-2021-01-31.xsd",
      "https://xbrl.sec.gov/country/2021/country-2021.xsd",
      "https://xbrl.sec.gov/dei/2021/dei-2021.xsd"
     ]
    }
   },
   "elementCount": 425,
   "entityCount": 1,
   "hidden": {
    "http://fasb.org/us-gaap/2021-01-31": 40,
    "http://www.matrixservicecompany.com/20220331": 8,
    "http://xbrl.sec.gov/dei/2021": 7,
    "total": 55
   },
   "keyCustom": 28,
   "keyStandard": 210,
   "memberCustom": 9,
   "memberStandard": 14,
   "nsprefix": "mtrx",
   "nsuri": "http://www.matrixservicecompany.com/20220331",
   "report": {
    "R1": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:EntityIncorporationStateCountryCode",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "document",
     "isDefault": "true",
     "longName": "0001001 - Document - Cover Page",
     "role": "http://www.matrixservicecompany.com/role/CoverPage",
     "shortName": "Cover Page",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:EntityIncorporationStateCountryCode",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R10": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BasisOfPresentationAndSignificantAccountingPoliciesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2101101 - Disclosure - Basis of Presentation (Notes)",
     "role": "http://www.matrixservicecompany.com/role/BasisofPresentationNotes",
     "shortName": "Basis of Presentation (Notes)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BasisOfPresentationAndSignificantAccountingPoliciesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R11": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2105102 - Disclosure - Revenue (Notes)",
     "role": "http://www.matrixservicecompany.com/role/RevenueNotes",
     "shortName": "Revenue (Notes)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R12": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LesseeOperatingLeasesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2108103 - Disclosure - Leases (Notes)",
     "role": "http://www.matrixservicecompany.com/role/LeasesNotes",
     "shortName": "Leases (Notes)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LesseeOperatingLeasesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R13": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:GoodwillAndIntangibleAssetsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2115104 - Disclosure - Intangible Assets Including Goodwill (Notes)",
     "role": "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillNotes",
     "shortName": "Intangible Assets Including Goodwill (Notes)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:GoodwillAndIntangibleAssetsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R14": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DebtDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2120105 - Disclosure - Debt (Notes)",
     "role": "http://www.matrixservicecompany.com/role/DebtNotes",
     "shortName": "Debt (Notes)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DebtDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R15": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:IncomeTaxDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2123106 - Disclosure - Income Taxes",
     "role": "http://www.matrixservicecompany.com/role/IncomeTaxes",
     "shortName": "Income Taxes",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:IncomeTaxDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R16": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CommitmentsAndContingenciesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2125107 - Disclosure - Commitments and Contingencies (Notes)",
     "role": "http://www.matrixservicecompany.com/role/CommitmentsandContingenciesNotes",
     "shortName": "Commitments and Contingencies (Notes)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CommitmentsAndContingenciesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R17": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2127108 - Disclosure - Earnings per Common Share (Notes)",
     "role": "http://www.matrixservicecompany.com/role/EarningsperCommonShareNotes",
     "shortName": "Earnings per Common Share (Notes)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R18": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SegmentReportingDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2131109 - Disclosure - Segment Information (Notes)",
     "role": "http://www.matrixservicecompany.com/role/SegmentInformationNotes",
     "shortName": "Segment Information (Notes)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SegmentReportingDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R19": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RestructuringAndRelatedActivitiesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2134110 - Disclosure - Restructuring Costs (Notes)",
     "role": "http://www.matrixservicecompany.com/role/RestructuringCostsNotes",
     "shortName": "Restructuring Costs (Notes)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RestructuringAndRelatedActivitiesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R2": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i1278f2d184454e28b46dfa8a22fe6c22_D20220101-20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:Revenues",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1001002 - Statement - Condensed Consolidated Statements of Income",
     "role": "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome",
     "shortName": "Condensed Consolidated Statements of Income",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i1278f2d184454e28b46dfa8a22fe6c22_D20220101-20220331",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:CostOfGoodsAndServicesSold",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R20": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CashAndCashEquivalentsUnrestrictedCashAndCashEquivalentsPolicy",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2202201 - Disclosure - Basis of Presentation - Cash, Cash Equivalents, and Restricted Cash (Policies)",
     "role": "http://www.matrixservicecompany.com/role/BasisofPresentationCashCashEquivalentsandRestrictedCashPolicies",
     "shortName": "Basis of Presentation - Cash, Cash Equivalents, and Restricted Cash (Policies)",
     "subGroupType": "policies",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CashAndCashEquivalentsUnrestrictedCashAndCashEquivalentsPolicy",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R21": {
     "firstAnchor": {
      "ancestors": [
       "us-gaap:CashAndCashEquivalentsUnrestrictedCashAndCashEquivalentsPolicy",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfRestrictedCashAndCashEquivalentsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2303301 - Disclosure - Cash, Cash Equivalents, and Restricted Cash (Tables)",
     "role": "http://www.matrixservicecompany.com/role/CashCashEquivalentsandRestrictedCashTables",
     "shortName": "Cash, Cash Equivalents, and Restricted Cash (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "us-gaap:CashAndCashEquivalentsUnrestrictedCashAndCashEquivalentsPolicy",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfRestrictedCashAndCashEquivalentsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R22": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerAssetAndLiabilityTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2306302 - Disclosure - Revenue (Tables)",
     "role": "http://www.matrixservicecompany.com/role/RevenueTables",
     "shortName": "Revenue (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerAssetAndLiabilityTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R23": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LeaseCostTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2309303 - Disclosure - Leases (Tables)",
     "role": "http://www.matrixservicecompany.com/role/LeasesTables",
     "shortName": "Leases (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LeaseCostTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R24": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfGoodwillTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2316304 - Disclosure - Intangible Assets Including Goodwill (Tables)",
     "role": "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillTables",
     "shortName": "Intangible Assets Including Goodwill (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfGoodwillTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R25": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2328306 - Disclosure - Earnings per Common Share (Tables)",
     "role": "http://www.matrixservicecompany.com/role/EarningsperCommonShareTables",
     "shortName": "Earnings per Common Share (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R26": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfSegmentReportingInformationBySegmentTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2332307 - Disclosure - Segment Information (Tables)",
     "role": "http://www.matrixservicecompany.com/role/SegmentInformationTables",
     "shortName": "Segment Information (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfSegmentReportingInformationBySegmentTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R27": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfRestructuringAndRelatedCostsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2335308 - Disclosure - Restructuring Costs (Tables)",
     "role": "http://www.matrixservicecompany.com/role/RestructuringCostsTables",
     "shortName": "Restructuring Costs (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfRestructuringAndRelatedCostsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R28": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CashAndCashEquivalentsAtCarryingValue",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2404401 - Disclosure - Basis of Presentation Basis of Presentation - Narrative (Details)",
     "role": "http://www.matrixservicecompany.com/role/BasisofPresentationBasisofPresentationNarrativeDetails",
     "shortName": "Basis of Presentation Basis of Presentation - Narrative (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "us-gaap:CashAndCashEquivalentsUnrestrictedCashAndCashEquivalentsPolicy",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ib2e6fa72354b4cc781d7eecd09da61d0_I20211231",
      "decimals": "-5",
      "lang": "en-US",
      "name": "us-gaap:RestrictedCashCurrent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R29": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "-5",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueRemainingPerformanceObligation",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2407402 - Disclosure - Revenue (Details)",
     "role": "http://www.matrixservicecompany.com/role/RevenueDetails",
     "shortName": "Revenue (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": "-3",
      "lang": "en-US",
      "name": "mtrx:ChangeinCIE",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R3": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i1278f2d184454e28b46dfa8a22fe6c22_D20220101-20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ProfitLoss",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1002003 - Statement - Condensed Consolidated Statements of Comprehensive Income",
     "role": "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome",
     "shortName": "Condensed Consolidated Statements of Comprehensive Income",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i1278f2d184454e28b46dfa8a22fe6c22_D20220101-20220331",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R30": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "2",
      "first": true,
      "lang": "en-US",
      "name": "mtrx:Percentageofrealestateleases",
      "reportCount": 1,
      "unique": true,
      "unitRef": "rate",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2410403 - Disclosure - Leases - Narrative (Details)",
     "role": "http://www.matrixservicecompany.com/role/LeasesNarrativeDetails",
     "shortName": "Leases - Narrative (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "2",
      "first": true,
      "lang": "en-US",
      "name": "mtrx:Percentageofrealestateleases",
      "reportCount": 1,
      "unique": true,
      "unitRef": "rate",
      "xsiNil": "false"
     }
    },
    "R31": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:LeaseCostTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i1278f2d184454e28b46dfa8a22fe6c22_D20220101-20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OperatingLeaseCost",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2411404 - Disclosure - Leases - Components of Lease Costs (Details)",
     "role": "http://www.matrixservicecompany.com/role/LeasesComponentsofLeaseCostsDetails",
     "shortName": "Leases - Components of Lease Costs (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:LeaseCostTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i1278f2d184454e28b46dfa8a22fe6c22_D20220101-20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OperatingLeaseCost",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R32": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:LesseeOperatingLeaseLiabilityMaturityTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2412405 - Disclosure - Leases - Maturity Analysis (Details)",
     "role": "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails",
     "shortName": "Leases - Maturity Analysis (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:LesseeOperatingLeaseLiabilityMaturityTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R33": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "mtrx:OtherInformationRelatedtoLeasesTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OperatingLeaseWeightedAverageRemainingLeaseTerm1",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2413406 - Disclosure - Leases - Other Lease Information (Details)",
     "role": "http://www.matrixservicecompany.com/role/LeasesOtherLeaseInformationDetails",
     "shortName": "Leases - Other Lease Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "mtrx:OtherInformationRelatedtoLeasesTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OperatingLeaseWeightedAverageRemainingLeaseTerm1",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R34": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "mtrx:OtherInformationRelatedtoLeasesTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OperatingLeasePayments",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2414407 - Disclosure - Leases - Supplemental Cash Flow Disclosures (Details)",
     "role": "http://www.matrixservicecompany.com/role/LeasesSupplementalCashFlowDisclosuresDetails",
     "shortName": "Leases - Supplemental Cash Flow Disclosures (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "mtrx:OtherInformationRelatedtoLeasesTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OperatingLeasePayments",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R35": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:Goodwill",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2417408 - Disclosure - Intangible Assets Including Goodwill - Carrying Value of Goodwill By Segment (Details)",
     "role": "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails",
     "shortName": "Intangible Assets Including Goodwill - Carrying Value of Goodwill By Segment (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:ScheduleOfGoodwillTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:GoodwillImpairmentLoss",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R36": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "mtrx:ScheduleOfIntangibleAssetsExcludingGoodwillTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FiniteLivedIntangibleAssetsGross",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2418409 - Disclosure - Intangible Assets Including Goodwill - Carrying Value of Other Intangible Assets (Details)",
     "role": "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails",
     "shortName": "Intangible Assets Including Goodwill - Carrying Value of Other Intangible Assets (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "mtrx:ScheduleOfIntangibleAssetsExcludingGoodwillTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i6c4d05d989434a90961fd9520fcac073_I20210630",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:FiniteLivedIntangibleAssetsGross",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R37": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:ScheduleofFiniteLivedIntangibleAssetsFutureAmortizationExpenseTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2419410 - Disclosure - Intangible Assets Including Goodwill Future Expected Amortization Expense (Details)",
     "role": "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails",
     "shortName": "Intangible Assets Including Goodwill Future Expected Amortization Expense (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:ScheduleofFiniteLivedIntangibleAssetsFutureAmortizationExpenseTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R38": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LineOfCreditFacilityInitiationDate1",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2422411 - Disclosure - Line of Credit Facility (Details)",
     "role": "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails",
     "shortName": "Line of Credit Facility (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LineOfCreditFacilityInitiationDate1",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R39": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i1278f2d184454e28b46dfa8a22fe6c22_D20220101-20220331",
      "decimals": "3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EffectiveIncomeTaxRateContinuingOperations",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2424412 - Disclosure - Income Taxes (Details)",
     "role": "http://www.matrixservicecompany.com/role/IncomeTaxesDetails",
     "shortName": "Income Taxes (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i1278f2d184454e28b46dfa8a22fe6c22_D20220101-20220331",
      "decimals": "3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EffectiveIncomeTaxRateContinuingOperations",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     }
    },
    "R4": {
     "firstAnchor": null,
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1003004 - Statement - Statement of Other Comprehensive Income (Parenthetical)",
     "role": "http://www.matrixservicecompany.com/role/StatementofOtherComprehensiveIncomeParenthetical",
     "shortName": "Statement of Other Comprehensive Income (Parenthetical)",
     "subGroupType": "parenthetical",
     "uniqueAnchor": null
    },
    "R40": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "-5",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:UnapprovedChangeOrdersAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2426413 - Disclosure - Commitments and Contingencies - Additional Information (Detail)",
     "role": "http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail",
     "shortName": "Commitments and Contingencies - Additional Information (Detail)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "-5",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:UnapprovedChangeOrdersAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R41": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i1278f2d184454e28b46dfa8a22fe6c22_D20220101-20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ProfitLoss",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2429414 - Disclosure - Earnings per Common Share - Computation of Basic and Diluted Earnings Per Share (Details)",
     "role": "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails",
     "shortName": "Earnings per Common Share - Computation of Basic and Diluted Earnings Per Share (Details)",
     "subGroupType": "details",
     "uniqueAnchor": null
    },
    "R42": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:ScheduleOfSegmentReportingInformationBySegmentTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i1278f2d184454e28b46dfa8a22fe6c22_D20220101-20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "mtrx:Grossrevenues",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2433416 - Disclosure - Segment Information (Details)",
     "role": "http://www.matrixservicecompany.com/role/SegmentInformationDetails",
     "shortName": "Segment Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:ScheduleOfSegmentReportingInformationBySegmentTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i1278f2d184454e28b46dfa8a22fe6c22_D20220101-20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "mtrx:Grossrevenues",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R43": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:ScheduleOfRestructuringAndRelatedCostsTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i1278f2d184454e28b46dfa8a22fe6c22_D20220101-20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SeveranceCosts1",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2436417 - Disclosure - Restructuring Costs (Details)",
     "role": "http://www.matrixservicecompany.com/role/RestructuringCostsDetails",
     "shortName": "Restructuring Costs (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:ScheduleOfRestructuringAndRelatedCostsTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i1278f2d184454e28b46dfa8a22fe6c22_D20220101-20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SeveranceCosts1",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R5": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CashAndCashEquivalentsAtCarryingValue",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1004005 - Statement - Condensed Consolidated Balance Sheets",
     "role": "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets",
     "shortName": "Condensed Consolidated Balance Sheets",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ibac5a061768447b181145cc66aae6e0a_I20220331",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:AccountsReceivableNetCurrent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R6": {
     "firstAnchor": null,
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1005006 - Statement - Condensed Consolidated Balance Sheets (Parenthetical)",
     "role": "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheetsParenthetical",
     "shortName": "Condensed Consolidated Balance Sheets (Parenthetical)",
     "subGroupType": "parenthetical",
     "uniqueAnchor": null
    },
    "R7": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ProfitLoss",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1006007 - Statement - Condensed Consolidated Statements of Cash Flows",
     "role": "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows",
     "shortName": "Condensed Consolidated Statements of Cash Flows",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "i0421b924813147cba60633318d9623aa_D20210701-20220331",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:DepreciationDepletionAndAmortization",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R8": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ic428f311c2394931bc44198817b5208c_I20200630",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1007008 - Statement - Condensed Consolidated Statements of Changes in Stockholders' Equity",
     "role": "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity",
     "shortName": "Condensed Consolidated Statements of Changes in Stockholders' Equity",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "mtrx-20220331.htm",
      "contextRef": "ic428f311c2394931bc44198817b5208c_I20200630",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R9": {
     "firstAnchor": null,
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1008009 - Statement - Condensed Consolidated Statements of Changes in Stockholders' Equity (Parenthetical)",
     "role": "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical",
     "shortName": "Condensed Consolidated Statements of Changes in Stockholders' Equity (Parenthetical)",
     "subGroupType": "parenthetical",
     "uniqueAnchor": null
    }
   },
   "segmentCount": 23,
   "tag": {
    "country_CA": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "CANADA",
        "terseLabel": "Canada"
       }
      }
     },
     "localname": "CA",
     "nsuri": "http://xbrl.sec.gov/country/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "country_US": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "UNITED STATES",
        "terseLabel": "United States"
       }
      }
     },
     "localname": "US",
     "nsuri": "http://xbrl.sec.gov/country/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "dei_AmendmentFlag": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true when the XBRL content amends previously-filed or accepted submission.",
        "label": "Amendment Flag",
        "terseLabel": "Amendment Flag"
       }
      }
     },
     "localname": "AmendmentFlag",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_CityAreaCode": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Area code of city",
        "label": "City Area Code",
        "terseLabel": "City Area Code"
       }
      }
     },
     "localname": "CityAreaCode",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_CoverAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Cover page.",
        "label": "Cover [Abstract]",
        "terseLabel": "Cover [Abstract]"
       }
      }
     },
     "localname": "CoverAbstract",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "xbrltype": "stringItemType"
    },
    "dei_CurrentFiscalYearEndDate": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "End date of current fiscal year in the format --MM-DD.",
        "label": "Current Fiscal Year End Date",
        "terseLabel": "Current Fiscal Year End Date"
       }
      }
     },
     "localname": "CurrentFiscalYearEndDate",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "gMonthDayItemType"
    },
    "dei_DocumentFiscalPeriodFocus": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Fiscal period values are FY, Q1, Q2, and Q3.  1st, 2nd and 3rd quarter 10-Q or 10-QT statements have value Q1, Q2, and Q3 respectively, with 10-K, 10-KT or other fiscal year statements having FY.",
        "label": "Document Fiscal Period Focus",
        "terseLabel": "Document Fiscal Period Focus"
       }
      }
     },
     "localname": "DocumentFiscalPeriodFocus",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "fiscalPeriodItemType"
    },
    "dei_DocumentFiscalYearFocus": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This is focus fiscal year of the document report in YYYY format. For a 2006 annual report, which may also provide financial information from prior periods, fiscal 2006 should be given as the fiscal year focus. Example: 2006.",
        "label": "Document Fiscal Year Focus",
        "terseLabel": "Document Fiscal Year Focus"
       }
      }
     },
     "localname": "DocumentFiscalYearFocus",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "gYearItemType"
    },
    "dei_DocumentPeriodEndDate": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "For the EDGAR submission types of Form 8-K: the date of the report, the date of the earliest event reported; for the EDGAR submission types of Form N-1A: the filing date; for all other submission types: the end of the reporting or transition period.  The format of the date is YYYY-MM-DD.",
        "label": "Document Period End Date",
        "terseLabel": "Document Period End Date"
       }
      }
     },
     "localname": "DocumentPeriodEndDate",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "dateItemType"
    },
    "dei_DocumentQuarterlyReport": {
     "auth_ref": [
      "r464"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true only for a form used as an quarterly report.",
        "label": "Document Quarterly Report",
        "terseLabel": "Document Quarterly Report"
       }
      }
     },
     "localname": "DocumentQuarterlyReport",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_DocumentTransitionReport": {
     "auth_ref": [
      "r465"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true only for a form used as a transition report.",
        "label": "Document Transition Report",
        "terseLabel": "Document Transition Report"
       }
      }
     },
     "localname": "DocumentTransitionReport",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_DocumentType": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The type of document being provided (such as 10-K, 10-Q, 485BPOS, etc). The document type is limited to the same value as the supporting SEC submission type, or the word 'Other'.",
        "label": "Document Type",
        "terseLabel": "Document Type"
       }
      }
     },
     "localname": "DocumentType",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "submissionTypeItemType"
    },
    "dei_EntityAddressAddressLine1": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Address Line 1 such as Attn, Building Name, Street Name",
        "label": "Entity Address, Address Line One",
        "terseLabel": "Entity Address, Address Line One"
       }
      }
     },
     "localname": "EntityAddressAddressLine1",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressCityOrTown": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Name of the City or Town",
        "label": "Entity Address, City or Town",
        "terseLabel": "Entity Address, City or Town"
       }
      }
     },
     "localname": "EntityAddressCityOrTown",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressPostalZipCode": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Code for the postal or zip code",
        "label": "Entity Address, Postal Zip Code",
        "terseLabel": "Entity Address, Postal Zip Code"
       }
      }
     },
     "localname": "EntityAddressPostalZipCode",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressStateOrProvince": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Name of the state or province.",
        "label": "Entity Address, State or Province",
        "terseLabel": "Entity Address, State or Province"
       }
      }
     },
     "localname": "EntityAddressStateOrProvince",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "stateOrProvinceItemType"
    },
    "dei_EntityCentralIndexKey": {
     "auth_ref": [
      "r466"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A unique 10-digit SEC-issued value to identify entities that have filed disclosures with the SEC. It is commonly abbreviated as CIK.",
        "label": "Entity Central Index Key",
        "terseLabel": "Entity Central Index Key"
       }
      }
     },
     "localname": "EntityCentralIndexKey",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "centralIndexKeyItemType"
    },
    "dei_EntityCommonStockSharesOutstanding": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate number of shares or other units outstanding of each of registrant's classes of capital or common stock or other ownership interests, if and as stated on cover of related periodic report. Where multiple classes or units exist define each class/interest by adding class of stock items such as Common Class A [Member], Common Class B [Member] or Partnership Interest [Member] onto the Instrument [Domain] of the Entity Listings, Instrument.",
        "label": "Entity Common Stock, Shares Outstanding",
        "terseLabel": "Entity Common Stock, Shares Outstanding"
       }
      }
     },
     "localname": "EntityCommonStockSharesOutstanding",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "sharesItemType"
    },
    "dei_EntityCurrentReportingStatus": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate 'Yes' or 'No' whether registrants (1) have filed all reports required to be filed by Section 13 or 15(d) of the Securities Exchange Act of 1934 during the preceding 12 months (or for such shorter period that registrants were required to file such reports), and (2) have been subject to such filing requirements for the past 90 days. This information should be based on the registrant's current or most recent filing containing the related disclosure.",
        "label": "Entity Current Reporting Status",
        "terseLabel": "Entity Current Reporting Status"
       }
      }
     },
     "localname": "EntityCurrentReportingStatus",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "yesNoItemType"
    },
    "dei_EntityEmergingGrowthCompany": {
     "auth_ref": [
      "r466"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate if registrant meets the emerging growth company criteria.",
        "label": "Entity Emerging Growth Company",
        "terseLabel": "Entity Emerging Growth Company"
       }
      }
     },
     "localname": "EntityEmergingGrowthCompany",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntityFileNumber": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Commission file number. The field allows up to 17 characters. The prefix may contain 1-3 digits, the sequence number may contain 1-8 digits, the optional suffix may contain 1-4 characters, and the fields are separated with a hyphen.",
        "label": "Entity File Number",
        "terseLabel": "Entity File Number"
       }
      }
     },
     "localname": "EntityFileNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "fileNumberItemType"
    },
    "dei_EntityFilerCategory": {
     "auth_ref": [
      "r466"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate whether the registrant is one of the following: Large Accelerated Filer, Accelerated Filer, Non-accelerated Filer. Definitions of these categories are stated in Rule 12b-2 of the Exchange Act. This information should be based on the registrant's current or most recent filing containing the related disclosure.",
        "label": "Entity Filer Category",
        "terseLabel": "Entity Filer Category"
       }
      }
     },
     "localname": "EntityFilerCategory",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "filerCategoryItemType"
    },
    "dei_EntityIncorporationStateCountryCode": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Two-character EDGAR code representing the state or country of incorporation.",
        "label": "Entity Incorporation, State or Country Code",
        "terseLabel": "Entity Incorporation, State or Country Code"
       }
      }
     },
     "localname": "EntityIncorporationStateCountryCode",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "edgarStateCountryItemType"
    },
    "dei_EntityInteractiveDataCurrent": {
     "auth_ref": [
      "r468"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true when the registrant has submitted electronically every Interactive Data File required to be submitted pursuant to Rule 405 of Regulation S-T during the preceding 12 months (or for such shorter period that the registrant was required to submit such files).",
        "label": "Entity Interactive Data Current",
        "terseLabel": "Entity Interactive Data Current"
       }
      }
     },
     "localname": "EntityInteractiveDataCurrent",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "yesNoItemType"
    },
    "dei_EntityRegistrantName": {
     "auth_ref": [
      "r466"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The exact name of the entity filing the report as specified in its charter, which is required by forms filed with the SEC.",
        "label": "Entity Registrant Name",
        "terseLabel": "Entity Registrant Name"
       }
      }
     },
     "localname": "EntityRegistrantName",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityShellCompany": {
     "auth_ref": [
      "r466"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true when the registrant is a shell company as defined in Rule 12b-2 of the Exchange Act.",
        "label": "Entity Shell Company",
        "terseLabel": "Entity Shell Company"
       }
      }
     },
     "localname": "EntityShellCompany",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntitySmallBusiness": {
     "auth_ref": [
      "r466"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicates that the company is a Smaller Reporting Company (SRC).",
        "label": "Entity Small Business",
        "terseLabel": "Entity Small Business"
       }
      }
     },
     "localname": "EntitySmallBusiness",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntityTaxIdentificationNumber": {
     "auth_ref": [
      "r466"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The Tax Identification Number (TIN), also known as an Employer Identification Number (EIN), is a unique 9-digit value assigned by the IRS.",
        "label": "Entity Tax Identification Number",
        "terseLabel": "Entity Tax Identification Number"
       }
      }
     },
     "localname": "EntityTaxIdentificationNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "employerIdItemType"
    },
    "dei_LocalPhoneNumber": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Local phone number for entity.",
        "label": "Local Phone Number",
        "terseLabel": "Local Phone Number"
       }
      }
     },
     "localname": "LocalPhoneNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_Security12bTitle": {
     "auth_ref": [
      "r462"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Title of a 12(b) registered security.",
        "label": "Title of 12(b) Security",
        "terseLabel": "Title of 12(b) Security"
       }
      }
     },
     "localname": "Security12bTitle",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "securityTitleItemType"
    },
    "dei_SecurityExchangeName": {
     "auth_ref": [
      "r463"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Name of the Exchange on which a security is registered.",
        "label": "Security Exchange Name",
        "terseLabel": "Security Exchange Name"
       }
      }
     },
     "localname": "SecurityExchangeName",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "edgarExchangeCodeItemType"
    },
    "dei_TradingSymbol": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Trading symbol of an instrument as listed on an exchange.",
        "label": "Trading Symbol",
        "terseLabel": "Trading Symbol"
       }
      }
     },
     "localname": "TradingSymbol",
     "nsuri": "http://xbrl.sec.gov/dei/2021",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CoverPage"
     ],
     "xbrltype": "tradingSymbolItemType"
    },
    "mtrx_AmountofForeignTaxCreditCarryforwardExpiringinFiscal2021": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of Foreign Tax Credit Carryforward Expiring in Fiscal 2021",
        "label": "Amount of Foreign Tax Credit Carryforward Expiring in Fiscal 2021",
        "terseLabel": "Amount of Foreign Tax Credit Carryforward Expiring in Fiscal 2021"
       }
      }
     },
     "localname": "AmountofForeignTaxCreditCarryforwardExpiringinFiscal2021",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_AmountofForeignTaxCreditCarryforwardExpiringinFiscal2023": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of Foreign Tax Credit Carryforward Expiring in Fiscal 2023",
        "label": "Amount of Foreign Tax Credit Carryforward Expiring in Fiscal 2023",
        "terseLabel": "Amount of Foreign Tax Credit Carryforward Expiring Between Fiscal 2023 and Fiscal 2025"
       }
      }
     },
     "localname": "AmountofForeignTaxCreditCarryforwardExpiringinFiscal2023",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_AssetBackedCreditFacilityBaseRateAddOn": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Asset Backed Credit Facility Base Rate Add On",
        "label": "Asset Backed Credit Facility Base Rate Add On",
        "terseLabel": "Asset Backed Credit Facility Base Rate Add On"
       }
      }
     },
     "localname": "AssetBackedCreditFacilityBaseRateAddOn",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "mtrx_AssetBackedCreditFacilityFixedChargeCoverageRatioRequirement": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Asset Backed Credit Facility Fixed Charge Coverage Ratio Requirement",
        "label": "Asset Backed Credit Facility Fixed Charge Coverage Ratio Requirement",
        "terseLabel": "Asset Backed Credit Facility Fixed Charge Coverage Ratio Requirement"
       }
      }
     },
     "localname": "AssetBackedCreditFacilityFixedChargeCoverageRatioRequirement",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "pureItemType"
    },
    "mtrx_AssetBackedCreditFacilityLIBORRateOneMonthAddOn": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Asset Backed Credit Facility LIBOR Rate One Month Add On",
        "label": "Asset Backed Credit Facility LIBOR Rate One Month Add On",
        "terseLabel": "Asset Backed Credit Facility LIBOR Rate One Month Add On"
       }
      }
     },
     "localname": "AssetBackedCreditFacilityLIBORRateOneMonthAddOn",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "mtrx_BankOfMontrealMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Bank of Montreal",
        "label": "Bank of Montreal [Member]",
        "terseLabel": "Bank of Montreal"
       }
      }
     },
     "localname": "BankOfMontrealMember",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "mtrx_Beginningequitybalancesasadjusted": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Beginning equity balances as adjusted for the effects of retrospective impacts of the adoption of a new accounting standard.",
        "label": "Beginning equity balances, as adjusted",
        "terseLabel": "Beginning equity balances, as adjusted"
       }
      }
     },
     "localname": "Beginningequitybalancesasadjusted",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_Blendedincometaxrate": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Blended income tax rate of 28.06% used by the Company for the remainder of Fiscal 2018. The use of this blended rate is stipulated by the Internal Revenue Code in connection with the Tax Cuts and Jobs Act of December 2017, which reduced the federal income tax rate from 35% to 21%. Since the Company has a June 30 fiscal year end, it must use a blend of 21% and 35% for the rest of the current fiscal year.",
        "label": "Blended income tax rate",
        "terseLabel": "Blended income tax rate"
       }
      }
     },
     "localname": "Blendedincometaxrate",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "pureItemType"
    },
    "mtrx_ChangeinBIE": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Change in BIE from the prior year to the current period.",
        "label": "Change in BIE",
        "terseLabel": "Change in BIE"
       }
      }
     },
     "localname": "ChangeinBIE",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_ChangeinCIE": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Change in CIE from prior year to the current period.",
        "label": "Change in CIE",
        "terseLabel": "Change in CIE"
       }
      }
     },
     "localname": "ChangeinCIE",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_Changeinnetcontractbalances": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Change in net contract balances from the prior year to the current year.",
        "label": "Change in net contract balances",
        "terseLabel": "Change in net contract balances"
       }
      }
     },
     "localname": "Changeinnetcontractbalances",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_ClaimOnPowerGenerationProjectMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Claim On Power Generation Project [Member]",
        "label": "Claim On Power Generation Project [Member]",
        "terseLabel": "Claim On Power Generation Project [Member]"
       }
      }
     },
     "localname": "ClaimOnPowerGenerationProjectMember",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail"
     ],
     "xbrltype": "domainItemType"
    },
    "mtrx_Contractwithcustomercurrentliabilitynet": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Contract with customer, current liability, net",
        "label": "Contract with customer, current liability, net",
        "terseLabel": "Contract with customer, current liability, net"
       }
      }
     },
     "localname": "Contractwithcustomercurrentliabilitynet",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_DeferredIncomeTaxExpense": {
     "auth_ref": [],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 6.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Deferred Income Tax Expense Benefit",
        "label": "Deferred Income Tax Expense",
        "terseLabel": "Deferred income tax"
       }
      }
     },
     "localname": "DeferredIncomeTaxExpense",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_DeferredSharesIssued": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Deferred Shares Issued",
        "label": "Deferred Shares Issued",
        "terseLabel": "Issuance of deferred shares, shares"
       }
      }
     },
     "localname": "DeferredSharesIssued",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "mtrx_DeferredTaxAssetsForeignTaxCreditCarryforwardAfterValuationAllowance": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Deferred Tax Assets, Foreign Tax Credit Carryforward, After Valuation Allowance",
        "label": "Deferred Tax Assets, Foreign Tax Credit Carryforward, After Valuation Allowance",
        "terseLabel": "Deferred Tax Assets, Foreign Tax Credit Carryforward, After Valuation Allowance"
       }
      }
     },
     "localname": "DeferredTaxAssetsForeignTaxCreditCarryforwardAfterValuationAllowance",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_DeferredTaxAssetsGeneratedInTheThreeMonthsEndedMarch312022Member": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Deferred Tax Assets Generated in the Three Months Ended March 31, 2022",
        "label": "Deferred Tax Assets Generated in the Three Months Ended March 31, 2022 [Member]",
        "terseLabel": "Deferred Tax Assets Generated in the Three Months Ended March 31, 2022"
       }
      }
     },
     "localname": "DeferredTaxAssetsGeneratedInTheThreeMonthsEndedMarch312022Member",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "mtrx_Deferredtaxremeasurement": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Deferred tax remeasurement due to the enactment of the Tax Cuts and Jobs Act of 2017. The Company's domestic net deferred tax liability balance was remeasured at a lower corporate tax rate, which reduced the net deferred tax liability balance. The downward remeasurement was recorded as a benefit to income tax expense.",
        "label": "Deferred tax remeasurement",
        "terseLabel": "Deferred tax remeasurement"
       }
      }
     },
     "localname": "Deferredtaxremeasurement",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_DisclosureCustomerContractsAdditionalInformationAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure - Customer Contracts - Additional Information [Abstract]",
        "label": "Disclosure Customer Contracts Additional Information [Abstract]",
        "terseLabel": "Disclosure Customer Contracts Additional Information [Abstract]"
       }
      }
     },
     "localname": "DisclosureCustomerContractsAdditionalInformationAbstract",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "mtrx_ExpectedRemainingAmortizationExpenseAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Expected Remaining Amortization Expense [Abstract]",
        "label": "Expected Remaining Amortization Expense [Abstract]",
        "terseLabel": "Expected Remaining Amortization Expense [Abstract]"
       }
      }
     },
     "localname": "ExpectedRemainingAmortizationExpenseAbstract",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "xbrltype": "stringItemType"
    },
    "mtrx_Expectedeffectivetaxrateremainderofyear": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Expected effective tax rate, remainder of year",
        "label": "Expected effective tax rate, remainder of year",
        "terseLabel": "Expected effective tax rate, remainder of year"
       }
      }
     },
     "localname": "Expectedeffectivetaxrateremainderofyear",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "mtrx_Expectedeffectivetaxrateyeartodate": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Expected effective tax rate year-to-date.",
        "label": "Expected effective tax rate, year-to-date",
        "terseLabel": "Expected effective tax rate, year-to-date"
       }
      }
     },
     "localname": "Expectedeffectivetaxrateyeartodate",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "pureItemType"
    },
    "mtrx_Grossrevenues": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Gross revenues before intersegment eliminations",
        "label": "Gross revenues",
        "terseLabel": "Gross revenues"
       }
      }
     },
     "localname": "Grossrevenues",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_IncomeTaxReceivableAxis": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Income Tax Receivable",
        "label": "Income Tax Receivable [Axis]",
        "terseLabel": "Income Tax Receivable [Axis]"
       }
      }
     },
     "localname": "IncomeTaxReceivableAxis",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "mtrx_IncomeTaxReceivableDomain": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Income Tax Receivable [Domain]",
        "label": "Income Tax Receivable [Domain]",
        "terseLabel": "Income Tax Receivable [Domain]"
       }
      }
     },
     "localname": "IncomeTaxReceivableDomain",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "mtrx_JPMorganChaseBankMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "J.P. Morgan Chase Bank",
        "label": "J.P. Morgan Chase Bank [Member]",
        "terseLabel": "J.P. Morgan Chase Bank"
       }
      }
     },
     "localname": "JPMorganChaseBankMember",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "mtrx_LesseeOperatingLeaseLiabilityToBePaidAfterYearFour": {
     "auth_ref": [],
     "calculation": {
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails": {
       "order": 6.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Operating Lease, Liability, To Be Paid, After Year Four",
        "label": "LesseeOperatingLeaseLiabilityToBePaidAfterYearFour",
        "terseLabel": "Thereafter"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityToBePaidAfterYearFour",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOAndCDORMaximum": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line Of Credit Basis Spread On Adjusted LIBO and CDOR Maximum",
        "label": "Line Of Credit Basis Spread On Adjusted LIBO and CDOR Maximum",
        "terseLabel": "Line Of Credit Basis Spread On Adjusted LIBO and CDOR Maximum"
       }
      }
     },
     "localname": "LineOfCreditBasisSpreadOnAdjustedLIBOAndCDORMaximum",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOAndCDORMinimum": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line Of Credit Basis Spread On Adjusted LIBO and CDOR Minimum",
        "label": "Line Of Credit Basis Spread On Adjusted LIBO and CDOR Minimum",
        "terseLabel": "Line Of Credit Basis Spread On Adjusted LIBO and CDOR Minimum"
       }
      }
     },
     "localname": "LineOfCreditBasisSpreadOnAdjustedLIBOAndCDORMinimum",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMaximum": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line of credit basis spread on alternate base rate maximum.",
        "label": "Line Of Credit Basis Spread On Alternate Base Rate Maximum",
        "terseLabel": "Additional Margin on alternate base rate loans, Maximum"
       }
      }
     },
     "localname": "LineOfCreditBasisSpreadOnAlternateBaseRateMaximum",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMinimum": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line of credit basis spread on alternate base rate minimum.",
        "label": "Line Of Credit Basis Spread On Alternate Base Rate Minimum",
        "terseLabel": "Additional Margin on alternate base rate loans, Minimum"
       }
      }
     },
     "localname": "LineOfCreditBasisSpreadOnAlternateBaseRateMinimum",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "mtrx_MtrxAdjustmentToRestructuringCostsLiability": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Adjustment To Restructuring Costs Liability",
        "label": "mtrx:AdjustmentToRestructuringCostsLiability",
        "terseLabel": "Operating lease and fixed asset impairments due to restructuring"
       }
      }
     },
     "localname": "MtrxAdjustmentToRestructuringCostsLiability",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_MtrxAssetBackedCreditFacility_FederalFundsRateAddition": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "mtrx:AssetBackedCreditFacility_FederalFundsRateAddition",
        "label": "mtrx:AssetBackedCreditFacility_FederalFundsRateAddition",
        "terseLabel": "Asset Backed Credit Facility Federal Funds Rate Addition"
       }
      }
     },
     "localname": "MtrxAssetBackedCreditFacility_FederalFundsRateAddition",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "mtrx_MtrxAssetBackedLineofCreditBalanceLimitforFixedChargeCoverageRatio": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "mtrx:AssetBackedLineofCreditBalanceLimitforFixedChargeCoverageRatio",
        "label": "mtrx:AssetBackedLineofCreditBalanceLimitforFixedChargeCoverageRatio",
        "terseLabel": "Asset Backed Line of Credit Balance Limit for Fixed Charge Coverage Ratio"
       }
      }
     },
     "localname": "MtrxAssetBackedLineofCreditBalanceLimitforFixedChargeCoverageRatio",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_MtrxAssetBackedLineofCreditPercentageLimitforFixedChargeCoverageRatio": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "mtrx:AssetBackedLineofCreditPercentageLimitforFixedChargeCoverageRatio",
        "label": "mtrx:AssetBackedLineofCreditPercentageLimitforFixedChargeCoverageRatio",
        "terseLabel": "Asset Backed Line of Credit Percentage Limit for Fixed Charge Coverage Ratio"
       }
      }
     },
     "localname": "MtrxAssetBackedLineofCreditPercentageLimitforFixedChargeCoverageRatio",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "mtrx_MtrxCARESACTDeferredPayrollTaxLiability": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "CARES ACT Deferred Payroll Tax Liability",
        "label": "mtrx:CARESACTDeferredPayrollTaxLiability",
        "terseLabel": "CARES Act Deferred Payroll Tax Liability"
       }
      }
     },
     "localname": "MtrxCARESACTDeferredPayrollTaxLiability",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_MtrxMtrxCARESActNOLCarrybackBenefit": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "mtrx:MtrxCARESActNOLCarrybackBenefit",
        "label": "mtrx:MtrxCARESActNOLCarrybackBenefit",
        "terseLabel": "CARES Act NOL Carryback Benefit"
       }
      }
     },
     "localname": "MtrxMtrxCARESActNOLCarrybackBenefit",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_MtrxUnpaidRestructuringCharges": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Unpaid Restructuring Charges",
        "label": "mtrx:UnpaidRestructuringCharges",
        "terseLabel": "Restructuring costs incurred"
       }
      }
     },
     "localname": "MtrxUnpaidRestructuringCharges",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_NonvestedDeferredSharesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Nonvested Deferred Shares [Member]",
        "label": "Nonvested Deferred Shares [Member]",
        "terseLabel": "Nonvested Deferred Shares [Member]"
       }
      }
     },
     "localname": "NonvestedDeferredSharesMember",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareAntidilutiveSecuritiesExcludedfromtheCalculationofDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "mtrx_OfficeEquipmentAndSoftware": {
     "auth_ref": [],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_PropertyPlantAndEquipmentGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Office Equipment and Capitalized Computer Software Gross",
        "label": "Office Equipment And Software",
        "terseLabel": "Office equipment and software"
       }
      }
     },
     "localname": "OfficeEquipmentAndSoftware",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_OperatingLeaseImpairmentsDueToRestructuring": {
     "auth_ref": [],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 5.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Operating Lease Impairments Due To Restructuring",
        "label": "Operating Lease Impairments Due To Restructuring",
        "terseLabel": "Operating lease impairment due to restructuring"
       }
      }
     },
     "localname": "OperatingLeaseImpairmentsDueToRestructuring",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_OtherInformationRelatedtoLeasesTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Table disclosing operating lease weighted average remaining lease term, weighted average discount rate, and supplemental cash flow disclosures.",
        "label": "Other Information Related to Leases [Table Text Block]",
        "terseLabel": "Other Information Related to Leases [Table Text Block]"
       }
      }
     },
     "localname": "OtherInformationRelatedtoLeasesTableTextBlock",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "mtrx_OtherLeaseInformationAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Other Lease Information [Abstract]",
        "label": "Other Lease Information [Abstract]",
        "terseLabel": "Other Lease Information [Abstract]"
       }
      }
     },
     "localname": "OtherLeaseInformationAbstract",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "xbrltype": "stringItemType"
    },
    "mtrx_OtherTreasurySharePurchases": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Other treasury share purchases.",
        "label": "Other Treasury Share Purchases",
        "negatedTerseLabel": "Treasury shares purchased to satisfy tax withholding obligations"
       }
      }
     },
     "localname": "OtherTreasurySharePurchases",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_OtherTreasurySharesAcquired": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Other treasury shares acquired.",
        "label": "Other Treasury Shares Acquired",
        "terseLabel": "Other treasury shares purchases, shares"
       }
      }
     },
     "localname": "OtherTreasurySharesAcquired",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "mtrx_OtherinternationalMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Other international [Member]",
        "label": "Other international [Member]",
        "terseLabel": "Other international"
       }
      }
     },
     "localname": "OtherinternationalMember",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "mtrx_Percentageofrealestateleases": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Percentage of leases - real estate",
        "label": "Percentage of real estate leases",
        "terseLabel": "Percentage of real estate leases"
       }
      }
     },
     "localname": "Percentageofrealestateleases",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "mtrx_Performanceobligationstoberecognizedasrevenuewithinnexttwelvemonths": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Performance obligations to be recognized as revenue within next twelve months.",
        "label": "Performance obligations to be recognized as revenue within next twelve months",
        "terseLabel": "Performance obligations to be recognized as revenue within next twelve months"
       }
      }
     },
     "localname": "Performanceobligationstoberecognizedasrevenuewithinnexttwelvemonths",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_PowerGenerationProjectAxis": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Power Generation Project [Axis]",
        "label": "Power Generation Project [Axis]",
        "terseLabel": "Project [Axis]"
       }
      }
     },
     "localname": "PowerGenerationProjectAxis",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail"
     ],
     "xbrltype": "stringItemType"
    },
    "mtrx_PowerGenerationProjectDomain": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "[Domain] for Power Generation Project [Axis]",
        "label": "Power Generation Project [Domain]",
        "terseLabel": "Power Generation Project [Domain]"
       }
      }
     },
     "localname": "PowerGenerationProjectDomain",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail"
     ],
     "xbrltype": "domainItemType"
    },
    "mtrx_PowerGenerationProjectUnapprovedChangeOrdersandClaimsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "[Line Items] for Power Generation Project Unapproved Change Orders and Claims [Table]",
        "label": "Power Generation Project Unapproved Change Orders and Claims [Line Items]",
        "terseLabel": "Project Unapproved Change Orders and Claims [Line Items]"
       }
      }
     },
     "localname": "PowerGenerationProjectUnapprovedChangeOrdersandClaimsLineItems",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail"
     ],
     "xbrltype": "stringItemType"
    },
    "mtrx_PowerGenerationProjectUnapprovedChangeOrdersandClaimsTable": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Power Generation Project Unapproved Change Orders and Claims [Table]",
        "label": "Power Generation Project Unapproved Change Orders and Claims [Table]",
        "terseLabel": "Project Unapproved Change Orders and Claims [Table]"
       }
      }
     },
     "localname": "PowerGenerationProjectUnapprovedChangeOrdersandClaimsTable",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail"
     ],
     "xbrltype": "stringItemType"
    },
    "mtrx_PriorYearCarrybackIncomeTaxReceivable": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Prior Year Carryback Income Tax Receivable",
        "label": "Prior Year Carryback Income Tax Receivable",
        "terseLabel": "Prior Year Carryback Income Tax Receivable"
       }
      }
     },
     "localname": "PriorYearCarrybackIncomeTaxReceivable",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_Priorfederalincometaxrate": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Federal income tax rate prior to the Tax Cuts and Jobs Act.",
        "label": "Prior federal income tax rate",
        "terseLabel": "Prior federal income tax rate"
       }
      }
     },
     "localname": "Priorfederalincometaxrate",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "pureItemType"
    },
    "mtrx_ProcessAndIndustrialFacilitiesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Process and Industrial Facilities",
        "label": "Process and Industrial Facilities [Member]",
        "terseLabel": "Process and Industrial Facilities"
       }
      }
     },
     "localname": "ProcessAndIndustrialFacilitiesMember",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails",
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails",
      "http://www.matrixservicecompany.com/role/RevenueDetails",
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "mtrx_Restrictionofdeductibilityofcertainexecutivecompensation": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Restriction of deductibility of certain executive compensation in excess of $1.0 million. Description of one of the major changes in connection with the Tax Cuts and Jobs Act of December 2017.",
        "label": "Restriction of deductibility of certain executive compensation",
        "terseLabel": "Restriction of deductibility of certain executive compensation"
       }
      }
     },
     "localname": "Restrictionofdeductibilityofcertainexecutivecompensation",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_RestructuringcostsbytypeAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Restructuring costs by type [Abstract]",
        "label": "Restructuring costs by type [Abstract]",
        "terseLabel": "Restructuring costs by type [Abstract]"
       }
      }
     },
     "localname": "RestructuringcostsbytypeAbstract",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "mtrx_RestructuringcostsreserveRollForward": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Restructuring costs reserve [Roll Forward]",
        "label": "Restructuring costs reserve [Roll Forward]",
        "terseLabel": "Restructuring costs reserve [Roll Forward]"
       }
      }
     },
     "localname": "RestructuringcostsreserveRollForward",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "mtrx_ScheduleOfIntangibleAssetsExcludingGoodwillTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule of intangible assets excluding goodwill.",
        "label": "Schedule Of Intangible Assets Excluding Goodwill Table [Text Block]",
        "terseLabel": "Schedule Of Intangible Assets Excluding Goodwill Table [Text Block]"
       }
      }
     },
     "localname": "ScheduleOfIntangibleAssetsExcludingGoodwillTableTextBlock",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "mtrx_StatementCondensedConsolidatedBalanceSheetsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Statement Condensed Consolidated Balance Sheets [Abstract]",
        "label": "Statement Condensed Consolidated Balance Sheets [Abstract]",
        "terseLabel": "Statement Condensed Consolidated Balance Sheets [Abstract]"
       }
      }
     },
     "localname": "StatementCondensedConsolidatedBalanceSheetsAbstract",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "xbrltype": "stringItemType"
    },
    "mtrx_StorageAndTerminalSolutionsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Storage and Terminal Solutions",
        "label": "Storage and Terminal Solutions [Member]",
        "terseLabel": "Storage and Terminal Solutions"
       }
      }
     },
     "localname": "StorageAndTerminalSolutionsMember",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails",
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails",
      "http://www.matrixservicecompany.com/role/RevenueDetails",
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "mtrx_TotalDeferredTaxAssetsGeneratedInTheSixMonthsEndedDecember31st2021Member": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total Deferred Tax Assets Generated in the Six Months Ended December 31st, 2021",
        "label": "Total Deferred Tax Assets Generated in the Six Months Ended December 31st, 2021 [Member]",
        "terseLabel": "Total Deferred Tax Assets Outstanding in Prior Quarters"
       }
      }
     },
     "localname": "TotalDeferredTaxAssetsGeneratedInTheSixMonthsEndedDecember31st2021Member",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "mtrx_Totalfuturepaymentsforleasenotyetcommenced": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total future payments for lease not yet commenced",
        "label": "Total future payments for lease not yet commenced",
        "terseLabel": "Total future payments for lease not yet commenced"
       }
      }
     },
     "localname": "Totalfuturepaymentsforleasenotyetcommenced",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_TransportationEquipmentGross": {
     "auth_ref": [],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_PropertyPlantAndEquipmentGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Transportation Equipment Gross",
        "label": "Transportation Equipment Gross",
        "terseLabel": "Transportation equipment"
       }
      }
     },
     "localname": "TransportationEquipmentGross",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "mtrx_UnallocatedCorporateCostsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Unallocated Corporate Costs.",
        "label": "Unallocated Corporate Costs [Member]",
        "terseLabel": "Corporate"
       }
      }
     },
     "localname": "UnallocatedCorporateCostsMember",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails",
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "mtrx_UnapprovedChangeOrdersOnPowerGenerationProjectMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Unapproved Change Orders On Power Generation Project [Member]",
        "label": "Unapproved Change Orders On Power Generation Project [Member]",
        "terseLabel": "Unapproved Change Orders On Power Generation Project [Member]"
       }
      }
     },
     "localname": "UnapprovedChangeOrdersOnPowerGenerationProjectMember",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail"
     ],
     "xbrltype": "domainItemType"
    },
    "mtrx_UtilityAndPowerInfrastructureMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Utility and Power Infrastructure.",
        "label": "Utility and Power Infrastructure [Member]",
        "terseLabel": "Utility and Power Infrastructure"
       }
      }
     },
     "localname": "UtilityAndPowerInfrastructureMember",
     "nsuri": "http://www.matrixservicecompany.com/20220331",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails",
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails",
      "http://www.matrixservicecompany.com/role/RevenueDetails",
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_ConsolidationItemsAxis": {
     "auth_ref": [
      "r100",
      "r143",
      "r156",
      "r157",
      "r158",
      "r159",
      "r161",
      "r163",
      "r167",
      "r244",
      "r245",
      "r246",
      "r247",
      "r248",
      "r249",
      "r251",
      "r252",
      "r254",
      "r256",
      "r257"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Consolidation Items [Axis]",
        "terseLabel": "Consolidation Items [Axis]"
       }
      }
     },
     "localname": "ConsolidationItemsAxis",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_ConsolidationItemsDomain": {
     "auth_ref": [
      "r100",
      "r143",
      "r156",
      "r157",
      "r158",
      "r159",
      "r161",
      "r163",
      "r167",
      "r244",
      "r245",
      "r246",
      "r247",
      "r248",
      "r249",
      "r251",
      "r252",
      "r254",
      "r256",
      "r257"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Consolidation Items [Domain]",
        "terseLabel": "Consolidation Items [Domain]"
       }
      }
     },
     "localname": "ConsolidationItemsDomain",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_MaximumMember": {
     "auth_ref": [
      "r259",
      "r274",
      "r309",
      "r310",
      "r396",
      "r397",
      "r398",
      "r399",
      "r400",
      "r401",
      "r404",
      "r439",
      "r441",
      "r460",
      "r461"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Maximum [Member]",
        "terseLabel": "Maximum [Member]"
       }
      }
     },
     "localname": "MaximumMember",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_MinimumMember": {
     "auth_ref": [
      "r259",
      "r274",
      "r309",
      "r310",
      "r396",
      "r397",
      "r398",
      "r399",
      "r400",
      "r401",
      "r404",
      "r439",
      "r441",
      "r460",
      "r461"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Minimum [Member]",
        "terseLabel": "Minimum [Member]"
       }
      }
     },
     "localname": "MinimumMember",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RangeAxis": {
     "auth_ref": [
      "r259",
      "r274",
      "r308",
      "r309",
      "r310",
      "r396",
      "r397",
      "r398",
      "r399",
      "r400",
      "r401",
      "r404",
      "r439",
      "r441",
      "r460",
      "r461"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statistical Measurement [Axis]",
        "terseLabel": "Statistical Measurement [Axis]"
       }
      }
     },
     "localname": "RangeAxis",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_RangeMember": {
     "auth_ref": [
      "r259",
      "r274",
      "r308",
      "r309",
      "r310",
      "r396",
      "r397",
      "r398",
      "r399",
      "r400",
      "r401",
      "r404",
      "r439",
      "r441",
      "r460",
      "r461"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statistical Measurement [Domain]",
        "terseLabel": "Statistical Measurement [Domain]"
       }
      }
     },
     "localname": "RangeMember",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_SegmentGeographicalDomain": {
     "auth_ref": [
      "r170",
      "r171",
      "r296",
      "r301",
      "r440",
      "r451",
      "r452",
      "r453",
      "r454",
      "r455",
      "r456",
      "r457",
      "r458",
      "r459"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Geographical [Domain]",
        "terseLabel": "Geographical [Domain]"
       }
      }
     },
     "localname": "SegmentGeographicalDomain",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_StatementGeographicalAxis": {
     "auth_ref": [
      "r170",
      "r171",
      "r296",
      "r301",
      "r440",
      "r448",
      "r451",
      "r452",
      "r453",
      "r454",
      "r455",
      "r456",
      "r457",
      "r458",
      "r459"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Geographical [Axis]",
        "terseLabel": "Geographical [Axis]"
       }
      }
     },
     "localname": "StatementGeographicalAxis",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AccountsPayableCurrent": {
     "auth_ref": [
      "r32",
      "r395"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of liabilities incurred (and for which invoices have typically been received) and payable to vendors for goods and services received that are used in an entity's business. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Accounts Payable, Current",
        "terseLabel": "Accounts payable"
       }
      }
     },
     "localname": "AccountsPayableCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccountsReceivableNetCurrent": {
     "auth_ref": [
      "r6",
      "r23",
      "r176",
      "r177"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of right to consideration from customer for product sold and service rendered in normal course of business, classified as current.",
        "label": "Accounts Receivable, after Allowance for Credit Loss, Current",
        "terseLabel": "Accounts receivable, less allowances (March 31, 2022\u2014$634 and June\u00a030, 2021\u2014$898)"
       }
      }
     },
     "localname": "AccountsReceivableNetCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccruedInsuranceCurrent": {
     "auth_ref": [
      "r12",
      "r13",
      "r35"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of obligations incurred through that date and payable to insurance entities to mitigate potential loss from various risks or to satisfy a promise to provide certain coverage's to employees. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Accrued Insurance, Current",
        "terseLabel": "Accrued insurance"
       }
      }
     },
     "localname": "AccruedInsuranceCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment": {
     "auth_ref": [
      "r30",
      "r211"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_PropertyPlantAndEquipmentNet",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of accumulated depreciation, depletion and amortization for physical assets used in the normal conduct of business to produce goods and services.",
        "label": "Accumulated Depreciation, Depletion and Amortization, Property, Plant, and Equipment",
        "negatedLabel": "Accumulated depreciation"
       }
      }
     },
     "localname": "AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax": {
     "auth_ref": [
      "r44",
      "r46",
      "r48",
      "r49",
      "r364"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_StockholdersEquityBeforeTreasuryStock",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Accumulated adjustment, net of tax, that results from the process of translating subsidiary financial statements and foreign equity investments into the reporting currency from the functional currency of the reporting entity, net of reclassification of realized foreign currency translation gains or losses.",
        "label": "Accumulated Other Comprehensive Income (Loss), Foreign Currency Translation Adjustment, Net of Tax",
        "terseLabel": "Accumulated other comprehensive loss"
       }
      }
     },
     "localname": "AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeMember": {
     "auth_ref": [
      "r45",
      "r49",
      "r54",
      "r55",
      "r56",
      "r102",
      "r103",
      "r104",
      "r355",
      "r442",
      "r443",
      "r469"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Accumulated increase (decrease) in equity from transactions and other events and circumstances from non-owner sources, attributable to the parent. Excludes net income (loss), and accumulated changes in equity from transactions resulting from investments by owners and distributions to owners.",
        "label": "AOCI Attributable to Parent [Member]",
        "terseLabel": "Accumulated Other Comprehensive Income (Loss)"
       }
      }
     },
     "localname": "AccumulatedOtherComprehensiveIncomeMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AdditionalPaidInCapital": {
     "auth_ref": [
      "r24",
      "r319",
      "r395"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_StockholdersEquityBeforeTreasuryStock",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of excess of issue price over par or stated value of stock and from other transaction involving stock or stockholder. Includes, but is not limited to, additional paid-in capital (APIC) for common and preferred stock.",
        "label": "Additional Paid in Capital",
        "terseLabel": "Additional paid-in capital"
       }
      }
     },
     "localname": "AdditionalPaidInCapital",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdditionalPaidInCapitalMember": {
     "auth_ref": [
      "r102",
      "r103",
      "r104",
      "r316",
      "r317",
      "r318",
      "r361"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Excess of issue price over par or stated value of the entity's capital stock and amounts received from other transactions involving the entity's stock or stockholders.",
        "label": "Additional Paid-in Capital [Member]",
        "terseLabel": "Additional Paid-In Capital"
       }
      }
     },
     "localname": "AdditionalPaidInCapitalMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AdjustmentsNoncashItemsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Adjustments, Noncash Items, to Reconcile Net Income (Loss) to Cash Provided by (Used in) Operating Activities [Abstract]",
        "terseLabel": "Adjustments to reconcile net loss to net cash used by operating activities:"
       }
      }
     },
     "localname": "AdjustmentsNoncashItemsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AdjustmentsToAdditionalPaidInCapitalOther": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of other increase (decrease) in additional paid in capital (APIC).",
        "label": "Adjustments to Additional Paid in Capital, Other",
        "terseLabel": "Issuance of deferred shares"
       }
      }
     },
     "localname": "AdjustmentsToAdditionalPaidInCapitalOther",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue": {
     "auth_ref": [
      "r311",
      "r312",
      "r320",
      "r321"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase to additional paid-in capital (APIC) for recognition of cost for award under share-based payment arrangement.",
        "label": "APIC, Share-based Payment Arrangement, Increase for Cost Recognition",
        "terseLabel": "Stock-based compensation expense"
       }
      }
     },
     "localname": "AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AllowanceForDoubtfulAccountsReceivableCurrent": {
     "auth_ref": [
      "r27",
      "r178",
      "r183"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of allowance for credit loss on accounts receivable, classified as current.",
        "label": "Accounts Receivable, Allowance for Credit Loss, Current",
        "terseLabel": "Accounts receivable, allowances"
       }
      }
     },
     "localname": "AllowanceForDoubtfulAccountsReceivableCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AmortizationOfIntangibleAssets": {
     "auth_ref": [
      "r85",
      "r198",
      "r204"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The aggregate expense charged against earnings to allocate the cost of intangible assets (nonphysical assets not used in production) in a systematic and rational manner to the periods expected to benefit from such assets. As a noncash expense, this element is added back to net income when calculating cash provided by or used in operations using the indirect method.",
        "label": "Amortization of Intangible Assets",
        "terseLabel": "Amortization of Intangible Assets"
       }
      }
     },
     "localname": "AmortizationOfIntangibleAssets",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount": {
     "auth_ref": [
      "r129"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) or earnings per unit (EPU) in the future that were not included in the computation of diluted EPS or EPU because to do so would increase EPS or EPU amounts or decrease loss per share or unit amounts for the period presented.",
        "label": "Antidilutive Securities Excluded from Computation of Earnings Per Share, Amount",
        "terseLabel": "Total antidilutive securities"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareAntidilutiveSecuritiesExcludedfromtheCalculationofDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis": {
     "auth_ref": [
      "r129"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of antidilutive security.",
        "label": "Antidilutive Securities [Axis]",
        "terseLabel": "Antidilutive Securities [Axis]"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareAntidilutiveSecuritiesExcludedfromtheCalculationofDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "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.",
        "label": "Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]",
        "terseLabel": "Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareAntidilutiveSecuritiesExcludedfromtheCalculationofDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AntidilutiveSecuritiesNameDomain": {
     "auth_ref": [
      "r129"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Incremental common shares attributable to securities that were not included in diluted earnings per share (EPS) because to do so would increase EPS amounts or decrease loss per share amounts for the period presented.",
        "label": "Antidilutive Securities, Name [Domain]",
        "terseLabel": "Antidilutive Securities, Name [Domain]"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareAntidilutiveSecuritiesExcludedfromtheCalculationofDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_Assets": {
     "auth_ref": [
      "r97",
      "r151",
      "r158",
      "r165",
      "r180",
      "r244",
      "r245",
      "r246",
      "r248",
      "r249",
      "r250",
      "r251",
      "r253",
      "r255",
      "r257",
      "r258",
      "r351",
      "r356",
      "r365",
      "r393",
      "r395",
      "r415",
      "r426"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all assets that are recognized. Assets are probable future economic benefits obtained or controlled by an entity as a result of past transactions or events.",
        "label": "Assets",
        "terseLabel": "Segment assets",
        "totalLabel": "Total assets"
       }
      }
     },
     "localname": "Assets",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AssetsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Assets [Abstract]",
        "terseLabel": "Assets"
       }
      }
     },
     "localname": "AssetsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AssetsCurrent": {
     "auth_ref": [
      "r7",
      "r8",
      "r43",
      "r97",
      "r180",
      "r244",
      "r245",
      "r246",
      "r248",
      "r249",
      "r250",
      "r251",
      "r253",
      "r255",
      "r257",
      "r258",
      "r351",
      "r356",
      "r365",
      "r393",
      "r395"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all assets that are expected to be realized in cash, sold, or consumed within one year (or the normal operating cycle, if longer). Assets are probable future economic benefits obtained or controlled by an entity as a result of past transactions or events.",
        "label": "Assets, Current",
        "totalLabel": "Total current assets"
       }
      }
     },
     "localname": "AssetsCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AssetsCurrentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Assets, Current [Abstract]",
        "terseLabel": "Current assets:"
       }
      }
     },
     "localname": "AssetsCurrentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_BasisOfPresentationAndSignificantAccountingPoliciesTextBlock": {
     "auth_ref": [
      "r101"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for the basis of presentation and significant accounting policies concepts. Basis of presentation describes the underlying basis used to prepare the financial statements (for example, US Generally Accepted Accounting Principles, Other Comprehensive Basis of Accounting, IFRS).  Accounting policies describe all significant accounting policies of the reporting entity.",
        "label": "Basis of Presentation and Significant Accounting Policies [Text Block]",
        "terseLabel": "Basis of Presentation"
       }
      }
     },
     "localname": "BasisOfPresentationAndSignificantAccountingPoliciesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/BasisofPresentationNotes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_BuildingsAndImprovementsGross": {
     "auth_ref": [
      "r10",
      "r210"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_PropertyPlantAndEquipmentGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before accumulated depreciation of building structures held for productive use including addition, improvement, or renovation to the structure, including, but not limited to, interior masonry, interior flooring, electrical, and plumbing.",
        "label": "Buildings and Improvements, Gross",
        "terseLabel": "Land and buildings"
       }
      }
     },
     "localname": "BuildingsAndImprovementsGross",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_BusinessExitCosts1": {
     "auth_ref": [
      "r85"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expenses associated with exit or disposal activities pursuant to an authorized plan. Includes, but is not limited to, one-time termination benefits, termination of an operating lease or other contract, consolidating or closing facilities, and relocating employees, and termination benefits associated with an ongoing benefit arrangement. Excludes expenses associated with special or contractual termination benefits, a discontinued operation or an asset retirement obligation.",
        "label": "Business Exit Costs",
        "terseLabel": "Facility costs"
       }
      }
     },
     "localname": "BusinessExitCosts1",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalExpendituresIncurredButNotYetPaid": {
     "auth_ref": [
      "r90",
      "r91",
      "r92"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Future cash outflow to pay for purchases of fixed assets that have occurred.",
        "label": "Capital Expenditures Incurred but Not yet Paid",
        "terseLabel": "Purchases of property, plant and equipment on account"
       }
      }
     },
     "localname": "CapitalExpendituresIncurredButNotYetPaid",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashAndCashEquivalentsAtCarryingValue": {
     "auth_ref": [
      "r4",
      "r28",
      "r87"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of currency on hand as well as demand deposits with banks or financial institutions. Includes other kinds of accounts that have the general characteristics of demand deposits. Also includes short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates. Excludes cash and cash equivalents within disposal group and discontinued operation.",
        "label": "Cash and Cash Equivalents, at Carrying Value",
        "terseLabel": "Cash and cash equivalents (Note 1)",
        "verboseLabel": "Cash and cash equivalents"
       }
      }
     },
     "localname": "CashAndCashEquivalentsAtCarryingValue",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/BasisofPresentationBasisofPresentationNarrativeDetails",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashAndCashEquivalentsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "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.",
        "label": "Cash and Cash Equivalents [Line Items]",
        "terseLabel": "Cash and Cash Equivalents [Line Items]"
       }
      }
     },
     "localname": "CashAndCashEquivalentsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/BasisofPresentationBasisofPresentationNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CashAndCashEquivalentsUnrestrictedCashAndCashEquivalentsPolicy": {
     "auth_ref": [
      "r88"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for cash and cash equivalents with respect to unrestricted balances.",
        "label": "Cash and Cash Equivalents, Unrestricted Cash and Cash Equivalents, Policy [Policy Text Block]",
        "terseLabel": "Cash and Cash Equivalents, Unrestricted Cash and Cash Equivalents, Policy"
       }
      }
     },
     "localname": "CashAndCashEquivalentsUnrestrictedCashAndCashEquivalentsPolicy",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/BasisofPresentationCashCashEquivalentsandRestrictedCashPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents": {
     "auth_ref": [
      "r81",
      "r87",
      "r93"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash and cash equivalents, and cash and cash equivalents restricted to withdrawal or usage. Excludes amount for disposal group and discontinued operations. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits. Cash equivalents include, but are not limited to, short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents",
        "periodStartLabel": "Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents, Beginning of Period",
        "terseLabel": "Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents, End of Period"
       }
      }
     },
     "localname": "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/BasisofPresentationBasisofPresentationNarrativeDetails",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect": {
     "auth_ref": [
      "r81",
      "r367"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) in cash, cash equivalents, and cash and cash equivalents restricted to withdrawal or usage; including effect from exchange rate change. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits. Cash equivalents include, but are not limited to, short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents, Period Increase (Decrease), Including Exchange Rate Effect",
        "terseLabel": "Decrease in cash, cash equivalents and restricted cash"
       }
      }
     },
     "localname": "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashFlowNoncashInvestingAndFinancingActivitiesDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Cash Flow, Noncash Investing and Financing Activities Disclosure [Abstract]",
        "terseLabel": "Non-cash investing and financing activities:"
       }
      }
     },
     "localname": "CashFlowNoncashInvestingAndFinancingActivitiesDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ChangeInAccountingPrincipleAccountingStandardsUpdateImmaterialEffect": {
     "auth_ref": [
      "r105",
      "r115",
      "r179",
      "r182",
      "r319",
      "r337"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicates (true false) whether effect from applying amendment to accounting standards is immaterial.",
        "label": "Change in Accounting Principle, Accounting Standards Update, Immaterial Effect [true false]",
        "terseLabel": "Change in Accounting Principle, Accounting Standards Update, Immaterial Effect [true false]"
       }
      }
     },
     "localname": "ChangeInAccountingPrincipleAccountingStandardsUpdateImmaterialEffect",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/BasisofPresentationBasisofPresentationNarrativeDetails"
     ],
     "xbrltype": "booleanItemType"
    },
    "us-gaap_ClassOfStockDomain": {
     "auth_ref": [
      "r95",
      "r97",
      "r118",
      "r122",
      "r123",
      "r125",
      "r128",
      "r136",
      "r137",
      "r138",
      "r180",
      "r244",
      "r249",
      "r250",
      "r251",
      "r257",
      "r258",
      "r272",
      "r273",
      "r275",
      "r276",
      "r365",
      "r467"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share of stock differentiated by the voting rights the holder receives. Examples include, but are not limited to, common stock, redeemable preferred stock, nonredeemable preferred stock, and convertible stock.",
        "label": "Class of Stock [Domain]",
        "terseLabel": "Class of Stock [Domain]"
       }
      }
     },
     "localname": "ClassOfStockDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CommitmentsAndContingencies": {
     "auth_ref": [
      "r37",
      "r234",
      "r418",
      "r431"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Represents the caption on the face of the balance sheet to indicate that the entity has entered into (1) purchase or supply arrangements that will require expending a portion of its resources to meet the terms thereof, and (2) is exposed to potential losses or, less frequently, gains, arising from (a) possible claims against a company's resources due to future performance under contract terms, and (b) possible losses or likely gains from uncertainties that will ultimately be resolved when one or more future events that are deemed likely to occur do occur or fail to occur.",
        "label": "Commitments and Contingencies",
        "terseLabel": "Commitments and contingencies"
       }
      }
     },
     "localname": "CommitmentsAndContingencies",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CommitmentsAndContingenciesDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Commitments and Contingencies Disclosure [Abstract]",
        "terseLabel": "Commitments and Contingencies Disclosure [Abstract]"
       }
      }
     },
     "localname": "CommitmentsAndContingenciesDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_CommitmentsAndContingenciesDisclosureTextBlock": {
     "auth_ref": [
      "r231",
      "r232",
      "r233",
      "r241",
      "r450"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for commitments and contingencies.",
        "label": "Commitments and Contingencies Disclosure [Text Block]",
        "terseLabel": "Commitments and Contingencies"
       }
      }
     },
     "localname": "CommitmentsAndContingenciesDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CommitmentsandContingenciesNotes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CommonStockMember": {
     "auth_ref": [
      "r102",
      "r103",
      "r361"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Stock that is subordinate to all other stock of the issuer.",
        "label": "Common Stock [Member]",
        "terseLabel": "Common Stock"
       }
      }
     },
     "localname": "CommonStockMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CommonStockParOrStatedValuePerShare": {
     "auth_ref": [
      "r20"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Face amount or stated value per share of common stock.",
        "label": "Common Stock, Par or Stated Value Per Share",
        "terseLabel": "Common stock, par value"
       }
      }
     },
     "localname": "CommonStockParOrStatedValuePerShare",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_CommonStockSharesAuthorized": {
     "auth_ref": [
      "r20"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The maximum number of common shares permitted to be issued by an entity's charter and bylaws.",
        "label": "Common Stock, Shares Authorized",
        "terseLabel": "Common stock, shares authorized"
       }
      }
     },
     "localname": "CommonStockSharesAuthorized",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockSharesIssued": {
     "auth_ref": [
      "r20"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total number of common shares of an entity that have been sold or granted to shareholders (includes common shares that were issued, repurchased and remain in the treasury). These shares represent capital invested by the firm's shareholders and owners, and may be all or only a portion of the number of shares authorized. Shares issued include shares outstanding and shares held in the treasury.",
        "label": "Common Stock, Shares, Issued",
        "terseLabel": "Common stock, shares issued"
       }
      }
     },
     "localname": "CommonStockSharesIssued",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockValue": {
     "auth_ref": [
      "r20",
      "r395"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_StockholdersEquityBeforeTreasuryStock",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Aggregate par or stated value of issued nonredeemable common stock (or common stock redeemable solely at the option of the issuer). This item includes treasury stock repurchased by the entity. Note: elements for number of nonredeemable common shares, par value and other disclosure concepts are in another section within stockholders' equity.",
        "label": "Common Stock, Value, Issued",
        "terseLabel": "Common stock\u2014$.01 par value; 60,000,000 shares authorized; 27,888,217 shares issued as of March 31, 2022 and June 30, 2021; 26,783,265 and 26,549,438 shares outstanding as of March 31, 2022 and June 30, 2021, respectively"
       }
      }
     },
     "localname": "CommonStockValue",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest": {
     "auth_ref": [
      "r51",
      "r53",
      "r61",
      "r350",
      "r360",
      "r421",
      "r434"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after tax of increase (decrease) in equity from transactions and other events and circumstances from net income and other comprehensive income. Excludes changes in equity resulting from investments by owners and distributions to owners.",
        "label": "Comprehensive Income (Loss), Net of Tax, Including Portion Attributable to Noncontrolling Interest",
        "totalLabel": "Comprehensive loss"
       }
      }
     },
     "localname": "ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ConstructionContractorReceivableRetainageAfterYearOne": {
     "auth_ref": [
      "r22",
      "r402",
      "r405"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of right to consideration in exchange for good or service transferred to customer withheld under retainage provision in long-term contract or program when right to consideration is unconditional, to be collected after next fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Construction Contractor, Receivable, Retainage, after Year One",
        "terseLabel": "Construction Contractor, Receivable, Retainage, after Year One"
       }
      }
     },
     "localname": "ConstructionContractorReceivableRetainageAfterYearOne",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ConstructionContractorReceivableRetainageYearOne": {
     "auth_ref": [
      "r22",
      "r406"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of right to consideration in exchange for good or service transferred to customer withheld under retainage provision in long-term contract or program when right to consideration is unconditional, to be collected in next fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Construction Contractor, Receivable, Retainage, Year One",
        "terseLabel": "Construction Contractor, Receivable, Retainage, Year One"
       }
      }
     },
     "localname": "ConstructionContractorReceivableRetainageYearOne",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ConstructionInProgressGross": {
     "auth_ref": [
      "r210"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 5.0,
       "parentTag": "us-gaap_PropertyPlantAndEquipmentGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of structure or a modification to a structure under construction. Includes recently completed structures or modifications to structures that have not been placed into service.",
        "label": "Construction in Progress, Gross",
        "terseLabel": "Construction in progress"
       }
      }
     },
     "localname": "ConstructionInProgressGross",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerAssetAndLiabilityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Contract with Customer, Contract Asset, Contract Liability, and Receivable [Abstract]",
        "terseLabel": "Contract with Customer, Asset and Liability [Abstract]"
       }
      }
     },
     "localname": "ContractWithCustomerAssetAndLiabilityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails",
      "http://www.matrixservicecompany.com/role/RevenueTables"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ContractWithCustomerAssetAndLiabilityTableTextBlock": {
     "auth_ref": [
      "r286"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of receivable, contract asset, and contract liability from contract with customer. Includes, but is not limited to, change in contract asset and contract liability.",
        "label": "Contract with Customer, Contract Asset, Contract Liability, and Receivable [Table Text Block]",
        "terseLabel": "Contract with Customer, Asset and Liability [Table Text Block]"
       }
      }
     },
     "localname": "ContractWithCustomerAssetAndLiabilityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ContractWithCustomerAssetCumulativeCatchUpAdjustmentToRevenueChangeInMeasureOfProgress": {
     "auth_ref": [
      "r285"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) in revenue recognized for cumulative catch-up adjustment from change in measure of progress which increases (decreases) right to consideration in exchange for good or service transferred to customer when right is conditioned on something other than passage of time.",
        "label": "Contract with Customer, Asset, Cumulative Catch-up Adjustment to Revenue, Change in Measure of Progress",
        "negatedTerseLabel": "Contract with Customer, Asset, Cumulative Catch-up Adjustment to Revenue, Change in Measure of Progress"
       }
      }
     },
     "localname": "ContractWithCustomerAssetCumulativeCatchUpAdjustmentToRevenueChangeInMeasureOfProgress",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerAssetNetCurrent": {
     "auth_ref": [
      "r282",
      "r284",
      "r297"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of right to consideration in exchange for good or service transferred to customer when right is conditioned on something other than passage of time, classified as current.",
        "label": "Contract with Customer, Asset, after Allowance for Credit Loss, Current",
        "terseLabel": "Costs and estimated earnings in excess of billings on uncompleted contracts"
       }
      }
     },
     "localname": "ContractWithCustomerAssetNetCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerBasisOfPricingAxis": {
     "auth_ref": [
      "r296",
      "r303"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by basis of pricing for contract representing right to consideration in exchange for good or service transferred to customer.",
        "label": "Contract with Customer, Basis of Pricing [Axis]",
        "terseLabel": "Contract with Customer, Basis of Pricing [Axis]"
       }
      }
     },
     "localname": "ContractWithCustomerBasisOfPricingAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails",
      "http://www.matrixservicecompany.com/role/RevenueTables"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ContractWithCustomerBasisOfPricingDomain": {
     "auth_ref": [
      "r296",
      "r303"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Basis of pricing for contract with customer. Includes, but is not limited to, fixed-price and time-and-materials contracts.",
        "label": "Contract with Customer, Basis of Pricing [Domain]",
        "terseLabel": "Contract with Customer, Basis of Pricing [Domain]"
       }
      }
     },
     "localname": "ContractWithCustomerBasisOfPricingDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails",
      "http://www.matrixservicecompany.com/role/RevenueTables"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityCurrent": {
     "auth_ref": [
      "r282",
      "r283",
      "r297"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of obligation to transfer good or service to customer for which consideration has been received or is receivable, classified as current.",
        "label": "Contract with Customer, Liability, Current",
        "negatedTerseLabel": "Billings on uncompleted contracts in excess of costs and estimated earnings",
        "terseLabel": "Billings on uncompleted contracts in excess of costs and estimated earnings"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityRevenueRecognized": {
     "auth_ref": [
      "r298"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of revenue recognized that was previously included in balance of obligation to transfer good or service to customer for which consideration from customer has been received or is due.",
        "label": "Contract with Customer, Liability, Revenue Recognized",
        "terseLabel": "Contract with Customer, Liability, Revenue Recognized"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityRevenueRecognized",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractsReceivableClaimsAndUncertainAmounts": {
     "auth_ref": [
      "r21",
      "r403"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of billed or unbilled claims or other similar items subject to uncertainty concerning their determination or ultimate realization under long-term contracts.",
        "label": "Contracts Receivable, Claims and Uncertain Amounts",
        "terseLabel": "Contracts Receivable, Claims and Uncertain Amounts"
       }
      }
     },
     "localname": "ContractsReceivableClaimsAndUncertainAmounts",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CostOfGoodsAndServicesSold": {
     "auth_ref": [
      "r65",
      "r409"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome": {
       "order": 2.0,
       "parentTag": "us-gaap_GrossProfit",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The aggregate costs related to goods produced and sold and services rendered by an entity during the reporting period. This excludes costs incurred during the reporting period related to financial services rendered and other revenue generating activities.",
        "label": "Cost of Goods and Services Sold",
        "terseLabel": "Cost of revenue"
       }
      }
     },
     "localname": "CostOfGoodsAndServicesSold",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CustomerRelationshipsMember": {
     "auth_ref": [
      "r346"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Customer relationship that exists between an entity and its customer, for example, but not limited to, tenant relationships.",
        "label": "Customer Relationships [Member]",
        "terseLabel": "Customer Relationships [Member]"
       }
      }
     },
     "localname": "CustomerRelationshipsMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_DebtDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Debt Disclosure [Abstract]",
        "terseLabel": "Debt Disclosure [Abstract]"
       }
      }
     },
     "localname": "DebtDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_DebtDisclosureTextBlock": {
     "auth_ref": [
      "r94",
      "r260",
      "r261",
      "r262",
      "r263",
      "r264",
      "r265",
      "r266",
      "r267",
      "r268",
      "r269",
      "r270",
      "r271"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for information about short-term and long-term debt arrangements, which includes amounts of borrowings under each line of credit, note payable, commercial paper issue, bonds indenture, debenture issue, own-share lending arrangements and any other contractual agreement to repay funds, and about the underlying arrangements, rationale for a classification as long-term, including repayment terms, interest rates, collateral provided, restrictions on use of assets and activities, whether or not in compliance with debt covenants, and other matters important to users of the financial statements, such as the effects of refinancing and noncompliance with debt covenants.",
        "label": "Debt Disclosure [Text Block]",
        "terseLabel": "Debt"
       }
      }
     },
     "localname": "DebtDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/DebtNotes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DeferredIncomeTaxAssetsNet": {
     "auth_ref": [
      "r323",
      "r324"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 7.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after allocation of valuation allowances and deferred tax liability, of deferred tax asset attributable to deductible differences and carryforwards, with jurisdictional netting.",
        "label": "Deferred Income Tax Assets, Net",
        "terseLabel": "Deferred income taxes"
       }
      }
     },
     "localname": "DeferredIncomeTaxAssetsNet",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredIncomeTaxLiabilitiesNet": {
     "auth_ref": [
      "r323",
      "r324"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after deferred tax asset, of deferred tax liability attributable to taxable differences with jurisdictional netting.",
        "label": "Deferred Income Tax Liabilities, Net",
        "terseLabel": "Deferred income taxes"
       }
      }
     },
     "localname": "DeferredIncomeTaxLiabilitiesNet",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetDomain": {
     "auth_ref": [
      "r329"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Identification of the deferred tax asset for which a valuation reserve exists.",
        "label": "Deferred Tax Asset [Domain]",
        "terseLabel": "Deferred Tax Asset [Domain]"
       }
      }
     },
     "localname": "DeferredTaxAssetDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_DeferredTaxAssetsLiabilitiesNet": {
     "auth_ref": [
      "r330"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after allocation of valuation allowances and deferred tax liability, of deferred tax asset attributable to deductible differences and carryforwards, without jurisdictional netting.",
        "label": "Deferred Tax Assets, Net",
        "terseLabel": "Deferred Tax Assets, Net"
       }
      }
     },
     "localname": "DeferredTaxAssetsLiabilitiesNet",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsTaxCreditCarryforwardsForeign": {
     "auth_ref": [
      "r332",
      "r333",
      "r334"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before allocation of valuation allowances of deferred tax asset attributable to deductible foreign tax credit carryforwards.",
        "label": "Deferred Tax Assets, Tax Credit Carryforwards, Foreign",
        "terseLabel": "Deferred Tax Assets, Tax Credit Carryforwards, Foreign"
       }
      }
     },
     "localname": "DeferredTaxAssetsTaxCreditCarryforwardsForeign",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsValuationAllowance": {
     "auth_ref": [
      "r329"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of deferred tax assets for which it is more likely than not that a tax benefit will not be realized.",
        "label": "Deferred Tax Assets, Valuation Allowance",
        "terseLabel": "Deferred Tax Assets, Valuation Allowance"
       }
      }
     },
     "localname": "DeferredTaxAssetsValuationAllowance",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxLiabilities": {
     "auth_ref": [
      "r324",
      "r330"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after deferred tax asset, of deferred tax liability attributable to taxable differences without jurisdictional netting.",
        "label": "Deferred Tax Liabilities, Net",
        "terseLabel": "Deferred Tax Liabilities, Net"
       }
      }
     },
     "localname": "DeferredTaxLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DepreciationDepletionAndAmortization": {
     "auth_ref": [
      "r85",
      "r146"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The aggregate expense recognized in the current period that allocates the cost of tangible assets, intangible assets, or depleting assets to periods that benefit from use of the assets.",
        "label": "Depreciation, Depletion and Amortization",
        "terseLabel": "Depreciation and amortization"
       }
      }
     },
     "localname": "DepreciationDepletionAndAmortization",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DisaggregationOfRevenueAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Disaggregation of Revenue [Abstract]",
        "terseLabel": "Disaggregation of Revenue [Abstract]"
       }
      }
     },
     "localname": "DisaggregationOfRevenueAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DisaggregationOfRevenueLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "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.",
        "label": "Disaggregation of Revenue [Line Items]",
        "terseLabel": "Disaggregation of Revenue [Line Items]"
       }
      }
     },
     "localname": "DisaggregationOfRevenueLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails",
      "http://www.matrixservicecompany.com/role/RevenueTables"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DisaggregationOfRevenueTable": {
     "auth_ref": [
      "r296",
      "r300",
      "r301",
      "r302",
      "r303",
      "r304",
      "r305",
      "r306"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about disaggregation of revenue into categories depicting how nature, amount, timing, and uncertainty of revenue and cash flows are affected by economic factor.",
        "label": "Disaggregation of Revenue [Table]",
        "terseLabel": "Disaggregation of Revenue [Table]"
       }
      }
     },
     "localname": "DisaggregationOfRevenueTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails",
      "http://www.matrixservicecompany.com/role/RevenueTables"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DisaggregationOfRevenueTableTextBlock": {
     "auth_ref": [
      "r296"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of disaggregation of revenue into categories depicting how nature, amount, timing, and uncertainty of revenue and cash flows are affected by economic factor.",
        "label": "Disaggregation of Revenue [Table Text Block]",
        "terseLabel": "Revenue from External Customers by Contract Type"
       }
      }
     },
     "localname": "DisaggregationOfRevenueTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DisclosureTextBlockAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Disclosure Text Block [Abstract]"
       }
      }
     },
     "localname": "DisclosureTextBlockAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_EarningsPerShareAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Earnings Per Share [Abstract]",
        "terseLabel": "Earnings Per Share [Abstract]"
       }
      }
     },
     "localname": "EarningsPerShareAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_EarningsPerShareBasic": {
     "auth_ref": [
      "r62",
      "r107",
      "r108",
      "r109",
      "r110",
      "r111",
      "r116",
      "r118",
      "r125",
      "r127",
      "r128",
      "r132",
      "r133",
      "r362",
      "r363",
      "r422",
      "r435"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of net income (loss) for the period per each share of common stock or unit outstanding during the reporting period.",
        "label": "Earnings Per Share, Basic",
        "terseLabel": "Basic loss per common share",
        "verboseLabel": "Basic EPS (US$ per share)"
       }
      }
     },
     "localname": "EarningsPerShareBasic",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome",
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_EarningsPerShareBasicAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Earnings Per Share, Basic [Abstract]",
        "terseLabel": "Earnings Per Share, Basic [Abstract]"
       }
      }
     },
     "localname": "EarningsPerShareBasicAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_EarningsPerShareBasicLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "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.",
        "label": "Earnings Per Share, Basic, by Common Class, Including Two Class Method [Line Items]",
        "terseLabel": "Earnings Per Share, Basic, by Common Class, Including Two Class Method [Line Items]"
       }
      }
     },
     "localname": "EarningsPerShareBasicLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_EarningsPerShareDiluted": {
     "auth_ref": [
      "r62",
      "r107",
      "r108",
      "r109",
      "r110",
      "r111",
      "r118",
      "r125",
      "r127",
      "r128",
      "r132",
      "r133",
      "r362",
      "r363",
      "r422",
      "r435"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of net income (loss) for the period available to each share of common stock or common unit outstanding during the reporting period and to each share or unit that would have been outstanding assuming the issuance of common shares or units for all dilutive potential common shares or units outstanding during the reporting period.",
        "label": "Earnings Per Share, Diluted",
        "terseLabel": "Diluted loss per common share",
        "verboseLabel": "Diluted EPS (US$ per share)"
       }
      }
     },
     "localname": "EarningsPerShareDiluted",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome",
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_EarningsPerShareDilutedAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Earnings Per Share, Diluted [Abstract]",
        "terseLabel": "Earnings Per Share, Diluted [Abstract]"
       }
      }
     },
     "localname": "EarningsPerShareDilutedAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_EarningsPerShareTextBlock": {
     "auth_ref": [
      "r129",
      "r130",
      "r131",
      "r134"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for earnings per share.",
        "label": "Earnings Per Share [Text Block]",
        "terseLabel": "Earnings per Common Share"
       }
      }
     },
     "localname": "EarningsPerShareTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareNotes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_EffectOfExchangeRateOnCashAndCashEquivalents": {
     "auth_ref": [
      "r367"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 4.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) from the effect of exchange rate changes on cash and cash equivalent balances held in foreign currencies.",
        "label": "Effect of Exchange Rate on Cash and Cash Equivalents",
        "terseLabel": "Effect of exchange rate changes on cash, cash equivalents and restricted cash"
       }
      }
     },
     "localname": "EffectOfExchangeRateOnCashAndCashEquivalents",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EffectiveIncomeTaxRateContinuingOperations": {
     "auth_ref": [
      "r326"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Percentage of current income tax expense (benefit) and deferred income tax expense (benefit) pertaining to continuing operations.",
        "label": "Effective Income Tax Rate Reconciliation, Percent",
        "terseLabel": "Effective Income Tax Rate Reconciliation, Percent"
       }
      }
     },
     "localname": "EffectiveIncomeTaxRateContinuingOperations",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_EffectiveIncomeTaxRateReconciliationChangeInEnactedTaxRate": {
     "auth_ref": [
      "r326",
      "r340"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Percentage of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to changes in the income tax rates.",
        "label": "Effective Income Tax Rate Reconciliation, Change in Enacted Tax Rate, Percent",
        "terseLabel": "Effective Income Tax Rate Reconciliation, Change in Enacted Tax Rate, Percent"
       }
      }
     },
     "localname": "EffectiveIncomeTaxRateReconciliationChangeInEnactedTaxRate",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_EffectiveIncomeTaxRateReconciliationTaxCreditsOther": {
     "auth_ref": [
      "r326",
      "r340"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Percentage of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to other tax credits.",
        "label": "Effective Income Tax Rate Reconciliation, Tax Credit, Other, Percent",
        "terseLabel": "Effective Income Tax Rate Reconciliation, Tax Credit, Other, Percent"
       }
      }
     },
     "localname": "EffectiveIncomeTaxRateReconciliationTaxCreditsOther",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_EmployeeRelatedLiabilitiesCurrent": {
     "auth_ref": [
      "r35"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total of the carrying values as of the balance sheet date of obligations incurred through that date and payable for obligations related to services received from employees, such as accrued salaries and bonuses, payroll taxes and fringe benefits. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Employee-related Liabilities, Current",
        "terseLabel": "Accrued wages and benefits"
       }
      }
     },
     "localname": "EmployeeRelatedLiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeStockOptionMember": {
     "auth_ref": [
      "r314"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share-based payment arrangement granting right, subject to vesting and other restrictions, to purchase or sell certain number of shares at predetermined price for specified period of time.",
        "label": "Share-based Payment Arrangement, Option [Member]",
        "terseLabel": "Stock Options [Member]"
       }
      }
     },
     "localname": "EmployeeStockOptionMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareAntidilutiveSecuritiesExcludedfromtheCalculationofDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_EquityComponentDomain": {
     "auth_ref": [
      "r0",
      "r54",
      "r55",
      "r56",
      "r102",
      "r103",
      "r104",
      "r106",
      "r112",
      "r114",
      "r135",
      "r181",
      "r277",
      "r278",
      "r316",
      "r317",
      "r318",
      "r335",
      "r336",
      "r361",
      "r368",
      "r369",
      "r370",
      "r371",
      "r372",
      "r374",
      "r442",
      "r443",
      "r444",
      "r469"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Components of equity are the parts of the total Equity balance including that which is allocated to common, preferred, treasury stock, retained earnings, etc.",
        "label": "Equity Component [Domain]",
        "terseLabel": "Equity Component [Domain]"
       }
      }
     },
     "localname": "EquityComponentDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FederalIncomeTaxNoteTable": {
     "auth_ref": [
      "r447"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Table of federal income tax note for schedule of investments. The federal income tax note may be qualified for security investments, non-security investments and/or for the combination of security and non-security investments.",
        "label": "Federal Income Tax Note [Table]",
        "terseLabel": "Federal Income Tax Note [Table]"
       }
      }
     },
     "localname": "FederalIncomeTaxNoteTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetUsefulLife": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Useful life of finite-lived intangible assets, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days.",
        "label": "Finite-Lived Intangible Asset, Useful Life",
        "terseLabel": "Finite-Lived Intangible Asset, Useful Life"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetUsefulLife",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization": {
     "auth_ref": [
      "r203"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_FiniteLivedIntangibleAssetsNet",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Accumulated amount of amortization of assets, excluding financial assets and goodwill, lacking physical substance with a finite life.",
        "label": "Finite-Lived Intangible Assets, Accumulated Amortization",
        "negatedLabel": "Accumulated Amortization"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsAccumulatedAmortization",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of amortization for asset, excluding financial asset and goodwill, lacking physical substance with finite life expected to be recognized after fifth fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Finite-Lived Intangible Asset, Expected Amortization, after Year Five",
        "terseLabel": "Finite-Lived Intangible Assets, Amortization Expense, after Year Five"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths": {
     "auth_ref": [
      "r205"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of amortization for assets, excluding financial assets and goodwill, lacking physical substance with finite life expected to be recognized in next fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Finite-Lived Intangible Asset, Expected Amortization, Year One",
        "verboseLabel": "Finite-Lived Intangible Assets, Amortization Expense, Next Year"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of amortization for assets, excluding financial assets and goodwill, lacking physical substance with finite life expected to be recognized in remainder of current fiscal year.",
        "label": "Finite-Lived Intangible Asset, Expected Amortization, Remainder of Fiscal Year",
        "verboseLabel": "Finite-Lived Intangible Assets, Amortization Expense, Remainder of Fiscal Year"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsAmortizationExpenseRemainderOfFiscalYear",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive": {
     "auth_ref": [
      "r205"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of amortization for assets, excluding financial assets and goodwill, lacking physical substance with finite life expected to be recognized in fifth fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Finite-Lived Intangible Asset, Expected Amortization, Year Five",
        "terseLabel": "Finite-Lived Intangible Assets, Amortization Expense, Year Five"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsAmortizationExpenseYearFive",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour": {
     "auth_ref": [
      "r205"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of amortization for assets, excluding financial assets and goodwill, lacking physical substance with finite life expected to be recognized in fourth fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Finite-Lived Intangible Asset, Expected Amortization, Year Four",
        "verboseLabel": "Finite-Lived Intangible Assets, Amortization Expense, Year Four"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsAmortizationExpenseYearFour",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree": {
     "auth_ref": [
      "r205"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of amortization for assets, excluding financial assets and goodwill, lacking physical substance with finite life expected to be recognized in third fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Finite-Lived Intangible Asset, Expected Amortization, Year Three",
        "verboseLabel": "Finite-Lived Intangible Assets, Amortization Expense, Year Three"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsAmortizationExpenseYearThree",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo": {
     "auth_ref": [
      "r205"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of amortization for assets, excluding financial assets and goodwill, lacking physical substance with finite life expected to be recognized in second fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Finite-Lived Intangible Asset, Expected Amortization, Year Two",
        "verboseLabel": "Finite-Lived Intangible Assets, Amortization Expense, Year Two"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis": {
     "auth_ref": [
      "r199",
      "r200",
      "r203",
      "r207",
      "r410",
      "r411"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by major type or class of finite-lived intangible assets.",
        "label": "Finite-Lived Intangible Assets by Major Class [Axis]",
        "terseLabel": "Finite-Lived Intangible Assets by Major Class [Axis]"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsByMajorClassAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails",
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails",
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillTables"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsGross": {
     "auth_ref": [
      "r203",
      "r411"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_FiniteLivedIntangibleAssetsNet",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before amortization of assets, excluding financial assets and goodwill, lacking physical substance with a finite life.",
        "label": "Finite-Lived Intangible Assets, Gross",
        "terseLabel": "Finite-Lived Intangible Assets, Gross"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsGross",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "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.",
        "label": "Finite-Lived Intangible Assets [Line Items]",
        "terseLabel": "Finite-Lived Intangible Assets [Line Items]"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails",
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails",
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillTables"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain": {
     "auth_ref": [
      "r199",
      "r202"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The major class of finite-lived intangible asset (for example, patents, trademarks, copyrights, etc.) A major class is composed of intangible assets that can be grouped together because they are similar, either by their nature or by their use in the operations of a company.",
        "label": "Finite-Lived Intangible Assets, Major Class Name [Domain]",
        "terseLabel": "Finite-Lived Intangible Assets, Major Class Name [Domain]"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsMajorClassNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails",
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails",
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillTables"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsNet": {
     "auth_ref": [
      "r203",
      "r410"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_IntangibleAssetsNetExcludingGoodwill",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after amortization of assets, excluding financial assets and goodwill, lacking physical substance with a finite life.",
        "label": "Finite-Lived Intangible Assets, Net",
        "terseLabel": "Finite-Lived Intangible Assets, Net",
        "totalLabel": "Net Carrying Amount"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsNet",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails",
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsRemainingAmortizationPeriod1": {
     "auth_ref": [
      "r410"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Remaining amortization period of finite-lived intangible assets, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days.",
        "label": "Finite-Lived Intangible Assets, Remaining Amortization Period",
        "terseLabel": "Finite-Lived Intangible Assets, Remaining Amortization Period"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsRemainingAmortizationPeriod1",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_FixedPriceContractMember": {
     "auth_ref": [
      "r303"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Contract with customer in which amount of consideration is fixed.",
        "label": "Fixed-price Contract [Member]",
        "terseLabel": "Fixed-price Contract"
       }
      }
     },
     "localname": "FixedPriceContractMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_GainLossOnSaleOfPropertyPlantEquipment": {
     "auth_ref": [
      "r85"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 7.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of gain (loss) on sale or disposal of property, plant and equipment assets, including oil and gas property and timber property.",
        "label": "Gain (Loss) on Disposition of Property Plant Equipment",
        "negatedLabel": "Gain on sale of property, plant and equipment"
       }
      }
     },
     "localname": "GainLossOnSaleOfPropertyPlantEquipment",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_Goodwill": {
     "auth_ref": [
      "r185",
      "r187",
      "r395",
      "r414"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 5.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      },
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after accumulated impairment loss of an asset representing future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized.",
        "label": "Goodwill",
        "periodEndLabel": "Net balance at March 31, 2022",
        "periodStartLabel": "Net balance at June 30, 2021",
        "terseLabel": "Goodwill",
        "totalLabel": "Goodwill"
       }
      }
     },
     "localname": "Goodwill",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GoodwillAcquiredDuringPeriod": {
     "auth_ref": [
      "r189"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase in asset representing future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized resulting from a business combination.",
        "label": "Goodwill, Acquired During Period",
        "terseLabel": "Goodwill, Acquired During Period"
       }
      }
     },
     "localname": "GoodwillAcquiredDuringPeriod",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GoodwillAndIntangibleAssetImpairment": {
     "auth_ref": [],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      },
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome": {
       "order": 3.0,
       "parentTag": "us-gaap_OperatingIncomeLoss",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total loss recognized during the period from the impairment of goodwill plus the loss recognized in the period resulting from the impairment of the carrying amount of intangible assets, other than goodwill.",
        "label": "Goodwill and Intangible Asset Impairment",
        "terseLabel": "Goodwill impairment"
       }
      }
     },
     "localname": "GoodwillAndIntangibleAssetImpairment",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GoodwillAndIntangibleAssetsDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Goodwill and Intangible Assets Disclosure [Abstract]",
        "terseLabel": "Goodwill and Intangible Assets Disclosure [Abstract]"
       }
      }
     },
     "localname": "GoodwillAndIntangibleAssetsDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_GoodwillAndIntangibleAssetsDisclosureTextBlock": {
     "auth_ref": [
      "r209"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for goodwill and intangible assets.",
        "label": "Goodwill and Intangible Assets Disclosure [Text Block]",
        "terseLabel": "Intangible Assets Including Goodwill"
       }
      }
     },
     "localname": "GoodwillAndIntangibleAssetsDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillNotes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_GoodwillForeignCurrencyTranslationGainLoss": {
     "auth_ref": [
      "r192"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of foreign currency translation gain (loss) which increases (decreases) an asset representing future economic benefits from other assets acquired in a business combination that are not individually identified and separately recognized.",
        "label": "Goodwill, Foreign Currency Translation Gain (Loss)",
        "terseLabel": "Translation adjustment"
       }
      }
     },
     "localname": "GoodwillForeignCurrencyTranslationGainLoss",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GoodwillGross": {
     "auth_ref": [
      "r188",
      "r193"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_Goodwill",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before accumulated impairment loss of an asset representing future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized.",
        "label": "Goodwill, Gross",
        "terseLabel": "Goodwill"
       }
      }
     },
     "localname": "GoodwillGross",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GoodwillImpairedAccumulatedImpairmentLoss": {
     "auth_ref": [
      "r188",
      "r193"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_Goodwill",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of accumulated impairment loss for an asset representing future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized.",
        "label": "Goodwill, Impaired, Accumulated Impairment Loss",
        "negatedLabel": "Cumulative impairment loss"
       }
      }
     },
     "localname": "GoodwillImpairedAccumulatedImpairmentLoss",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GoodwillImpairmentLoss": {
     "auth_ref": [
      "r85",
      "r186",
      "r191",
      "r195"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of loss from the write-down of an asset representing the future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized.",
        "label": "Goodwill, Impairment Loss",
        "negatedLabel": "Goodwill impairment"
       }
      }
     },
     "localname": "GoodwillImpairmentLoss",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GoodwillLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "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.",
        "label": "Goodwill [Line Items]",
        "terseLabel": "Goodwill [Line Items]"
       }
      }
     },
     "localname": "GoodwillLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_GoodwillRollForward": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Goodwill [Roll Forward]",
        "terseLabel": "Goodwill [Roll Forward]"
       }
      }
     },
     "localname": "GoodwillRollForward",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_GoodwillWrittenOffRelatedToSaleOfBusinessUnit": {
     "auth_ref": [
      "r190"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of divestiture of an asset representing future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized.",
        "label": "Goodwill, Written off Related to Sale of Business Unit",
        "terseLabel": "Goodwill, Written off Related to Sale of Business Unit"
       }
      }
     },
     "localname": "GoodwillWrittenOffRelatedToSaleOfBusinessUnit",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GrossProfit": {
     "auth_ref": [
      "r64",
      "r97",
      "r151",
      "r157",
      "r161",
      "r164",
      "r167",
      "r180",
      "r244",
      "r245",
      "r246",
      "r249",
      "r250",
      "r251",
      "r253",
      "r255",
      "r257",
      "r258",
      "r365"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome": {
       "order": 1.0,
       "parentTag": "us-gaap_OperatingIncomeLoss",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Aggregate revenue less cost of goods and services sold or operating expenses directly attributable to the revenue generation activity.",
        "label": "Gross Profit",
        "terseLabel": "Gross profit (loss)",
        "totalLabel": "Gross profit (loss)"
       }
      }
     },
     "localname": "GrossProfit",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome",
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ImpairmentOfIntangibleAssetsFinitelived": {
     "auth_ref": [
      "r85",
      "r208"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of impairment loss recognized in the period resulting from the write-down of the carrying amount of a finite-lived intangible asset to fair value.",
        "label": "Impairment of Intangible Assets, Finite-lived",
        "terseLabel": "Impairment of Intangible Assets, Finite-lived"
       }
      }
     },
     "localname": "ImpairmentOfIntangibleAssetsFinitelived",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill": {
     "auth_ref": [
      "r85",
      "r208"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of impairment loss resulting from write-down of assets, excluding financial assets and goodwill, lacking physical substance and having a projected indefinite period of benefit to fair value.",
        "label": "Impairment of Intangible Assets, Indefinite-lived (Excluding Goodwill)",
        "terseLabel": "Impairment of Intangible Assets, Indefinite-lived (Excluding Goodwill)"
       }
      }
     },
     "localname": "ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest": {
     "auth_ref": [
      "r59",
      "r151",
      "r157",
      "r161",
      "r164",
      "r167",
      "r412",
      "r419",
      "r424",
      "r436"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome": {
       "order": 1.0,
       "parentTag": "us-gaap_ProfitLoss",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of income (loss) from continuing operations, including income (loss) from equity method investments, before deduction of income tax expense (benefit), and income (loss) attributable to noncontrolling interest.",
        "label": "Income (Loss) from Continuing Operations before Income Taxes, Noncontrolling Interest",
        "totalLabel": "Loss before income tax expense (benefit)"
       }
      }
     },
     "localname": "IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeStatementAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Income Statement [Abstract]",
        "terseLabel": "Income Statement [Abstract]"
       }
      }
     },
     "localname": "IncomeStatementAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeTaxDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Income Tax Disclosure [Abstract]",
        "terseLabel": "Income Tax Disclosure [Abstract]"
       }
      }
     },
     "localname": "IncomeTaxDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeTaxDisclosureTextBlock": {
     "auth_ref": [
      "r98",
      "r327",
      "r328",
      "r331",
      "r338",
      "r341",
      "r343",
      "r344",
      "r345"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for income taxes. Disclosures may include net deferred tax liability or asset recognized in an enterprise's statement of financial position, net change during the year in the total valuation allowance, approximate tax effect of each type of temporary difference and carryforward that gives rise to a significant portion of deferred tax liabilities and deferred tax assets, utilization of a tax carryback, and tax uncertainties information.",
        "label": "Income Tax Disclosure [Text Block]",
        "terseLabel": "Income Tax Disclosure"
       }
      }
     },
     "localname": "IncomeTaxDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_IncomeTaxExpenseBenefit": {
     "auth_ref": [
      "r99",
      "r113",
      "r114",
      "r149",
      "r325",
      "r339",
      "r342",
      "r437"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome": {
       "order": 2.0,
       "parentTag": "us-gaap_ProfitLoss",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of current income tax expense (benefit) and deferred income tax expense (benefit) pertaining to continuing operations.",
        "label": "Income Tax Expense (Benefit)",
        "terseLabel": "Provision (benefit) for federal, state and foreign income taxes"
       }
      }
     },
     "localname": "IncomeTaxExpenseBenefit",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationChangeInDeferredTaxAssetsValuationAllowance": {
     "auth_ref": [
      "r326"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to increase (decrease) in the valuation allowance for deferred tax assets.",
        "label": "Effective Income Tax Rate Reconciliation, Change in Deferred Tax Assets Valuation Allowance, Amount",
        "terseLabel": "Effective Income Tax Rate Reconciliation, Change in Deferred Tax Assets Valuation Allowance, Amount"
       }
      }
     },
     "localname": "IncomeTaxReconciliationChangeInDeferredTaxAssetsValuationAllowance",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationChangeInEnactedTaxRate": {
     "auth_ref": [
      "r322",
      "r326"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations, attributable to increase (decrease) in the income tax rates.",
        "label": "Effective Income Tax Rate Reconciliation, Change in Enacted Tax Rate, Amount",
        "terseLabel": "Effective Income Tax Rate Reconciliation, Change in Enacted Tax Rate, Amount"
       }
      }
     },
     "localname": "IncomeTaxReconciliationChangeInEnactedTaxRate",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationDeductions": {
     "auth_ref": [
      "r326"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying domestic federal statutory income tax rate to pretax income (loss) from continuing operations attributable to deduction. Includes, but is not limited to, dividend deduction, deduction for dividend paid to employee stock ownership plan (ESOP), Medicare prescription drug benefit subsidy deduction, and other deductions.",
        "label": "Effective Income Tax Rate Reconciliation, Deduction, Amount",
        "terseLabel": "Effective Income Tax Rate Reconciliation, Deduction, Amount"
       }
      }
     },
     "localname": "IncomeTaxReconciliationDeductions",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationDeductionsOther": {
     "auth_ref": [
      "r326"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to other deductions.",
        "label": "Effective Income Tax Rate Reconciliation, Deduction, Other, Amount",
        "terseLabel": "Effective Income Tax Rate Reconciliation, Deduction, Other, Amount"
       }
      }
     },
     "localname": "IncomeTaxReconciliationDeductionsOther",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationNondeductibleExpenseImpairmentLosses": {
     "auth_ref": [
      "r326"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to nondeductible impairment loss.",
        "label": "Effective Income Tax Rate Reconciliation, Nondeductible Expense, Impairment Losses, Amount",
        "terseLabel": "Effective Income Tax Rate Reconciliation, Nondeductible Expense, Impairment Losses, Amount"
       }
      }
     },
     "localname": "IncomeTaxReconciliationNondeductibleExpenseImpairmentLosses",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationNondeductibleExpenseOther": {
     "auth_ref": [
      "r326"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to other nondeductible expenses.",
        "label": "Effective Income Tax Rate Reconciliation, Nondeductible Expense, Other, Amount",
        "terseLabel": "Effective Income Tax Rate Reconciliation, Nondeductible Expense, Other, Amount"
       }
      }
     },
     "localname": "IncomeTaxReconciliationNondeductibleExpenseOther",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationNondeductibleExpenseShareBasedCompensationCost": {
     "auth_ref": [
      "r326"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of reported income tax expense (benefit) in excess of (less than) expected income tax expense (benefit) computed by applying domestic federal statutory income tax rate to pretax income (loss) from continuing operation, attributable to nondeductible expense for award under share-based payment arrangement. Includes, but is not limited to, expense determined to be nondeductible upon grant or after for award under share-based payment arrangement.",
        "label": "Effective Income Tax Rate Reconciliation, Nondeductible Expense, Share-based Payment Arrangement, Amount",
        "terseLabel": "Effective Income Tax Rate Reconciliation, Nondeductible Expense, Share-based Payment Arrangement, Amount"
       }
      }
     },
     "localname": "IncomeTaxReconciliationNondeductibleExpenseShareBasedCompensationCost",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationOtherAdjustments": {
     "auth_ref": [
      "r326"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to other adjustments.",
        "label": "Effective Income Tax Rate Reconciliation, Other Adjustments, Amount",
        "terseLabel": "Discrete item impact on effective tax rate"
       }
      }
     },
     "localname": "IncomeTaxReconciliationOtherAdjustments",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxesPaidNet": {
     "auth_ref": [
      "r89"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of cash paid during the current period to foreign, federal, state, and local authorities as taxes on income, net of any cash received during the current period as refunds for the overpayment of taxes.",
        "label": "Income Taxes Paid, Net",
        "terseLabel": "Income taxes"
       }
      }
     },
     "localname": "IncomeTaxesPaidNet",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxesReceivable": {
     "auth_ref": [
      "r40",
      "r417",
      "r432"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 5.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Carrying amount due within one year of the balance sheet date (or one operating cycle, if longer) from tax authorities as of the balance sheet date representing refunds of overpayments or recoveries based on agreed-upon resolutions of disputes.",
        "label": "Income Taxes Receivable, Current",
        "terseLabel": "Income taxes receivable"
       }
      }
     },
     "localname": "IncomeTaxesReceivable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInAccountsPayable": {
     "auth_ref": [
      "r84"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 15.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the aggregate amount of liabilities incurred (and for which invoices have typically been received) and payable to vendors for goods and services received that are used in an entity's business.",
        "label": "Increase (Decrease) in Accounts Payable",
        "terseLabel": "Accounts payable"
       }
      }
     },
     "localname": "IncreaseDecreaseInAccountsPayable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInAccountsReceivable": {
     "auth_ref": [
      "r84"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 11.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in amount due within one year (or one business cycle) from customers for the credit sale of goods and services.",
        "label": "Increase (Decrease) in Accounts Receivable",
        "negatedLabel": "Accounts receivable"
       }
      }
     },
     "localname": "IncreaseDecreaseInAccountsReceivable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInAccruedLiabilities": {
     "auth_ref": [
      "r84"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 17.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the aggregate amount of expenses incurred but not yet paid.",
        "label": "Increase (Decrease) in Accrued Liabilities",
        "terseLabel": "Accrued expenses"
       }
      }
     },
     "localname": "IncreaseDecreaseInAccruedLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInContractWithCustomerAsset": {
     "auth_ref": [
      "r84"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 12.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) in right to consideration in exchange for good or service transferred to customer when right is conditioned on something other than passage of time.",
        "label": "Increase (Decrease) in Contract with Customer, Asset",
        "negatedLabel": "Costs and estimated earnings in excess of billings on uncompleted contracts"
       }
      }
     },
     "localname": "IncreaseDecreaseInContractWithCustomerAsset",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInContractWithCustomerLiability": {
     "auth_ref": [
      "r84",
      "r408"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 16.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) in obligation to transfer good or service to customer for which consideration has been received or is receivable.",
        "label": "Increase (Decrease) in Contract with Customer, Liability",
        "terseLabel": "Billings on uncompleted contracts in excess of costs and estimated earnings"
       }
      }
     },
     "localname": "IncreaseDecreaseInContractWithCustomerLiability",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInIncomeTaxesReceivable": {
     "auth_ref": [
      "r84"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in income taxes receivable, which represents the amount due from tax authorities for refunds of overpayments or recoveries of income taxes paid.",
        "label": "Increase (Decrease) in Income Taxes Receivable",
        "terseLabel": "Increase (Decrease) in Income Taxes Receivable"
       }
      }
     },
     "localname": "IncreaseDecreaseInIncomeTaxesReceivable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInInventories": {
     "auth_ref": [
      "r84"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 13.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the aggregate value of all inventory held by the reporting entity, associated with underlying transactions that are classified as operating activities.",
        "label": "Increase (Decrease) in Inventories",
        "negatedLabel": "Inventories"
       }
      }
     },
     "localname": "IncreaseDecreaseInInventories",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInOperatingCapitalAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Increase (Decrease) in Operating Capital [Abstract]",
        "terseLabel": "Changes in operating assets and liabilities increasing (decreasing) cash:"
       }
      }
     },
     "localname": "IncreaseDecreaseInOperatingCapitalAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncreaseDecreaseInOtherOperatingAssets": {
     "auth_ref": [
      "r84"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 14.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) in operating assets classified as other.",
        "label": "Increase (Decrease) in Other Operating Assets",
        "negatedLabel": "Other assets and liabilities"
       }
      }
     },
     "localname": "IncreaseDecreaseInOtherOperatingAssets",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInStockholdersEquityRollForward": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Increase (Decrease) in Stockholders' Equity [Roll Forward]",
        "terseLabel": "Increase (Decrease) in Stockholders' Equity [Roll Forward]"
       }
      }
     },
     "localname": "IncreaseDecreaseInStockholdersEquityRollForward",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncrementalCommonSharesAttributableToNonvestedSharesWithForfeitableDividends": {
     "auth_ref": [
      "r119",
      "r120",
      "r121",
      "r126",
      "r128"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding",
       "weight": 1.0
      }
     },
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of additional shares included in diluted EPS for potentially dilutive effect of nonvested equity-based payment award containing forfeitable rights to dividends or dividend equivalents, whether paid or unpaid.",
        "label": "Incremental Common Shares Attributable to Dilutive Effect of Nonvested Shares with Forfeitable Dividends",
        "terseLabel": "Dilutive nonvested deferred shares"
       }
      }
     },
     "localname": "IncrementalCommonSharesAttributableToNonvestedSharesWithForfeitableDividends",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements": {
     "auth_ref": [
      "r119",
      "r120",
      "r121",
      "r128"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding",
       "weight": 1.0
      }
     },
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Additional shares included in the calculation of diluted EPS as a result of the potentially dilutive effect of share based payment arrangements using the treasury stock method.",
        "label": "Incremental Common Shares Attributable to Dilutive Effect of Share-based Payment Arrangements",
        "terseLabel": "Dilutive stock options"
       }
      }
     },
     "localname": "IncrementalCommonSharesAttributableToShareBasedPaymentArrangements",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_IndefiniteLivedTradeNames": {
     "auth_ref": [
      "r206"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_FiniteLivedIntangibleAssetsGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Carrying amount (original costs adjusted for previously recognized amortization and impairment) as of the balance sheet date for the rights acquired through registration of a trade name to gain or protect exclusive use thereof for a projected indefinite period of benefit.",
        "label": "Indefinite-Lived Trade Names",
        "terseLabel": "Indefinite Trade Names"
       }
      }
     },
     "localname": "IndefiniteLivedTradeNames",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IntangibleAssetsNetExcludingGoodwill": {
     "auth_ref": [
      "r197",
      "r201"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 6.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      },
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sum of the carrying amounts of all intangible assets, excluding goodwill, as of the balance sheet date, net of accumulated amortization and impairment charges.",
        "label": "Intangible Assets, Net (Excluding Goodwill)",
        "terseLabel": "Other intangible assets, net of accumulated amortization",
        "totalLabel": "Total intangible assets, net carrying amount"
       }
      }
     },
     "localname": "IntangibleAssetsNetExcludingGoodwill",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IntellectualPropertyMember": {
     "auth_ref": [
      "r347"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Intangible asset arising from original creative thought. Include, but is not limited to, trademarks, patents, and copyrights.",
        "label": "Intellectual Property [Member]",
        "terseLabel": "Intellectual Property [Member]"
       }
      }
     },
     "localname": "IntellectualPropertyMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_InterestExpense": {
     "auth_ref": [
      "r57",
      "r145",
      "r375",
      "r376",
      "r423"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome": {
       "order": 2.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of the cost of borrowed funds accounted for as interest expense.",
        "label": "Interest Expense",
        "negatedLabel": "Interest expense (Note 5)"
       }
      }
     },
     "localname": "InterestExpense",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestPaidNet": {
     "auth_ref": [
      "r78",
      "r82",
      "r89"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash paid for interest, excluding capitalized interest, classified as operating activity. Includes, but is not limited to, payment to settle zero-coupon bond for accreted interest of debt discount and debt instrument with insignificant coupon interest rate in relation to effective interest rate of borrowing attributable to accreted interest of debt discount.",
        "label": "Interest Paid, Excluding Capitalized Interest, Operating Activities",
        "terseLabel": "Interest, including payment of debt amendment fees"
       }
      }
     },
     "localname": "InterestPaidNet",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IntersegmentEliminationMember": {
     "auth_ref": [
      "r143",
      "r156",
      "r157",
      "r158",
      "r159",
      "r161",
      "r163",
      "r167"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Eliminating entries used in operating segment consolidation.",
        "label": "Intersegment Eliminations [Member]",
        "terseLabel": "Intersegment Eliminations [Member]"
       }
      }
     },
     "localname": "IntersegmentEliminationMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_InventoryNet": {
     "auth_ref": [
      "r5",
      "r41",
      "r395"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after valuation and LIFO reserves of inventory expected to be sold, or consumed within one year or operating cycle, if longer.",
        "label": "Inventory, Net",
        "terseLabel": "Inventories"
       }
      }
     },
     "localname": "InventoryNet",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InvestmentIncomeInterest": {
     "auth_ref": [
      "r69",
      "r144"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome": {
       "order": 3.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before accretion (amortization) of purchase discount (premium) of interest income on nonoperating securities.",
        "label": "Investment Income, Interest",
        "terseLabel": "Interest income"
       }
      }
     },
     "localname": "InvestmentIncomeInterest",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InvestmentsOwnedFederalIncomeTaxNoteLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "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.",
        "label": "Investments, Owned, Federal Income Tax Note [Line Items]",
        "terseLabel": "Investments, Owned, Federal Income Tax Note [Line Items]"
       }
      }
     },
     "localname": "InvestmentsOwnedFederalIncomeTaxNoteLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LeaseCost": {
     "auth_ref": [
      "r389",
      "r391"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/LeasesComponentsofLeaseCostsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lease cost recognized by lessee for lease contract.",
        "label": "Lease, Cost",
        "totalLabel": "Total lease expense"
       }
      }
     },
     "localname": "LeaseCost",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesComponentsofLeaseCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LeaseCostAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Lease, Cost [Abstract]",
        "terseLabel": "Lease, Cost [Abstract]"
       }
      }
     },
     "localname": "LeaseCostAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_LeaseCostTableTextBlock": {
     "auth_ref": [
      "r389"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of lessee's lease cost. Includes, but is not limited to, interest expense for finance lease, amortization of right-of-use asset for finance lease, operating lease cost, short-term lease cost, variable lease cost and sublease income.",
        "label": "Lease, Cost [Table Text Block]",
        "terseLabel": "Lease, Cost [Table Text Block]"
       }
      }
     },
     "localname": "LeaseCostTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LeasesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Leases [Abstract]",
        "terseLabel": "Leases [Abstract]"
       }
      }
     },
     "localname": "LeasesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_LesseeOperatingLeaseLeaseNotYetCommencedTermOfContract1": {
     "auth_ref": [
      "r382"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Term of lessee's operating lease not yet commenced, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Lessee, Operating Lease, Lease Not yet Commenced, Term of Contract",
        "terseLabel": "Lessee, Operating Lease, Lease Not yet Commenced, Term of Contract"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLeaseNotYetCommencedTermOfContract1",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityMaturityTableTextBlock": {
     "auth_ref": [
      "r390"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of undiscounted cash flows of lessee's operating lease liability. Includes, but is not limited to, reconciliation of undiscounted cash flows to operating lease liability recognized in statement of financial position.",
        "label": "Lessee, Operating Lease, Liability, Maturity [Table Text Block]",
        "terseLabel": "Lessee, Operating Lease, Liability, Maturity [Table Text Block]"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityMaturityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue": {
     "auth_ref": [
      "r390"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payment for operating lease.",
        "label": "Lessee, Operating Lease, Liability, to be Paid",
        "totalLabel": "Total future operating lease payments"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDue",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths": {
     "auth_ref": [
      "r390"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payment for operating lease to be paid in next fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Lessee, Operating Lease, Liability, to be Paid, Year One",
        "terseLabel": "Fiscal 2023"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour": {
     "auth_ref": [
      "r390"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails": {
       "order": 5.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payment for operating lease to be paid in fourth fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Lessee, Operating Lease, Liability, to be Paid, Year Four",
        "terseLabel": "Fiscal 2026"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearFour",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree": {
     "auth_ref": [
      "r390"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails": {
       "order": 4.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payment for operating lease to be paid in third fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Lessee, Operating Lease, Liability, to be Paid, Year Three",
        "terseLabel": "Fiscal 2025"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearThree",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo": {
     "auth_ref": [
      "r390"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payment for operating lease to be paid in second fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Lessee, Operating Lease, Liability, to be Paid, Year Two",
        "terseLabel": "Fiscal 2024"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearTwo",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear": {
     "auth_ref": [
      "r390"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payment for operating lease having initial or remaining lease term in excess of one year to be paid in remainder of current fiscal year.",
        "label": "Lessee, Operating Lease, Liability, to be Paid, Remainder of Fiscal Year",
        "terseLabel": "Remainder of Fiscal 2022"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount": {
     "auth_ref": [
      "r390"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments in excess of discounted obligation for lease payments for operating lease.",
        "label": "Lessee, Operating Lease, Liability, Undiscounted Excess Amount",
        "negatedLabel": "Imputed interest"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityUndiscountedExcessAmount",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseTermOfContract": {
     "auth_ref": [
      "r381"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Term of lessee's operating lease, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Lessee, Operating Lease, Term of Contract",
        "terseLabel": "Operating lease term (up to)"
       }
      }
     },
     "localname": "LesseeOperatingLeaseTermOfContract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesNarrativeDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_LesseeOperatingLeasesTextBlock": {
     "auth_ref": [
      "r392"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for operating leases of lessee. Includes, but is not limited to, description of operating lease and maturity analysis of operating lease liability.",
        "label": "Lessee, Operating Leases [Text Block]",
        "terseLabel": "Lessee, Operating Leases [Text Block]"
       }
      }
     },
     "localname": "LesseeOperatingLeasesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesNotes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LettersOfCreditOutstandingAmount": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The total amount of the contingent obligation under letters of credit outstanding as of the reporting date.",
        "label": "Letters of Credit Outstanding, Amount",
        "terseLabel": "Letters of Credit Outstanding, Amount"
       }
      }
     },
     "localname": "LettersOfCreditOutstandingAmount",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_Liabilities": {
     "auth_ref": [
      "r34",
      "r97",
      "r159",
      "r180",
      "r244",
      "r245",
      "r246",
      "r249",
      "r250",
      "r251",
      "r253",
      "r255",
      "r257",
      "r258",
      "r352",
      "r356",
      "r357",
      "r365",
      "r393",
      "r394"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_LiabilitiesAndStockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all liabilities that are recognized. Liabilities are probable future sacrifices of economic benefits arising from present obligations of an entity to transfer assets or provide services to other entities in the future.",
        "label": "Liabilities",
        "totalLabel": "Total liabilities"
       }
      }
     },
     "localname": "Liabilities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesAndStockholdersEquity": {
     "auth_ref": [
      "r26",
      "r97",
      "r180",
      "r365",
      "r395",
      "r416",
      "r429"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of liabilities and equity items, including the portion of equity attributable to noncontrolling interests, if any.",
        "label": "Liabilities and Equity",
        "totalLabel": "Total liabilities and stockholders\u2019 equity"
       }
      }
     },
     "localname": "LiabilitiesAndStockholdersEquity",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesAndStockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Liabilities and Equity [Abstract]",
        "terseLabel": "Liabilities and stockholders\u2019 equity"
       }
      }
     },
     "localname": "LiabilitiesAndStockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LiabilitiesCurrent": {
     "auth_ref": [
      "r36",
      "r97",
      "r180",
      "r244",
      "r245",
      "r246",
      "r249",
      "r250",
      "r251",
      "r253",
      "r255",
      "r257",
      "r258",
      "r352",
      "r356",
      "r357",
      "r365",
      "r393",
      "r394",
      "r395"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total obligations incurred as part of normal operations that are expected to be paid during the following twelve months or within one business cycle, if longer.",
        "label": "Liabilities, Current",
        "totalLabel": "Total current liabilities"
       }
      }
     },
     "localname": "LiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesCurrentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Liabilities, Current [Abstract]",
        "terseLabel": "Current liabilities:"
       }
      }
     },
     "localname": "LiabilitiesCurrentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LiabilitiesOtherThanLongtermDebtNoncurrent": {
     "auth_ref": [],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Aggregated carrying amounts of obligations as of the balance sheet date, excluding long-term debt, incurred as part of the normal operations that are expected to be paid after one year or beyond the normal operating cycle, if longer. Alternate captions include Total Deferred Credits and Other Liabilities.",
        "label": "Liabilities, Other than Long-term Debt, Noncurrent",
        "terseLabel": "Other liabilities, non-current"
       }
      }
     },
     "localname": "LiabilitiesOtherThanLongtermDebtNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LineOfCreditFacilityAxis": {
     "auth_ref": [
      "r33",
      "r96"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by name of lender, which may be a single entity (for example, but not limited to, a bank, pension fund, venture capital firm) or a group of entities that participate in the line of credit.",
        "label": "Lender Name [Axis]",
        "terseLabel": "Lender Name [Axis]"
       }
      }
     },
     "localname": "LineOfCreditFacilityAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LineOfCreditFacilityCurrentBorrowingCapacity": {
     "auth_ref": [
      "r33"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of current borrowing capacity under the credit facility considering any current restrictions on the amount that could be borrowed (for example, borrowings may be limited by the amount of current assets), but without considering any amounts currently outstanding under the facility.",
        "label": "Line of Credit Facility, Current Borrowing Capacity",
        "terseLabel": "Line of Credit Facility, Current Borrowing Capacity"
       }
      }
     },
     "localname": "LineOfCreditFacilityCurrentBorrowingCapacity",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LineOfCreditFacilityExpirationDate1": {
     "auth_ref": [
      "r33"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Date the credit facility terminates, in YYYY-MM-DD format.",
        "label": "Line of Credit Facility, Expiration Date",
        "terseLabel": "Line of Credit Facility, Expiration Date"
       }
      }
     },
     "localname": "LineOfCreditFacilityExpirationDate1",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "dateItemType"
    },
    "us-gaap_LineOfCreditFacilityIncreaseDecreaseForPeriodNet": {
     "auth_ref": [
      "r96"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) of the credit facility.",
        "label": "Line of Credit Facility, Increase (Decrease), Net",
        "terseLabel": "Line of Credit Facility, Increase (Decrease), Net"
       }
      }
     },
     "localname": "LineOfCreditFacilityIncreaseDecreaseForPeriodNet",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LineOfCreditFacilityInitiationDate1": {
     "auth_ref": [
      "r33"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Date the credit facility first became available, in YYYY-MM-DD format.",
        "label": "Line of Credit Facility, Initiation Date",
        "terseLabel": "Line of Credit Facility, Initiation Date"
       }
      }
     },
     "localname": "LineOfCreditFacilityInitiationDate1",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "dateItemType"
    },
    "us-gaap_LineOfCreditFacilityLenderDomain": {
     "auth_ref": [
      "r33",
      "r96"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Identification of the lender, which may be a single entity (for example, a bank, pension fund, venture capital firm) or a group of entities that participate in the line of credit, including a letter of credit facility.",
        "label": "Line of Credit Facility, Lender [Domain]",
        "terseLabel": "Line of Credit Facility, Lender [Domain]"
       }
      }
     },
     "localname": "LineOfCreditFacilityLenderDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_LineOfCreditFacilityLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "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.",
        "label": "Line of Credit Facility [Line Items]",
        "terseLabel": "Line of Credit Facility [Line Items]"
       }
      }
     },
     "localname": "LineOfCreditFacilityLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity": {
     "auth_ref": [
      "r33"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Maximum borrowing capacity under the credit facility without consideration of any current restrictions on the amount that could be borrowed or the amounts currently outstanding under the facility.",
        "label": "Line of Credit Facility, Maximum Borrowing Capacity",
        "terseLabel": "Line of Credit Facility, Maximum Borrowing Capacity"
       }
      }
     },
     "localname": "LineOfCreditFacilityMaximumBorrowingCapacity",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LineOfCreditFacilityRemainingBorrowingCapacity": {
     "auth_ref": [
      "r33"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of borrowing capacity currently available under the credit facility (current borrowing capacity less the amount of borrowings outstanding).",
        "label": "Line of Credit Facility, Remaining Borrowing Capacity",
        "terseLabel": "Line of Credit Facility, Remaining Borrowing Capacity"
       }
      }
     },
     "localname": "LineOfCreditFacilityRemainingBorrowingCapacity",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LineOfCreditFacilityTable": {
     "auth_ref": [
      "r33",
      "r96"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A table or schedule providing information pertaining to short-term or long-term contractual arrangements with lenders, including letters of credit, standby letters of credit, and revolving credit arrangements, under which borrowings can be made up to maximum amount as of any point in time conditional on satisfaction of specified terms before, as of and after the date of drawdowns on the line.",
        "label": "Line of Credit Facility [Table]",
        "terseLabel": "Line of Credit Facility [Table]"
       }
      }
     },
     "localname": "LineOfCreditFacilityTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The fee, expressed as a percentage of the line of credit facility, for available but unused credit capacity under the credit facility.",
        "label": "Line of Credit Facility, Unused Capacity, Commitment Fee Percentage",
        "terseLabel": "Unused Credit Facility Fee"
       }
      }
     },
     "localname": "LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LineofCreditFacilityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_LossContingenciesLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "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.",
        "label": "Loss Contingencies [Line Items]",
        "terseLabel": "Loss Contingencies [Line Items]"
       }
      }
     },
     "localname": "LossContingenciesLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LossContingenciesTable": {
     "auth_ref": [
      "r234",
      "r235",
      "r236",
      "r237",
      "r238",
      "r239",
      "r240",
      "r242",
      "r243"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Discloses the specific components (such as the nature, name, and date) of the loss contingency and gives an estimate of the possible loss or range of loss, or states that a reasonable estimate cannot be made. Excludes environmental contingencies, warranties and unconditional purchase obligations.",
        "label": "Loss Contingencies [Table]",
        "terseLabel": "Loss Contingencies [Table]"
       }
      }
     },
     "localname": "LossContingenciesTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LossOnContracts": {
     "auth_ref": [
      "r66",
      "r281"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Losses recognized in the current period on contracts which are expected to generate losses, which are probable and can be reasonably estimated, in a future period.",
        "label": "Loss on Contracts",
        "terseLabel": "Loss on Contracts"
       }
      }
     },
     "localname": "LossOnContracts",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_MachineryAndEquipmentGross": {
     "auth_ref": [
      "r10",
      "r210"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_PropertyPlantAndEquipmentGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before accumulated depreciation of tangible personal property used to produce goods and services, including, but is not limited to, tools, dies and molds, computer and office equipment.",
        "label": "Machinery and Equipment, Gross",
        "terseLabel": "Construction equipment"
       }
      }
     },
     "localname": "MachineryAndEquipmentGross",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInFinancingActivities": {
     "auth_ref": [
      "r81"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from financing activities, including discontinued operations. Financing activity cash flows include obtaining resources from owners and providing them with a return on, and a return of, their investment; borrowing money and repaying amounts borrowed, or settling the obligation; and obtaining and paying for other resources obtained from creditors on long-term credit.",
        "label": "Net Cash Provided by (Used in) Financing Activities",
        "totalLabel": "Net cash used by financing activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInFinancingActivities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Net Cash Provided by (Used in) Financing Activities [Abstract]",
        "terseLabel": "Financing activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInFinancingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetCashProvidedByUsedInInvestingActivities": {
     "auth_ref": [
      "r81"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from investing activities, including discontinued operations. Investing activity cash flows include making and collecting loans and acquiring and disposing of debt or equity instruments and property, plant, and equipment and other productive assets.",
        "label": "Net Cash Provided by (Used in) Investing Activities",
        "totalLabel": "Net cash used by investing activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInInvestingActivities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Net Cash Provided by (Used in) Investing Activities [Abstract]",
        "terseLabel": "Investing activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInInvestingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetCashProvidedByUsedInOperatingActivities": {
     "auth_ref": [
      "r81",
      "r83",
      "r86"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from operating activities, including discontinued operations. Operating activity cash flows include transactions, adjustments, and changes in value not defined as investing or financing activities.",
        "label": "Net Cash Provided by (Used in) Operating Activities",
        "totalLabel": "Net cash used by operating activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInOperatingActivities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Net Cash Provided by (Used in) Operating Activities [Abstract]",
        "terseLabel": "Operating activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInOperatingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetIncomeLoss": {
     "auth_ref": [
      "r3",
      "r50",
      "r52",
      "r56",
      "r60",
      "r86",
      "r97",
      "r105",
      "r107",
      "r108",
      "r109",
      "r110",
      "r113",
      "r114",
      "r124",
      "r151",
      "r157",
      "r161",
      "r164",
      "r167",
      "r180",
      "r244",
      "r245",
      "r246",
      "r249",
      "r250",
      "r251",
      "r253",
      "r255",
      "r257",
      "r258",
      "r363",
      "r365",
      "r420",
      "r433"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The portion of profit or loss for the period, net of income taxes, which is attributable to the parent.",
        "label": "Net Income (Loss) Attributable to Parent",
        "terseLabel": "Net income (loss)"
       }
      }
     },
     "localname": "NetIncomeLoss",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NewAccountingPronouncementsAndChangesInAccountingPrinciplesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Accounting Standards Update and Change in Accounting Principle [Abstract]",
        "terseLabel": "New Accounting Pronouncements and Changes in Accounting Principles [Abstract]"
       }
      }
     },
     "localname": "NewAccountingPronouncementsAndChangesInAccountingPrinciplesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy pertaining to new accounting pronouncements that may impact the entity's financial reporting. Includes, but is not limited to, quantification of the expected or actual impact.",
        "label": "New Accounting Pronouncements, Policy [Policy Text Block]",
        "terseLabel": "New Accounting Pronouncements, Policy"
       }
      }
     },
     "localname": "NewAccountingPronouncementsPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/BasisofPresentationCashCashEquivalentsandRestrictedCashPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_OperatingIncomeLoss": {
     "auth_ref": [
      "r151",
      "r157",
      "r161",
      "r164",
      "r167"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome": {
       "order": 1.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The net result for the period of deducting operating expenses from operating revenues.",
        "label": "Operating Income (Loss)",
        "totalLabel": "Operating loss"
       }
      }
     },
     "localname": "OperatingIncomeLoss",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome",
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseCost": {
     "auth_ref": [
      "r383",
      "r391"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/LeasesComponentsofLeaseCostsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_LeaseCost",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of single lease cost, calculated by allocation of remaining cost of lease over remaining lease term. Includes, but is not limited to, single lease cost, after impairment of right-of-use asset, calculated by amortization of remaining right-of-use asset and accretion of lease liability.",
        "label": "Operating Lease, Cost",
        "terseLabel": "Operating lease expense"
       }
      }
     },
     "localname": "OperatingLeaseCost",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesComponentsofLeaseCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseImpairmentLoss": {
     "auth_ref": [
      "r377"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of loss from impairment of right-of-use asset from operating lease.",
        "label": "Operating Lease, Impairment Loss",
        "terseLabel": "Operating lease right-of-use asset impairment"
       }
      }
     },
     "localname": "OperatingLeaseImpairmentLoss",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseLiabilitiesPaymentsDueAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Lessee, Operating Lease, Liability, Payment, Due [Abstract]",
        "terseLabel": "Lessee, Operating Lease, Liability, Payment, Due [Abstract]"
       }
      }
     },
     "localname": "OperatingLeaseLiabilitiesPaymentsDueAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_OperatingLeaseLiability": {
     "auth_ref": [
      "r379"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from operating lease.",
        "label": "Operating Lease, Liability",
        "verboseLabel": "Net present value of future lease payments"
       }
      }
     },
     "localname": "OperatingLeaseLiability",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseLiabilityCurrent": {
     "auth_ref": [
      "r379"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 5.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from operating lease, classified as current.",
        "label": "Operating Lease, Liability, Current",
        "terseLabel": "Operating lease liabilities"
       }
      }
     },
     "localname": "OperatingLeaseLiabilityCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseLiabilityNoncurrent": {
     "auth_ref": [
      "r379"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from operating lease, classified as noncurrent.",
        "label": "Operating Lease, Liability, Noncurrent",
        "terseLabel": "Operating lease liabilities"
       }
      }
     },
     "localname": "OperatingLeaseLiabilityNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeasePayments": {
     "auth_ref": [
      "r380",
      "r385"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash outflow from operating lease, excluding payments to bring another asset to condition and location necessary for its intended use.",
        "label": "Operating Lease, Payments",
        "terseLabel": "Cash paid for operating leases"
       }
      }
     },
     "localname": "OperatingLeasePayments",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesSupplementalCashFlowDisclosuresDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseRightOfUseAsset": {
     "auth_ref": [
      "r378"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's right to use underlying asset under operating lease.",
        "label": "Operating Lease, Right-of-Use Asset",
        "terseLabel": "Operating lease right-of-use assets"
       }
      }
     },
     "localname": "OperatingLeaseRightOfUseAsset",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent": {
     "auth_ref": [
      "r388",
      "r391"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted average discount rate for operating lease calculated at point in time.",
        "label": "Operating Lease, Weighted Average Discount Rate, Percent",
        "terseLabel": "Operating Lease, Weighted Average Discount Rate, Percent"
       }
      }
     },
     "localname": "OperatingLeaseWeightedAverageDiscountRatePercent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesOtherLeaseInformationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1": {
     "auth_ref": [
      "r387",
      "r391"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted average remaining lease term for operating lease, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Operating Lease, Weighted Average Remaining Lease Term",
        "terseLabel": "Operating Lease, Weighted Average Remaining Lease Term"
       }
      }
     },
     "localname": "OperatingLeaseWeightedAverageRemainingLeaseTerm1",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesOtherLeaseInformationDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_OperatingLossCarryforwardsLimitationsOnUse": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A description of the limitations on the use of all operating loss carryforwards available to reduce future taxable income.",
        "label": "Operating Loss Carryforwards, Limitations on Use",
        "terseLabel": "Operating Loss Carryforwards, Limitations on Use"
       }
      }
     },
     "localname": "OperatingLossCarryforwardsLimitationsOnUse",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OrganizationConsolidationAndPresentationOfFinancialStatementsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Organization, Consolidation and Presentation of Financial Statements [Abstract]",
        "terseLabel": "Organization, Consolidation and Presentation of Financial Statements [Abstract]"
       }
      }
     },
     "localname": "OrganizationConsolidationAndPresentationOfFinancialStatementsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherAssetsCurrent": {
     "auth_ref": [
      "r42",
      "r395"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 6.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of current assets classified as other.",
        "label": "Other Assets, Current",
        "terseLabel": "Other current assets"
       }
      }
     },
     "localname": "OtherAssetsCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherAssetsNoncurrent": {
     "auth_ref": [
      "r31"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 8.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of noncurrent assets classified as other.",
        "label": "Other Assets, Noncurrent",
        "terseLabel": "Other assets, non-current"
       }
      }
     },
     "localname": "OtherAssetsNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax": {
     "auth_ref": [
      "r44"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome": {
       "order": 2.0,
       "parentTag": "us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after tax and reclassification adjustments of gain (loss) on foreign currency translation adjustments, foreign currency transactions designated and effective as economic hedges of a net investment in a foreign entity and intra-entity foreign currency transactions that are of a long-term-investment nature.",
        "label": "Other Comprehensive Income (Loss), Foreign Currency Transaction and Translation Adjustment, Net of Tax",
        "terseLabel": "Other comprehensive income (loss)",
        "verboseLabel": "Foreign currency translation gain (loss) (net of tax expense (benefit) of $(16) and $30 for the three and nine months ended March 31, 2022, respectively, and $(33) and $20 for the three and nine months ended March 31, 2021, respectively)"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax": {
     "auth_ref": [
      "r44",
      "r47",
      "r366",
      "r373"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of tax expense (benefit), after reclassification adjustments of gain (loss) on foreign currency translation adjustments, foreign currency transactions designated and effective as economic hedges of a net investment in a foreign entity and intra-entity foreign currency transactions that are of a long-term-investment nature.",
        "label": "Other Comprehensive Income (Loss), Foreign Currency Translation Adjustment, Tax",
        "terseLabel": "Other Comprehensive Income (Loss), Foreign Currency Translation Adjustment, Tax"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/StatementofOtherComprehensiveIncomeParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Other Comprehensive Income (Loss), Net of Tax [Abstract]",
        "terseLabel": "Other comprehensive income (loss), net of tax:"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherInformationPertainingToIncomeTaxes": {
     "auth_ref": [
      "r327"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Description of events or transactions pertaining to income taxes classified as other.",
        "label": "Other Information Pertaining to Income Taxes",
        "terseLabel": "Other Information Pertaining to Income Taxes"
       }
      }
     },
     "localname": "OtherInformationPertainingToIncomeTaxes",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherLiabilitiesCurrent": {
     "auth_ref": [
      "r11",
      "r12",
      "r35",
      "r395"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 6.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of liabilities classified as other, due within one year or the normal operating cycle, if longer.",
        "label": "Other Liabilities, Current",
        "terseLabel": "Other accrued expenses"
       }
      }
     },
     "localname": "OtherLiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherNoncashExpense": {
     "auth_ref": [
      "r86"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 9.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expense or loss included in net income that result in no cash flow, classified as other.",
        "label": "Other Noncash Expense",
        "terseLabel": "Accelerated amortization of deferred debt amendment fees (Note 5)"
       }
      }
     },
     "localname": "OtherNoncashExpense",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherNoncashIncomeExpense": {
     "auth_ref": [
      "r86"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 10.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of income (expense) included in net income that results in no cash inflow (outflow), classified as other.",
        "label": "Other Noncash Income (Expense)",
        "negatedLabel": "Other"
       }
      }
     },
     "localname": "OtherNoncashIncomeExpense",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherNonoperatingIncomeExpense": {
     "auth_ref": [
      "r70"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome": {
       "order": 4.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of income (expense) related to nonoperating activities, classified as other.",
        "label": "Other Nonoperating Income (Expense)",
        "terseLabel": "Other"
       }
      }
     },
     "localname": "OtherNonoperatingIncomeExpense",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherNonoperatingIncomeExpenseAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Other Nonoperating Income (Expense) [Abstract]",
        "terseLabel": "Other income (expense):"
       }
      }
     },
     "localname": "OtherNonoperatingIncomeExpenseAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherRestructuringCosts": {
     "auth_ref": [
      "r85"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of other expenses associated with exit or disposal activities pursuant to an authorized plan. Excludes expenses associated with a discontinued operation or an asset retirement obligation.",
        "label": "Other Restructuring Costs",
        "terseLabel": "Other Restructuring Costs"
       }
      }
     },
     "localname": "OtherRestructuringCosts",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherSignificantNoncashTransactionValueOfConsiderationReceived1": {
     "auth_ref": [
      "r90",
      "r91",
      "r92"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The value of the noncash (or part noncash) consideration received in a transaction. Noncash is defined as transactions during a period that do not result in cash receipts or cash payments in the period. \"Part noncash\" refers to that portion of a transaction not resulting in cash receipts or cash payments in the period.",
        "label": "Other Significant Noncash Transaction, Value of Consideration Received",
        "terseLabel": "Leasehold improvements received as lease incentive, non-cash investing activity"
       }
      }
     },
     "localname": "OtherSignificantNoncashTransactionValueOfConsiderationReceived1",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesSupplementalCashFlowDisclosuresDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsForRepurchaseOfOtherEquity": {
     "auth_ref": [
      "r75"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash outflow to reacquire equity classified as other.",
        "label": "Payments for Repurchase of Other Equity",
        "negatedLabel": "Repurchase of common stock for payment of statutory taxes due on equity-based compensation"
       }
      }
     },
     "localname": "PaymentsForRepurchaseOfOtherEquity",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsForRestructuring": {
     "auth_ref": [
      "r79",
      "r217"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash payments made as the result of exit or disposal activities. Excludes payments associated with a discontinued operation or an asset retirement obligation.",
        "label": "Payments for Restructuring",
        "negatedTerseLabel": "Cash payments"
       }
      }
     },
     "localname": "PaymentsForRestructuring",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsOfDebtIssuanceCosts": {
     "auth_ref": [
      "r77"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cash outflow paid to third parties in connection with debt origination, which will be amortized over the remaining maturity period of the associated long-term debt.",
        "label": "Payments of Debt Issuance Costs",
        "negatedTerseLabel": "Payment of debt amendment fees"
       }
      }
     },
     "localname": "PaymentsOfDebtIssuanceCosts",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquirePropertyPlantAndEquipment": {
     "auth_ref": [
      "r72"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cash outflow associated with the acquisition of long-lived, physical assets that are used in the normal conduct of business to produce goods and services and not intended for resale; includes cash outflows to pay for construction of self-constructed assets.",
        "label": "Payments to Acquire Property, Plant, and Equipment",
        "negatedLabel": "Capital expenditures"
       }
      }
     },
     "localname": "PaymentsToAcquirePropertyPlantAndEquipment",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromIncomeTaxRefunds": {
     "auth_ref": [
      "r83",
      "r89"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of cash received during the period as refunds for the overpayment of taxes.",
        "label": "Proceeds from Income Tax Refunds",
        "terseLabel": "Proceeds from Income Tax Refunds"
       }
      }
     },
     "localname": "ProceedsFromIncomeTaxRefunds",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromIssuanceOfCommonStock": {
     "auth_ref": [
      "r73"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cash inflow from the additional capital contribution to the entity.",
        "label": "Proceeds from Issuance of Common Stock",
        "terseLabel": "Issuances of common stock"
       }
      }
     },
     "localname": "ProceedsFromIssuanceOfCommonStock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromLongTermLinesOfCredit": {
     "auth_ref": [
      "r74"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 6.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cash inflow from a contractual arrangement with the lender, including letter of credit, standby letter of credit and revolving credit arrangements, under which borrowings can be made up to a specific amount at any point in time with maturities due beyond one year or the operating cycle, if longer.",
        "label": "Proceeds from Long-term Lines of Credit",
        "terseLabel": "Advances under senior secured revolving credit facility"
       }
      }
     },
     "localname": "ProceedsFromLongTermLinesOfCredit",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromSaleOfProductiveAssets": {
     "auth_ref": [
      "r71"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cash inflow from the sale of property, plant and equipment (capital expenditures), software, and other intangible assets.",
        "label": "Proceeds from Sale of Productive Assets",
        "terseLabel": "Proceeds from asset sales"
       }
      }
     },
     "localname": "ProceedsFromSaleOfProductiveAssets",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromStockOptionsExercised": {
     "auth_ref": [
      "r73",
      "r315"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 5.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow from exercise of option under share-based payment arrangement.",
        "label": "Proceeds from Stock Options Exercised",
        "terseLabel": "Issuances of common stock"
       }
      }
     },
     "localname": "ProceedsFromStockOptionsExercised",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromStockPlans": {
     "auth_ref": [
      "r73"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cash inflow associated with the amount received from the stock plan during the period.",
        "label": "Proceeds from Stock Plans",
        "terseLabel": "Proceeds from issuance of common stock under employee stock purchase plan"
       }
      }
     },
     "localname": "ProceedsFromStockPlans",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProfitLoss": {
     "auth_ref": [
      "r3",
      "r50",
      "r52",
      "r56",
      "r80",
      "r97",
      "r105",
      "r113",
      "r114",
      "r151",
      "r157",
      "r161",
      "r164",
      "r167",
      "r180",
      "r244",
      "r245",
      "r246",
      "r249",
      "r250",
      "r251",
      "r253",
      "r255",
      "r257",
      "r258",
      "r350",
      "r353",
      "r354",
      "r359",
      "r360",
      "r363",
      "r365",
      "r424"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      },
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome": {
       "order": 1.0,
       "parentTag": "us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest",
       "weight": 1.0
      },
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The consolidated profit or loss for the period, net of income taxes, including the portion attributable to the noncontrolling interest.",
        "label": "Net Income (Loss), Including Portion Attributable to Noncontrolling Interest",
        "terseLabel": "Net loss",
        "totalLabel": "Net loss"
       }
      }
     },
     "localname": "ProfitLoss",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome",
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentGross": {
     "auth_ref": [
      "r29",
      "r210"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_PropertyPlantAndEquipmentNet",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before accumulated depreciation, depletion and amortization of physical assets used in the normal conduct of business and not intended for resale. Examples include, but are not limited to, land, buildings, machinery and equipment, office equipment, and furniture and fixtures.",
        "label": "Property, Plant and Equipment, Gross",
        "totalLabel": "Total property, plant and equipment - at cost"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentGross",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentGrossAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Property, Plant and Equipment, Gross [Abstract]",
        "terseLabel": "Property, plant and equipment at cost:"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentGrossAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentNet": {
     "auth_ref": [
      "r15",
      "r16",
      "r212",
      "r395",
      "r425",
      "r430"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after accumulated depreciation, depletion and amortization of physical assets used in the normal conduct of business to produce goods and services and not intended for resale. Examples include, but are not limited to, land, buildings, machinery and equipment, office equipment, and furniture and fixtures.",
        "label": "Property, Plant and Equipment, Net",
        "totalLabel": "Property, plant and equipment - net"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentNet",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProvisionForDoubtfulAccounts": {
     "auth_ref": [
      "r63",
      "r184"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 8.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expense (reversal of expense) for expected credit loss on accounts receivable.",
        "label": "Accounts Receivable, Credit Loss Expense (Reversal)",
        "terseLabel": "Provision for uncollectible accounts"
       }
      }
     },
     "localname": "ProvisionForDoubtfulAccounts",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RepaymentsOfLongTermLinesOfCredit": {
     "auth_ref": [
      "r76"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 7.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cash outflow for the settlement of obligation drawn from a contractual arrangement with the lender, including letter of credit, standby letter of credit and revolving credit arrangements, under which borrowings can be made up to a specific amount at any point in time with maturities due beyond one year or the operating cycle, if longer.",
        "label": "Repayments of Long-term Lines of Credit",
        "negatedTerseLabel": "Repayments of advances under senior secured revolving credit facility"
       }
      }
     },
     "localname": "RepaymentsOfLongTermLinesOfCredit",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RepaymentsOfOtherDebt": {
     "auth_ref": [
      "r76"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 4.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash outflow for the payment of debt classified as other.",
        "label": "Repayments of Other Debt",
        "negatedTerseLabel": "Other"
       }
      }
     },
     "localname": "RepaymentsOfOtherDebt",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ReportingUnitAmountOfFairValueInExcessOfCarryingAmount": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of fair value of reporting unit in excess of carrying amount.",
        "label": "Reporting Unit, Amount of Fair Value in Excess of Carrying Amount",
        "terseLabel": "Amount of fair value in excess of carrying amount"
       }
      }
     },
     "localname": "ReportingUnitAmountOfFairValueInExcessOfCarryingAmount",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ReportingUnitPercentageOfFairValueInExcessOfCarryingAmount": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Percentage of fair value of reporting unit in excess of carrying amount.",
        "label": "Reporting Unit, Percentage of Fair Value in Excess of Carrying Amount",
        "terseLabel": "Reporting Unit, Percentage of Fair Value in Excess of Carrying Amount"
       }
      }
     },
     "localname": "ReportingUnitPercentageOfFairValueInExcessOfCarryingAmount",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_RestrictedCashCurrent": {
     "auth_ref": [
      "r4",
      "r14",
      "r93"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash restricted as to withdrawal or usage, classified as current. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits.",
        "label": "Restricted Cash, Current",
        "terseLabel": "Restricted Cash, Current"
       }
      }
     },
     "localname": "RestrictedCashCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/BasisofPresentationBasisofPresentationNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestrictedCashNoncurrent": {
     "auth_ref": [
      "r9",
      "r17",
      "r93",
      "r449"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash restricted as to withdrawal or usage, classified as noncurrent. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits.",
        "label": "Restricted Cash, Noncurrent",
        "terseLabel": "Restricted Cash"
       }
      }
     },
     "localname": "RestrictedCashNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/BasisofPresentationBasisofPresentationNarrativeDetails",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestructuringAndRelatedActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Restructuring and Related Activities [Abstract]",
        "terseLabel": "Restructuring and Related Activities [Abstract]"
       }
      }
     },
     "localname": "RestructuringAndRelatedActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_RestructuringAndRelatedActivitiesDisclosureTextBlock": {
     "auth_ref": [
      "r215",
      "r217",
      "r220",
      "r229",
      "r230"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for restructuring and related activities. Description of restructuring activities such as exit and disposal activities, include facts and circumstances leading to the plan, the expected plan completion date, the major types of costs associated with the plan activities, total expected costs, the accrual balance at the end of the period, and the periods over which the remaining accrual will be settled.",
        "label": "Restructuring and Related Activities Disclosure [Text Block]",
        "terseLabel": "Restructuring Costs"
       }
      }
     },
     "localname": "RestructuringAndRelatedActivitiesDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsNotes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RestructuringAndRelatedCostExpectedCostRemaining1": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expected cost remaining for the specified restructuring cost.",
        "label": "Restructuring and Related Cost, Expected Cost Remaining",
        "terseLabel": "Restructuring and Related Cost, Expected Cost Remaining"
       }
      }
     },
     "localname": "RestructuringAndRelatedCostExpectedCostRemaining1",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestructuringCharges": {
     "auth_ref": [
      "r85",
      "r214",
      "r223",
      "r226"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome": {
       "order": 4.0,
       "parentTag": "us-gaap_OperatingIncomeLoss",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expenses associated with exit or disposal activities pursuant to an authorized plan. Excludes expenses related to a discontinued operation or an asset retirement obligation.",
        "label": "Restructuring Charges",
        "terseLabel": "Restructuring costs"
       }
      }
     },
     "localname": "RestructuringCharges",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome",
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestructuringCostAndReserveLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "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.",
        "label": "Restructuring Cost and Reserve [Line Items]",
        "terseLabel": "Restructuring Cost and Reserve [Line Items]"
       }
      }
     },
     "localname": "RestructuringCostAndReserveLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RestructuringCostsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Restructuring Costs [Abstract]",
        "terseLabel": "Restructuring Costs [Abstract]"
       }
      }
     },
     "localname": "RestructuringCostsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_RestructuringReserve": {
     "auth_ref": [
      "r217",
      "r224"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Carrying amount (including both current and noncurrent portions of the accrual) as of the balance sheet date pertaining to a specified type of cost associated with exit from or disposal of business activities or restructuring pursuant to a duly authorized plan.",
        "label": "Restructuring Reserve",
        "terseLabel": "Restructuring reserve balance"
       }
      }
     },
     "localname": "RestructuringReserve",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestructuringSettlementAndImpairmentProvisions": {
     "auth_ref": [
      "r67"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of restructuring charges, remediation cost, and asset impairment loss.",
        "label": "Restructuring, Settlement and Impairment Provisions",
        "terseLabel": "Goodwill impairment and restructuring costs"
       }
      }
     },
     "localname": "RestructuringSettlementAndImpairmentProvisions",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RetainedEarningsAccumulatedDeficit": {
     "auth_ref": [
      "r25",
      "r278",
      "r319",
      "r395",
      "r428",
      "r445",
      "r446"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_StockholdersEquityBeforeTreasuryStock",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cumulative amount of the reporting entity's undistributed earnings or deficit.",
        "label": "Retained Earnings (Accumulated Deficit)",
        "terseLabel": "Retained earnings"
       }
      }
     },
     "localname": "RetainedEarningsAccumulatedDeficit",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RetainedEarningsMember": {
     "auth_ref": [
      "r0",
      "r102",
      "r103",
      "r104",
      "r106",
      "r112",
      "r114",
      "r181",
      "r316",
      "r317",
      "r318",
      "r335",
      "r336",
      "r361",
      "r442",
      "r444"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cumulative amount of the reporting entity's undistributed earnings or deficit.",
        "label": "Retained Earnings [Member]",
        "terseLabel": "Retained Earnings"
       }
      }
     },
     "localname": "RetainedEarningsMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Revenue from Contract with Customer [Abstract]",
        "terseLabel": "Revenue from Contract with Customer [Abstract]"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax": {
     "auth_ref": [
      "r142",
      "r143",
      "r156",
      "r162",
      "r163",
      "r169",
      "r170",
      "r174",
      "r295",
      "r296",
      "r409"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, including tax collected from customer, of revenue from satisfaction of performance obligation by transferring promised good or service to customer. Tax collected from customer is tax assessed by governmental authority that is both imposed on and concurrent with specific revenue-producing transaction, including, but not limited to, sales, use, value-added and excise.",
        "label": "Revenue from Contract with Customer, Including Assessed Tax",
        "terseLabel": "Revenue from Contract with Customer"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerIncludingAssessedTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerTextBlock": {
     "auth_ref": [
      "r286",
      "r287",
      "r288",
      "r289",
      "r290",
      "r291",
      "r293",
      "r294",
      "r299",
      "r307"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure of revenue from contract with customer to transfer good or service and to transfer nonfinancial asset. Includes, but is not limited to, disaggregation of revenue, credit loss recognized from contract with customer, judgment and change in judgment related to contract with customer, and asset recognized from cost incurred to obtain or fulfill contract with customer. Excludes insurance and lease contracts.",
        "label": "Revenue from Contract with Customer [Text Block]",
        "terseLabel": "Revenue from Contract with Customer [Text Block]"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueNotes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RevenueFromExternalCustomersByGeographicAreasTableTextBlock": {
     "auth_ref": [
      "r172"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of revenue from external customers by geographic areas attributed to the entity's country of domicile and to foreign countries from which the entity derives revenue.",
        "label": "Revenue from External Customers by Geographic Areas [Table Text Block]",
        "terseLabel": "Revenue from External Customers by Geographic Areas"
       }
      }
     },
     "localname": "RevenueFromExternalCustomersByGeographicAreasTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RevenuePerformanceObligationAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Revenue, Performance Obligation [Abstract]",
        "terseLabel": "Revenue, Performance Obligation [Abstract]"
       }
      }
     },
     "localname": "RevenuePerformanceObligationAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RevenueRemainingPerformanceObligation": {
     "auth_ref": [
      "r292"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of transaction price allocated to performance obligation that has not been recognized as revenue.",
        "label": "Revenue, Remaining Performance Obligation, Amount",
        "terseLabel": "Revenue, Remaining Performance Obligation, Amount"
       }
      }
     },
     "localname": "RevenueRemainingPerformanceObligation",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_Revenues": {
     "auth_ref": [
      "r58",
      "r97",
      "r142",
      "r143",
      "r156",
      "r162",
      "r163",
      "r169",
      "r170",
      "r174",
      "r180",
      "r244",
      "r245",
      "r246",
      "r249",
      "r250",
      "r251",
      "r253",
      "r255",
      "r257",
      "r258",
      "r365",
      "r424"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome": {
       "order": 1.0,
       "parentTag": "us-gaap_GrossProfit",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of revenue recognized from goods sold, services rendered, insurance premiums, or other activities that constitute an earning process. Includes, but is not limited to, investment and interest income before deduction of interest expense when recognized as a component of revenue, and sales and trading gain (loss).",
        "label": "Revenues",
        "terseLabel": "Revenue"
       }
      }
     },
     "localname": "Revenues",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome",
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability": {
     "auth_ref": [
      "r386",
      "r391"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase in right-of-use asset obtained in exchange for operating lease liability.",
        "label": "Right-of-Use Asset Obtained in Exchange for Operating Lease Liability",
        "terseLabel": "Right-of-use asset obtained in exchange for operating lease liability"
       }
      }
     },
     "localname": "RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesSupplementalCashFlowDisclosuresDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable": {
     "auth_ref": [
      "r129"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule for securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) in the future that were not included in the computation of diluted EPS because to do so would increase EPS amounts or decrease loss per share amounts for the period presented, by Antidilutive Securities.",
        "label": "Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table]",
        "terseLabel": "Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table]"
       }
      }
     },
     "localname": "ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareAntidilutiveSecuritiesExcludedfromtheCalculationofDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock": {
     "auth_ref": [
      "r129"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) in the future that were not included in the computation of diluted EPS because to do so would increase EPS amounts or decrease loss per share amounts for the period presented, by antidilutive securities.",
        "label": "Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table Text Block]",
        "terseLabel": "Antidilutive Securities Excluded from the Calculation of Diluted EPS"
       }
      }
     },
     "localname": "ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfCashAndCashEquivalentsTable": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule of cash and cash equivalent balances. This table excludes restricted cash balances.",
        "label": "Schedule of Cash and Cash Equivalents [Table]",
        "terseLabel": "Schedule of Cash and Cash Equivalents [Table]"
       }
      }
     },
     "localname": "ScheduleOfCashAndCashEquivalentsTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/BasisofPresentationBasisofPresentationNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock": {
     "auth_ref": [
      "r128"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of an entity's basic and diluted earnings per share calculations, including a reconciliation of numerators and denominators of the basic and diluted per-share computations for income from continuing operations.",
        "label": "Schedule of Earnings Per Share, Basic and Diluted [Table Text Block]",
        "terseLabel": "Computation of Basic and Diluted Earnings Per Share"
       }
      }
     },
     "localname": "ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable": {
     "auth_ref": [
      "r118",
      "r122",
      "r125",
      "r128",
      "r133"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The table contains disclosure pertaining to an entity's basic earnings per share.",
        "label": "Schedule of Earnings Per Share, Basic, by Common Class, Including Two Class Method [Table]",
        "terseLabel": "Schedule of Earnings Per Share, Basic, by Common Class, Including Two Class Method [Table]"
       }
      }
     },
     "localname": "ScheduleOfEarningsPerShareBasicByCommonClassTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable": {
     "auth_ref": [
      "r199",
      "r202",
      "r410"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule of assets, excluding financial assets and goodwill, lacking physical substance with a finite life.",
        "label": "Schedule of Finite-Lived Intangible Assets [Table]",
        "terseLabel": "Schedule of Finite-Lived Intangible Assets [Table]"
       }
      }
     },
     "localname": "ScheduleOfFiniteLivedIntangibleAssetsTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails",
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails",
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillTables"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfGoodwillTable": {
     "auth_ref": [
      "r194",
      "r196"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule of goodwill and the changes during the year due to acquisition, sale, impairment or for other reasons.",
        "label": "Schedule of Goodwill [Table]",
        "terseLabel": "Schedule of Goodwill [Table]"
       }
      }
     },
     "localname": "ScheduleOfGoodwillTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfGoodwillTextBlock": {
     "auth_ref": [
      "r194",
      "r196"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of goodwill by reportable segment and in total which includes a rollforward schedule.",
        "label": "Schedule of Goodwill [Table Text Block]",
        "terseLabel": "Schedule of Goodwill [Table Text Block]"
       }
      }
     },
     "localname": "ScheduleOfGoodwillTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfRestrictedCashAndCashEquivalentsTextBlock": {
     "auth_ref": [
      "r14",
      "r93",
      "r413",
      "r427"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of cash and cash equivalents restricted as to withdrawal or usage.",
        "label": "Restrictions on Cash and Cash Equivalents [Table Text Block]",
        "terseLabel": "Restrictions on Cash and Cash Equivalents"
       }
      }
     },
     "localname": "ScheduleOfRestrictedCashAndCashEquivalentsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CashCashEquivalentsandRestrictedCashTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfRestructuringAndRelatedCostsTable": {
     "auth_ref": [
      "r216",
      "r217",
      "r218",
      "r219",
      "r226",
      "r227",
      "r228"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Table presenting the description of the restructuring costs, such as the expected cost; the costs incurred during the period; the cumulative costs incurred as of the balance sheet date; the income statement caption within which the restructuring charges recognized for the period are included; and the amount of and periodic changes to an entity's restructuring reserve that occurred during the period associated with the exit from or disposal of business activities or restructurings for each major type of cost by type of restructuring.",
        "label": "Schedule of Restructuring and Related Costs [Table]",
        "terseLabel": "Schedule of Restructuring and Related Costs [Table]"
       }
      }
     },
     "localname": "ScheduleOfRestructuringAndRelatedCostsTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfRestructuringAndRelatedCostsTextBlock": {
     "auth_ref": [
      "r221",
      "r222",
      "r225"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of costs incurred for restructuring including, but not limited to, exit and disposal activities, remediation, implementation, integration, asset impairment, and charges against earnings from the write-down of assets.",
        "label": "Restructuring and Related Costs [Table Text Block]",
        "terseLabel": "Restructuring and Related Costs [Table Text Block]"
       }
      }
     },
     "localname": "ScheduleOfRestructuringAndRelatedCostsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfRestructuringReserveByTypeOfCostTextBlock": {
     "auth_ref": [
      "r217",
      "r227"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of an entity's restructuring reserve that occurred during the period associated with the exit from or disposal of business activities or restructurings for each major type of cost. This element may also include a description of any reversal and other adjustment made during the period to the amount of an accrued liability for restructuring activities. This element may be used to encapsulate the roll forward presentations of an entity's restructuring reserve by type of cost and in total, and explanation of changes that occurred in the period.",
        "label": "Schedule of Restructuring Reserve by Type of Cost [Table Text Block]",
        "terseLabel": "Schedule of Restructuring Reserve by Type of Cost [Table Text Block]"
       }
      }
     },
     "localname": "ScheduleOfRestructuringReserveByTypeOfCostTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable": {
     "auth_ref": [
      "r151",
      "r154",
      "r160",
      "r194"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A table disclosing the profit or loss and total assets for each reportable segment of the entity. An entity discloses certain information on each reportable segment if the amounts (a) are included in the measure of segment profit or loss reviewed by the chief operating decision maker or (b) are otherwise regularly provided to the chief operating decision maker, even if not included in that measure of segment profit or loss.",
        "label": "Schedule of Segment Reporting Information, by Segment [Table]",
        "terseLabel": "Schedule of Segment Reporting Information, by Segment [Table]"
       }
      }
     },
     "localname": "ScheduleOfSegmentReportingInformationBySegmentTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfSegmentReportingInformationBySegmentTextBlock": {
     "auth_ref": [
      "r151",
      "r154",
      "r160",
      "r194"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the profit or loss and total assets for each reportable segment. An entity discloses certain information on each reportable segment if the amounts (a) are included in the measure of segment profit or loss reviewed by the chief operating decision maker or (b) are otherwise regularly provided to the chief operating decision maker, even if not included in that measure of segment profit or loss.",
        "label": "Schedule of Segment Reporting Information, by Segment [Table Text Block]",
        "terseLabel": "Results of Operations"
       }
      }
     },
     "localname": "ScheduleOfSegmentReportingInformationBySegmentTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/SegmentInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleofFiniteLivedIntangibleAssetsFutureAmortizationExpenseTableTextBlock": {
     "auth_ref": [
      "r202"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the amount of amortization expense expected to be recorded in succeeding fiscal years for finite-lived intangible assets.",
        "label": "Schedule of Finite-Lived Intangible Assets, Future Amortization Expense [Table Text Block]",
        "terseLabel": "Schedule of Finite-Lived Intangible Assets, Future Amortization Expense [Table Text Block]"
       }
      }
     },
     "localname": "ScheduleofFiniteLivedIntangibleAssetsFutureAmortizationExpenseTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SegmentDomain": {
     "auth_ref": [
      "r139",
      "r142",
      "r143",
      "r144",
      "r145",
      "r146",
      "r147",
      "r148",
      "r149",
      "r150",
      "r151",
      "r152",
      "r153",
      "r156",
      "r157",
      "r158",
      "r159",
      "r161",
      "r162",
      "r163",
      "r164",
      "r165",
      "r167",
      "r174",
      "r219",
      "r228",
      "r438"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Components of an entity that engage in business activities from which they may earn revenue and incur expenses, including transactions with other components of the same entity.",
        "label": "Segments [Domain]",
        "terseLabel": "Segments [Domain]"
       }
      }
     },
     "localname": "SegmentDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails",
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails",
      "http://www.matrixservicecompany.com/role/RevenueDetails",
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SegmentReportingAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Segment Reporting [Abstract]",
        "terseLabel": "Segment Reporting [Abstract]"
       }
      }
     },
     "localname": "SegmentReportingAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_SegmentReportingDisclosureTextBlock": {
     "auth_ref": [
      "r139",
      "r140",
      "r141",
      "r151",
      "r155",
      "r161",
      "r165",
      "r166",
      "r167",
      "r168",
      "r169",
      "r173",
      "r174",
      "r175"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for reporting segments including data and tables. Reportable segments include those that meet any of the following quantitative thresholds a) it's reported revenue, including sales to external customers and intersegment sales or transfers is 10 percent or more of the combined revenue, internal and external, of all operating segments b) the absolute amount of its reported profit or loss is 10 percent or more of the greater, in absolute amount of 1) the combined reported profit of all operating segments that did not report a loss or 2) the combined reported loss of all operating segments that did report a loss c) its assets are 10 percent or more of the combined assets of all operating segments.",
        "label": "Segment Reporting Disclosure [Text Block]",
        "terseLabel": "Segment Information"
       }
      }
     },
     "localname": "SegmentReportingDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/SegmentInformationNotes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SegmentReportingInformationLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "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.",
        "label": "Segment Reporting Information [Line Items]",
        "terseLabel": "Segment Reporting Information [Line Items]"
       }
      }
     },
     "localname": "SegmentReportingInformationLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SellingGeneralAndAdministrativeExpense": {
     "auth_ref": [
      "r68"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome": {
       "order": 2.0,
       "parentTag": "us-gaap_OperatingIncomeLoss",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The aggregate total costs related to selling a firm's product and services, as well as all other general and administrative expenses. Direct selling expenses (for example, credit, warranty, and advertising) are expenses that can be directly linked to the sale of specific products. Indirect selling expenses are expenses that cannot be directly linked to the sale of specific products, for example telephone expenses, Internet, and postal charges. General and administrative expenses include salaries of non-sales personnel, rent, utilities, communication, etc.",
        "label": "Selling, General and Administrative Expense",
        "terseLabel": "Selling, general and administrative expenses"
       }
      }
     },
     "localname": "SellingGeneralAndAdministrativeExpense",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome",
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SeveranceCosts1": {
     "auth_ref": [
      "r85"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expenses for special or contractual termination benefits provided to current employees involuntarily terminated under a benefit arrangement associated exit or disposal activities pursuant to an authorized plan. Excludes expenses related to one-time termination benefits, a discontinued operation or an asset retirement obligation.",
        "label": "Severance Costs",
        "terseLabel": "Severance costs and other benefits"
       }
      }
     },
     "localname": "SeveranceCosts1",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ShareBasedCompensation": {
     "auth_ref": [
      "r84"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows": {
       "order": 4.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of noncash expense for share-based payment arrangement.",
        "label": "Share-based Payment Arrangement, Noncash Expense",
        "terseLabel": "Stock-based compensation expense"
       }
      }
     },
     "localname": "ShareBasedCompensation",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SharesOutstanding": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of shares issued which are neither cancelled nor held in the treasury.",
        "label": "Shares, Outstanding",
        "terseLabel": "Common stock, shares outstanding"
       }
      }
     },
     "localname": "SharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShortTermLeaseCost": {
     "auth_ref": [
      "r384",
      "r391"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/LeasesComponentsofLeaseCostsDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_LeaseCost",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of short-term lease cost, excluding expense for lease with term of one month or less.",
        "label": "Short-term Lease, Cost",
        "terseLabel": "Short-term lease expense"
       }
      }
     },
     "localname": "ShortTermLeaseCost",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/LeasesComponentsofLeaseCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StatementBusinessSegmentsAxis": {
     "auth_ref": [
      "r2",
      "r139",
      "r142",
      "r143",
      "r144",
      "r145",
      "r146",
      "r147",
      "r148",
      "r149",
      "r150",
      "r151",
      "r152",
      "r153",
      "r156",
      "r157",
      "r158",
      "r159",
      "r161",
      "r162",
      "r163",
      "r164",
      "r165",
      "r167",
      "r174",
      "r194",
      "r213",
      "r219",
      "r228",
      "r438"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by business segments.",
        "label": "Segments [Axis]",
        "terseLabel": "Business Segments [Axis]"
       }
      }
     },
     "localname": "StatementBusinessSegmentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails",
      "http://www.matrixservicecompany.com/role/RestructuringCostsDetails",
      "http://www.matrixservicecompany.com/role/RevenueDetails",
      "http://www.matrixservicecompany.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementClassOfStockAxis": {
     "auth_ref": [
      "r18",
      "r19",
      "r20",
      "r95",
      "r97",
      "r118",
      "r122",
      "r123",
      "r125",
      "r128",
      "r136",
      "r137",
      "r138",
      "r180",
      "r244",
      "r249",
      "r250",
      "r251",
      "r257",
      "r258",
      "r272",
      "r273",
      "r275",
      "r276",
      "r277",
      "r365",
      "r467"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by the different classes of stock of the entity.",
        "label": "Class of Stock [Axis]",
        "terseLabel": "Class of Stock [Axis]"
       }
      }
     },
     "localname": "StatementClassOfStockAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementEquityComponentsAxis": {
     "auth_ref": [
      "r0",
      "r39",
      "r54",
      "r55",
      "r56",
      "r102",
      "r103",
      "r104",
      "r106",
      "r112",
      "r114",
      "r135",
      "r181",
      "r277",
      "r278",
      "r316",
      "r317",
      "r318",
      "r335",
      "r336",
      "r361",
      "r368",
      "r369",
      "r370",
      "r371",
      "r372",
      "r374",
      "r442",
      "r443",
      "r444",
      "r469"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by component of equity.",
        "label": "Equity Components [Axis]",
        "terseLabel": "Equity Components [Axis]"
       }
      }
     },
     "localname": "StatementEquityComponentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "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.",
        "label": "Statement [Line Items]",
        "terseLabel": "Statement [Line Items]"
       }
      }
     },
     "localname": "StatementLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical",
      "http://www.matrixservicecompany.com/role/StatementofOtherComprehensiveIncomeParenthetical"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfCashFlowsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statement of Cash Flows [Abstract]",
        "terseLabel": "Statement of Cash Flows [Abstract]"
       }
      }
     },
     "localname": "StatementOfCashFlowsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfFinancialPositionAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statement of Financial Position [Abstract]",
        "terseLabel": "Statement of Financial Position [Abstract]"
       }
      }
     },
     "localname": "StatementOfFinancialPositionAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfOtherComprehensiveIncomeAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statement of Other Comprehensive Income [Abstract]"
       }
      }
     },
     "localname": "StatementOfOtherComprehensiveIncomeAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfStockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statement of Stockholders' Equity [Abstract]",
        "terseLabel": "Statement of Stockholders' Equity [Abstract]"
       }
      }
     },
     "localname": "StatementOfStockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementTable": {
     "auth_ref": [
      "r102",
      "r103",
      "r104",
      "r135",
      "r409"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule reflecting a Statement of Income, Statement of Cash Flows, Statement of Financial Position, Statement of Shareholders' Equity and Other Comprehensive Income, or other statement as needed.",
        "label": "Statement [Table]",
        "terseLabel": "Statement [Table]"
       }
      }
     },
     "localname": "StatementTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical",
      "http://www.matrixservicecompany.com/role/StatementofOtherComprehensiveIncomeParenthetical"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans": {
     "auth_ref": [
      "r19",
      "r20",
      "r277",
      "r278"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of shares issued during the period as a result of an employee stock purchase plan.",
        "label": "Stock Issued During Period, Shares, Employee Stock Purchase Plans",
        "terseLabel": "Employee Stock Purchase Plan, shares"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised": {
     "auth_ref": [
      "r19",
      "r20",
      "r277",
      "r278",
      "r313"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of share options (or share units) exercised during the current period.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercises in Period",
        "terseLabel": "Exercise of stock options, shares"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodSharesStockOptionsExercised",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan": {
     "auth_ref": [
      "r19",
      "r20",
      "r277",
      "r278"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Aggregate change in value for stock issued during the period as a result of employee stock purchase plan.",
        "label": "Stock Issued During Period, Value, Employee Stock Purchase Plan",
        "terseLabel": "Treasury shares sold to Employee Stock Purchase Plan"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodValueEmployeeStockPurchasePlan",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Stockholders' Equity Attributable to Parent [Abstract]",
        "terseLabel": "Stockholders' equity:"
       }
      }
     },
     "localname": "StockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StockholdersEquityBeforeTreasuryStock": {
     "auth_ref": [],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total amount of stockholders' equity (deficit) items including stock value, paid in capital, retained earnings and including equity attributable to noncontrolling interests and before deducting the carrying value of treasury stock.",
        "label": "Stockholders' Equity before Treasury Stock",
        "totalLabel": "Stockholders' equity"
       }
      }
     },
     "localname": "StockholdersEquityBeforeTreasuryStock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest": {
     "auth_ref": [
      "r0",
      "r1",
      "r55",
      "r97",
      "r102",
      "r103",
      "r104",
      "r106",
      "r112",
      "r180",
      "r181",
      "r278",
      "r316",
      "r317",
      "r318",
      "r335",
      "r336",
      "r348",
      "r349",
      "r358",
      "r361",
      "r365",
      "r368",
      "r369",
      "r374",
      "r443",
      "r444",
      "r469"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_LiabilitiesAndStockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of stockholders' equity (deficit), net of receivables from officers, directors, owners, and affiliates of the entity, attributable to both the parent and noncontrolling interests. Amount excludes temporary equity. Alternate caption for the concept is permanent equity.",
        "label": "Stockholders' Equity, Including Portion Attributable to Noncontrolling Interest",
        "periodEndLabel": "Balances, ending",
        "periodStartLabel": "Balances, beginning",
        "terseLabel": "Total stockholders' equity"
       }
      }
     },
     "localname": "StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SupplementalCashFlowInformationAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Supplemental Cash Flow Information [Abstract]",
        "terseLabel": "Supplemental disclosure of cash flow information:"
       }
      }
     },
     "localname": "SupplementalCashFlowInformationAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_TaxCreditCarryforwardValuationAllowance": {
     "auth_ref": [
      "r329"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of valuation allowance pertaining to the deferred tax asset representing potential future taxable deductions from tax credit carryforwards for which it is more likely than not that a tax benefit will not be realized.",
        "label": "Tax Credit Carryforward, Valuation Allowance",
        "terseLabel": "Tax Credit Carryforward, Valuation Allowance"
       }
      }
     },
     "localname": "TaxCreditCarryforwardValuationAllowance",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_TextBlockAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Text Block [Abstract]"
       }
      }
     },
     "localname": "TextBlockAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_TimeAndMaterialsContractMember": {
     "auth_ref": [
      "r303"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Contract with customer in which amount of consideration is based on time and materials consumed.",
        "label": "Time-and-materials Contract [Member]",
        "terseLabel": "Time-and-materials Contract"
       }
      }
     },
     "localname": "TimeAndMaterialsContractMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/RevenueDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_TreasuryStockMember": {
     "auth_ref": [
      "r38",
      "r279"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Shares of an entity that have been repurchased by the entity. This stock has no voting rights and receives no dividends. Note that treasury stock may be recorded at its total cost or separately as par (or stated) value and additional paid in capital. Classified within stockholders' equity if nonredeemable or redeemable solely at the option of the issuer. Classified within temporary equity if redemption is outside the control of the issuer.",
        "label": "Treasury Stock [Member]",
        "terseLabel": "Treasury Stock"
       }
      }
     },
     "localname": "TreasuryStockMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity",
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_TreasuryStockShares": {
     "auth_ref": [
      "r38",
      "r279"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of common and preferred shares that were previously issued and that were repurchased by the issuing entity and held in treasury on the financial statement date. This stock has no voting rights and receives no dividends.",
        "label": "Treasury Stock, Shares",
        "terseLabel": "Treasury stock, shares"
       }
      }
     },
     "localname": "TreasuryStockShares",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_TreasuryStockSharesAcquired": {
     "auth_ref": [
      "r20",
      "r277",
      "r278"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of shares that have been repurchased during the period and are being held in treasury.",
        "label": "Treasury Stock, Shares, Acquired",
        "terseLabel": "Treasury Stock, Shares, Acquired"
       }
      }
     },
     "localname": "TreasuryStockSharesAcquired",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_TreasuryStockValue": {
     "auth_ref": [
      "r38",
      "r279",
      "r280"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount allocated to treasury stock. Treasury stock is common and preferred shares of an entity that were issued, repurchased by the entity, and are held in its treasury.",
        "label": "Treasury Stock, Value",
        "negatedLabel": "Less: Treasury stock, at cost \u2014 1,104,952 shares as of March 31, 2022, and 1,338,779 shares as of June\u00a030, 2021"
       }
      }
     },
     "localname": "TreasuryStockValue",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_TreasuryStockValueAcquiredCostMethod": {
     "auth_ref": [
      "r277",
      "r278",
      "r279"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Equity impact of the cost of common and preferred stock that were repurchased during the period. Recorded using the cost method.",
        "label": "Treasury Stock, Value, Acquired, Cost Method",
        "negatedTerseLabel": "Open market purchases of treasury shares"
       }
      }
     },
     "localname": "TreasuryStockValueAcquiredCostMethod",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_UnapprovedChangeOrdersAmount": {
     "auth_ref": [
      "r407"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cost incurred on construction contract for unapproved change order, claim, or similar item subject to uncertainty.",
        "label": "Construction Contractor, Contract Cost, Subject to Uncertainty, Amount",
        "terseLabel": "Unapproved change orders and claims"
       }
      }
     },
     "localname": "UnapprovedChangeOrdersAmount",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ValuationAllowanceByDeferredTaxAssetAxis": {
     "auth_ref": [
      "r329"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of deferred tax consequences attributable to deductible temporary differences.",
        "label": "Valuation Allowance by Deferred Tax Asset [Axis]",
        "terseLabel": "Valuation Allowance by Deferred Tax Asset [Axis]"
       }
      }
     },
     "localname": "ValuationAllowanceByDeferredTaxAssetAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/IncomeTaxesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding": {
     "auth_ref": [
      "r117",
      "r128"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The average number of shares or units issued and outstanding that are used in calculating diluted EPS or earnings per unit (EPU), determined based on the timing of issuance of shares or units in the period.",
        "label": "Weighted Average Number of Shares Outstanding, Diluted",
        "terseLabel": "Diluted",
        "totalLabel": "Diluted weighted average shares (shares)"
       }
      }
     },
     "localname": "WeightedAverageNumberOfDilutedSharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome",
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Weighted Average Number of Shares Outstanding, Diluted [Abstract]",
        "terseLabel": "Weighted average common shares outstanding:"
       }
      }
     },
     "localname": "WeightedAverageNumberOfSharesOutstandingAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_WeightedAverageNumberOfSharesOutstandingBasic": {
     "auth_ref": [
      "r116",
      "r128"
     ],
     "calculation": {
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding",
       "weight": 1.0
      }
     },
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of [basic] shares or units, after adjustment for contingently issuable shares or units and other shares or units not deemed outstanding, determined by relating the portion of time within a reporting period that common shares or units have been outstanding to the total time in that period.",
        "label": "Weighted Average Number of Shares Outstanding, Basic",
        "terseLabel": "Basic",
        "verboseLabel": "Weighted average shares outstanding - basic (shares)"
       }
      }
     },
     "localname": "WeightedAverageNumberOfSharesOutstandingBasic",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome",
      "http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"
     ],
     "xbrltype": "sharesItemType"
    }
   },
   "unitCount": 5
  }
 },
 "std_ref": {
  "r0": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "105",
   "URI": "http://asc.fasb.org/extlink&oid=124434974&loc=SL124442142-165695"
  },
  "r1": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "105",
   "URI": "http://asc.fasb.org/extlink&oid=124434974&loc=SL124442142-165695"
  },
  "r10": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6812-107765"
  },
  "r100": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.12-04(a))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=120395691&loc=d3e24072-122690"
  },
  "r101": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "235",
   "URI": "http://asc.fasb.org/topic&trid=2122369"
  },
  "r102": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "23",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124436220&loc=d3e21914-107793"
  },
  "r103": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "24",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124436220&loc=d3e21930-107793"
  },
  "r104": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124436220&loc=d3e21711-107793"
  },
  "r105": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(2)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22499-107794"
  },
  "r106": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(3)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22499-107794"
  },
  "r107": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22694-107794"
  },
  "r108": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22694-107794"
  },
  "r109": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22583-107794"
  },
  "r11": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6904-107765"
  },
  "r110": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22595-107794"
  },
  "r111": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22644-107794"
  },
  "r112": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22644-107794"
  },
  "r113": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22658-107794"
  },
  "r114": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22663-107794"
  },
  "r115": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=122038215&loc=d3e31010-122693"
  },
  "r116": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=d3e1448-109256"
  },
  "r117": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=d3e1505-109256"
  },
  "r118": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=d3e1252-109256"
  },
  "r119": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=d3e1707-109256"
  },
  "r12": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6911-107765"
  },
  "r120": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "23",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=d3e1757-109256"
  },
  "r121": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=d3e1500-109256"
  },
  "r122": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=d3e1278-109256"
  },
  "r123": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "55",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=d3e2626-109256"
  },
  "r124": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "60B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=SL5780133-109256"
  },
  "r125": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "60B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=SL5780133-109256"
  },
  "r126": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "68B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=SL5498026-109256"
  },
  "r127": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=d3e1337-109256"
  },
  "r128": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=124432515&loc=d3e3550-109257"
  },
  "r129": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=124432515&loc=d3e3550-109257"
  },
  "r13": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6935-107765"
  },
  "r130": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=124432515&loc=d3e3630-109257"
  },
  "r131": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=109243012&loc=SL65017193-207537"
  },
  "r132": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125512782&loc=d3e3842-109258"
  },
  "r133": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "52",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125512782&loc=d3e4984-109258"
  },
  "r134": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "260",
   "URI": "http://asc.fasb.org/topic&trid=2144383"
  },
  "r135": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "272",
   "URI": "http://asc.fasb.org/extlink&oid=125520817&loc=d3e70191-108054"
  },
  "r136": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "272",
   "URI": "http://asc.fasb.org/extlink&oid=125520817&loc=d3e70229-108054"
  },
  "r137": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "272",
   "URI": "http://asc.fasb.org/extlink&oid=6373374&loc=d3e70434-108055"
  },
  "r138": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "272",
   "URI": "http://asc.fasb.org/extlink&oid=6373374&loc=d3e70478-108055"
  },
  "r139": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8657-108599"
  },
  "r14": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(1))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r140": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8721-108599"
  },
  "r141": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8721-108599"
  },
  "r142": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r143": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r144": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r145": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r146": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r147": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r148": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(g)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r149": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r15": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(13))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r150": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(j)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r151": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r152": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8813-108599"
  },
  "r153": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8813-108599"
  },
  "r154": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8813-108599"
  },
  "r155": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "26",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8844-108599"
  },
  "r156": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8906-108599"
  },
  "r157": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8906-108599"
  },
  "r158": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8906-108599"
  },
  "r159": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8906-108599"
  },
  "r16": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(14))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r160": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8906-108599"
  },
  "r161": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "31",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8924-108599"
  },
  "r162": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8933-108599"
  },
  "r163": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8933-108599"
  },
  "r164": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8933-108599"
  },
  "r165": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8933-108599"
  },
  "r166": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8933-108599"
  },
  "r167": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8933-108599"
  },
  "r168": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "34",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8981-108599"
  },
  "r169": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "40",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e9031-108599"
  },
  "r17": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(17))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r170": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "41",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e9038-108599"
  },
  "r171": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "41",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e9038-108599"
  },
  "r172": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "41",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "a",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e9038-108599"
  },
  "r173": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "41",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e9038-108599"
  },
  "r174": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "42",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e9054-108599"
  },
  "r175": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "280",
   "URI": "http://asc.fasb.org/topic&trid=2134510"
  },
  "r176": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=124259787&loc=d3e4428-111522"
  },
  "r177": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=124259787&loc=d3e4531-111522"
  },
  "r178": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=123577603&loc=d3e5074-111524"
  },
  "r179": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "20",
   "Subparagraph": "(d)(1)",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=124402435&loc=SL124402458-218513"
  },
  "r18": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(27))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r180": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "323",
   "URI": "http://asc.fasb.org/extlink&oid=114001798&loc=d3e33918-111571"
  },
  "r181": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=122640432&loc=SL121648383-210437"
  },
  "r182": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(e)(1)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=122640432&loc=SL121648383-210437"
  },
  "r183": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124255206&loc=SL82895884-210446"
  },
  "r184": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124255953&loc=SL82919249-210447"
  },
  "r185": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=99380562&loc=d3e13770-109266"
  },
  "r186": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=99380562&loc=d3e13777-109266"
  },
  "r187": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=120320667&loc=SL49117168-202975"
  },
  "r188": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267"
  },
  "r189": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267"
  },
  "r19": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(28))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r190": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267"
  },
  "r191": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(e)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267"
  },
  "r192": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(f)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267"
  },
  "r193": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(h)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267"
  },
  "r194": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267"
  },
  "r195": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=121556970&loc=d3e13854-109267"
  },
  "r196": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=121556970&loc=d3e13854-109267"
  },
  "r197": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=6388964&loc=d3e16212-109274"
  },
  "r198": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=6388964&loc=d3e16225-109274"
  },
  "r199": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(a)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16265-109275"
  },
  "r2": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "205",
   "URI": "http://asc.fasb.org/extlink&oid=109222650&loc=d3e1361-107760"
  },
  "r20": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(29))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r200": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(d)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16265-109275"
  },
  "r201": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "((a)(1),(b))",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16323-109275"
  },
  "r202": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(a)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16323-109275"
  },
  "r203": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(a)(1)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16323-109275"
  },
  "r204": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(a)(2)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16323-109275"
  },
  "r205": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(a)(3)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16323-109275"
  },
  "r206": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(b)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16323-109275"
  },
  "r207": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(d)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16323-109275"
  },
  "r208": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(b)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16373-109275"
  },
  "r209": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "350",
   "URI": "http://asc.fasb.org/topic&trid=2144416"
  },
  "r21": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(3)(c)(3))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r210": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=6391035&loc=d3e2868-110229"
  },
  "r211": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=6391035&loc=d3e2868-110229"
  },
  "r212": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=6391035&loc=d3e2868-110229"
  },
  "r213": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=109226691&loc=d3e2941-110230"
  },
  "r214": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=109237686&loc=d3e17752-110868"
  },
  "r215": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869"
  },
  "r216": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(1)",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869"
  },
  "r217": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(2)",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869"
  },
  "r218": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869"
  },
  "r219": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869"
  },
  "r22": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(3)(c)(4))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r220": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869"
  },
  "r221": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869"
  },
  "r222": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB TOPIC 5.P.3)",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=115931487&loc=d3e140864-122747"
  },
  "r223": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.3)",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=115931487&loc=d3e140864-122747"
  },
  "r224": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB TOPIC 5.P.4(b)(2))",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747"
  },
  "r225": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB TOPIC 5.P.4)",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747"
  },
  "r226": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.4(b)(1))",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747"
  },
  "r227": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.4(b)(2))",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747"
  },
  "r228": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.4(d))",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747"
  },
  "r229": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.4(e))",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747"
  },
  "r23": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(3))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r230": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "420",
   "URI": "http://asc.fasb.org/topic&trid=2175745"
  },
  "r231": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "440",
   "URI": "http://asc.fasb.org/extlink&oid=123406679&loc=d3e25336-109308"
  },
  "r232": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "440",
   "URI": "http://asc.fasb.org/extlink&oid=123406679&loc=d3e25336-109308"
  },
  "r233": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "440",
   "URI": "http://asc.fasb.org/topic&trid=2144648"
  },
  "r234": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=121557415&loc=d3e14326-108349"
  },
  "r235": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=121557415&loc=d3e14615-108349"
  },
  "r236": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=121557415&loc=d3e14394-108349"
  },
  "r237": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=121557415&loc=d3e14435-108349"
  },
  "r238": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=121557415&loc=d3e14453-108349"
  },
  "r239": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=121557415&loc=d3e14472-108349"
  },
  "r24": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30)(a)(1))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r240": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=121557415&loc=d3e14557-108349"
  },
  "r241": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "450",
   "URI": "http://asc.fasb.org/topic&trid=2127136"
  },
  "r242": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=124440162&loc=d3e12021-110248"
  },
  "r243": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=124440162&loc=d3e12053-110248"
  },
  "r244": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(i))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442526-122756"
  },
  "r245": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(ii))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442526-122756"
  },
  "r246": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(iii)(A))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442526-122756"
  },
  "r247": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(iii)(B))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442526-122756"
  },
  "r248": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(iii))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442526-122756"
  },
  "r249": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(iv))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442526-122756"
  },
  "r25": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30)(a)(3))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r250": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(5))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442526-122756"
  },
  "r251": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(i))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442552-122756"
  },
  "r252": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iii)(A)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442552-122756"
  },
  "r253": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iii)(A))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442552-122756"
  },
  "r254": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iii)(B)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442552-122756"
  },
  "r255": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iii)(B))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442552-122756"
  },
  "r256": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iii)(C))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442552-122756"
  },
  "r257": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iv))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442552-122756"
  },
  "r258": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(5))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442552-122756"
  },
  "r259": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495323-112611"
  },
  "r26": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(32))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r260": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495323-112611"
  },
  "r261": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(h)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495323-112611"
  },
  "r262": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(i)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495323-112611"
  },
  "r263": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495323-112611"
  },
  "r264": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1C",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495334-112611"
  },
  "r265": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1C",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495334-112611"
  },
  "r266": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1C",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495334-112611"
  },
  "r267": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1E",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495348-112611"
  },
  "r268": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1I",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495371-112611"
  },
  "r269": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1I",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495371-112611"
  },
  "r27": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(4)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r270": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1I",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495371-112611"
  },
  "r271": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "470",
   "URI": "http://asc.fasb.org/topic&trid=2208564"
  },
  "r272": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496158-112644"
  },
  "r273": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496158-112644"
  },
  "r274": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496158-112644"
  },
  "r275": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496158-112644"
  },
  "r276": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496171-112644"
  },
  "r277": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=d3e21463-112644"
  },
  "r278": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.3-04)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=120397183&loc=d3e187085-122770"
  },
  "r279": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=6405813&loc=d3e23239-112655"
  },
  "r28": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.1)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r280": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=6405834&loc=d3e23315-112656"
  },
  "r281": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "35",
   "Topic": "605",
   "URI": "http://asc.fasb.org/extlink&oid=123355788&loc=d3e57763-111642"
  },
  "r282": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123360276&loc=SL49130531-203044"
  },
  "r283": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123360276&loc=SL49130532-203044"
  },
  "r284": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123360276&loc=SL49130533-203044"
  },
  "r285": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130551-203045"
  },
  "r286": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130551-203045"
  },
  "r287": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130554-203045"
  },
  "r288": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130554-203045"
  },
  "r289": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130554-203045"
  },
  "r29": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.13)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r290": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130554-203045"
  },
  "r291": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130554-203045"
  },
  "r292": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130556-203045"
  },
  "r293": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(2)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130556-203045"
  },
  "r294": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130558-203045"
  },
  "r295": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130543-203045"
  },
  "r296": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130545-203045"
  },
  "r297": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130549-203045"
  },
  "r298": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130549-203045"
  },
  "r299": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130550-203045"
  },
  "r3": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "205",
   "URI": "http://asc.fasb.org/extlink&oid=109222650&loc=SL51721683-107760"
  },
  "r30": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.14)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r300": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r301": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r302": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r303": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r304": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r305": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r306": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(g)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r307": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "606",
   "URI": "http://asc.fasb.org/topic&trid=49130388"
  },
  "r308": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(i)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920"
  },
  "r309": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "80",
   "Subparagraph": "(d)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=65877416&loc=SL14450657-114947"
  },
  "r31": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.17)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r310": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "80",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=35742348&loc=SL14450788-114948"
  },
  "r311": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=123468992&loc=d3e4534-113899"
  },
  "r312": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=120381028&loc=d3e5047-113901"
  },
  "r313": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)(2)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901"
  },
  "r314": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(g)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901"
  },
  "r315": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=120381028&loc=SL79508275-113901"
  },
  "r316": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=121322162&loc=SL121327923-165333"
  },
  "r317": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(f)(1)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=121322162&loc=SL121327923-165333"
  },
  "r318": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=121322162&loc=SL121327923-165333"
  },
  "r319": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(g)(2)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=121322162&loc=SL121327923-165333"
  },
  "r32": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19(a))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r320": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=122142933&loc=d3e11149-113907"
  },
  "r321": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=122142933&loc=d3e11178-113907"
  },
  "r322": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=123427490&loc=d3e32059-109318"
  },
  "r323": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=123427490&loc=d3e31917-109318"
  },
  "r324": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=123427490&loc=d3e31931-109318"
  },
  "r325": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=121826272&loc=d3e32672-109319"
  },
  "r326": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=121826272&loc=d3e32687-109319"
  },
  "r327": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=121826272&loc=d3e32705-109319"
  },
  "r328": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=121826272&loc=d3e32809-109319"
  },
  "r329": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=121826272&loc=d3e32537-109319"
  },
  "r33": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19(b),22(b))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r330": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=121826272&loc=d3e32537-109319"
  },
  "r331": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=121826272&loc=d3e32857-109319"
  },
  "r332": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=121826272&loc=d3e32559-109319"
  },
  "r333": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=121826272&loc=d3e32621-109319"
  },
  "r334": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=121826272&loc=d3e32632-109319"
  },
  "r335": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(d)(2)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=123459177&loc=SL121830611-158277"
  },
  "r336": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(d)(3)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=123459177&loc=SL121830611-158277"
  },
  "r337": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(e)(3)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=123459177&loc=SL121830611-158277"
  },
  "r338": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB TOPIC 6.I.5.Q1)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=122134291&loc=d3e330036-122817"
  },
  "r339": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB TOPIC 6.I.7)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=122134291&loc=d3e330036-122817"
  },
  "r34": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19-26)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r340": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 6.I.Fact.4)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=122134291&loc=d3e330036-122817"
  },
  "r341": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 11.C)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=122134291&loc=d3e330215-122817"
  },
  "r342": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=123586238&loc=d3e38679-109324"
  },
  "r343": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "270",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=6424409&loc=d3e44925-109338"
  },
  "r344": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(a)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=6424122&loc=d3e41874-109331"
  },
  "r345": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "740",
   "URI": "http://asc.fasb.org/topic&trid=2144680"
  },
  "r346": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=123410050&loc=d3e5333-128473"
  },
  "r347": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "44",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=123410050&loc=d3e5558-128473"
  },
  "r348": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=123454820&loc=SL4568447-111683"
  },
  "r349": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=123454820&loc=SL4568740-111683"
  },
  "r35": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.20)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r350": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "19",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=123454820&loc=SL4569616-111683"
  },
  "r351": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=116870748&loc=SL6758485-165988"
  },
  "r352": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=116870748&loc=SL6758485-165988"
  },
  "r353": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(1)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=109239629&loc=SL4573702-111684"
  },
  "r354": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=109239629&loc=SL4573702-111684"
  },
  "r355": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c),(3)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=109239629&loc=SL4573702-111684"
  },
  "r356": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(bb)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=123419778&loc=d3e5710-111685"
  },
  "r357": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=123419778&loc=d3e5710-111685"
  },
  "r358": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4I",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=120409616&loc=SL4590271-111686"
  },
  "r359": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4J",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=120409616&loc=SL4591551-111686"
  },
  "r36": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.21)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r360": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4K",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=120409616&loc=SL4591552-111686"
  },
  "r361": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(e)(3)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=123482062&loc=SL123482106-238011"
  },
  "r362": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(e)(4)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=123482062&loc=SL123482106-238011"
  },
  "r363": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(f)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=123482062&loc=SL123482106-238011"
  },
  "r364": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=123594809&loc=SL116692626-108610"
  },
  "r365": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=123596393&loc=d3e14064-108612"
  },
  "r366": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=125521441&loc=d3e30755-110894"
  },
  "r367": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "230",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=123444420&loc=d3e33268-110906"
  },
  "r368": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=118261656&loc=d3e32136-110900"
  },
  "r369": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Subparagraph": "(a)",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900"
  },
  "r37": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.25)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r370": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Subparagraph": "(b)",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900"
  },
  "r371": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Subparagraph": "(c)",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900"
  },
  "r372": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Subparagraph": "(d)",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900"
  },
  "r373": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=118261656&loc=d3e32262-110900"
  },
  "r374": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=6450520&loc=d3e32583-110901"
  },
  "r375": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=6450988&loc=d3e26243-108391"
  },
  "r376": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=124435984&loc=d3e28555-108399"
  },
  "r377": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123399704&loc=SL77918431-209957"
  },
  "r378": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123391704&loc=SL77918627-209977"
  },
  "r379": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123391704&loc=SL77918627-209977"
  },
  "r38": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.29,30)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r380": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123391704&loc=SL77918643-209977"
  },
  "r381": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)(3)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123408670&loc=SL77918673-209980"
  },
  "r382": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123408670&loc=SL77918673-209980"
  },
  "r383": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123408670&loc=SL77918686-209980"
  },
  "r384": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123408670&loc=SL77918686-209980"
  },
  "r385": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(1)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123408670&loc=SL77918686-209980"
  },
  "r386": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(2)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123408670&loc=SL77918686-209980"
  },
  "r387": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(3)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123408670&loc=SL77918686-209980"
  },
  "r388": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(4)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123408670&loc=SL77918686-209980"
  },
  "r389": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123408670&loc=SL77918686-209980"
  },
  "r39": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.29-31)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r390": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123408670&loc=SL77918701-209980"
  },
  "r391": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "53",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123414884&loc=SL77918982-209971"
  },
  "r392": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "http://asc.fasb.org/subtopic&trid=77888251"
  },
  "r393": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "852",
   "URI": "http://asc.fasb.org/extlink&oid=124433192&loc=SL2890621-112765"
  },
  "r394": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "852",
   "URI": "http://asc.fasb.org/extlink&oid=124433192&loc=SL2890621-112765"
  },
  "r395": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "852",
   "URI": "http://asc.fasb.org/extlink&oid=84165509&loc=d3e56426-112766"
  },
  "r396": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)(1)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719"
  },
  "r397": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)(2)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719"
  },
  "r398": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)(3)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719"
  },
  "r399": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(1)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107314-111719"
  },
  "r4": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6676-107765"
  },
  "r40": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.3(a)(4))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r400": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(2)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107314-111719"
  },
  "r401": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(3)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107314-111719"
  },
  "r402": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "910",
   "URI": "http://asc.fasb.org/extlink&oid=123377286&loc=SL119991535-234732"
  },
  "r403": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "910",
   "URI": "http://asc.fasb.org/extlink&oid=123353855&loc=SL119991585-234733"
  },
  "r404": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "910",
   "URI": "http://asc.fasb.org/extlink&oid=123353855&loc=SL119991595-234733"
  },
  "r405": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "910",
   "URI": "http://asc.fasb.org/extlink&oid=123353855&loc=SL119991598-234733"
  },
  "r406": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "910",
   "URI": "http://asc.fasb.org/extlink&oid=123353855&loc=SL119991598-234733"
  },
  "r407": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "910",
   "URI": "http://asc.fasb.org/extlink&oid=6471471&loc=d3e48698-109348"
  },
  "r408": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "310",
   "Subparagraph": "(b)",
   "Topic": "912",
   "URI": "http://asc.fasb.org/extlink&oid=123371682&loc=d3e55415-109406"
  },
  "r409": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 11.L)",
   "Topic": "924",
   "URI": "http://asc.fasb.org/extlink&oid=6472922&loc=d3e499488-122856"
  },
  "r41": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.6(a))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r410": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "926",
   "URI": "http://asc.fasb.org/extlink&oid=120154696&loc=d3e54445-107959"
  },
  "r411": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "340",
   "Topic": "928",
   "URI": "http://asc.fasb.org/extlink&oid=6473545&loc=d3e61844-108004"
  },
  "r412": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "20",
   "Topic": "940",
   "URI": "http://asc.fasb.org/extlink&oid=123384075&loc=d3e41242-110953"
  },
  "r413": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(1)(a))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120398452&loc=d3e534808-122878"
  },
  "r414": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(10)(1))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120398452&loc=d3e534808-122878"
  },
  "r415": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(11))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120398452&loc=d3e534808-122878"
  },
  "r416": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(23))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120398452&loc=d3e534808-122878"
  },
  "r417": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.10)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120398452&loc=d3e534808-122878"
  },
  "r418": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.17)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120398452&loc=d3e534808-122878"
  },
  "r419": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(15))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120399700&loc=SL114874048-224260"
  },
  "r42": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.8)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r420": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(22))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120399700&loc=SL114874048-224260"
  },
  "r421": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(24))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120399700&loc=SL114874048-224260"
  },
  "r422": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(27))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120399700&loc=SL114874048-224260"
  },
  "r423": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.9)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120399700&loc=SL114874048-224260"
  },
  "r424": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "235",
   "Subparagraph": "(SX 210.9-05(b)(2))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120399901&loc=d3e537907-122884"
  },
  "r425": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "360",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=124429447&loc=SL124453093-239630"
  },
  "r426": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(12))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r427": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(2))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r428": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(23)(a)(4))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r429": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(25))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r43": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.9)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r430": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(8))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r431": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03.(a),19)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r432": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03.5(c))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r433": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(18))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263"
  },
  "r434": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(20))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263"
  },
  "r435": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(23))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263"
  },
  "r436": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(8))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263"
  },
  "r437": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(9))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263"
  },
  "r438": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4H",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "40",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=116884468&loc=SL65671331-158438"
  },
  "r439": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "40",
   "Subparagraph": "(d)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124506351&loc=SL117782755-158439"
  },
  "r44": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669646-108580"
  },
  "r440": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13H",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Subparagraph": "(b)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124504033&loc=SL117783719-158441"
  },
  "r441": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "29F",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124504033&loc=SL117819544-158441"
  },
  "r442": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(e)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641"
  },
  "r443": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(f)(1)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641"
  },
  "r444": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(f)(2)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641"
  },
  "r445": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(g)(2)(i)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641"
  },
  "r446": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(h)(2)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641"
  },
  "r447": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.6-03(h)(2))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=123726495&loc=d3e600178-122990"
  },
  "r448": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "310",
   "Subparagraph": "(SX 210.12-29(Footnote 4))",
   "Topic": "948",
   "URI": "http://asc.fasb.org/extlink&oid=120402547&loc=d3e617274-123014"
  },
  "r449": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "210",
   "Topic": "954",
   "URI": "http://asc.fasb.org/extlink&oid=120413173&loc=SL116631458-115580"
  },
  "r45": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669646-108580"
  },
  "r450": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "440",
   "Subparagraph": "(a)",
   "Topic": "954",
   "URI": "http://asc.fasb.org/extlink&oid=6491277&loc=d3e6429-115629"
  },
  "r451": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column B))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r452": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column C))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r453": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column D))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r454": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column E))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r455": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column F))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r456": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column G))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r457": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column H))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r458": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column I))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r459": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Footnote 2))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r46": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=d3e637-108580"
  },
  "r460": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "310",
   "Subparagraph": "(c)",
   "Topic": "976",
   "URI": "http://asc.fasb.org/extlink&oid=6497875&loc=d3e22274-108663"
  },
  "r461": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "310",
   "Subparagraph": "(b)",
   "Topic": "978",
   "URI": "http://asc.fasb.org/extlink&oid=123360121&loc=d3e27327-108691"
  },
  "r462": {
   "Name": "Exchange Act",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "b"
  },
  "r463": {
   "Name": "Exchange Act",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "d1-1"
  },
  "r464": {
   "Name": "Form 10-Q",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "308",
   "Subsection": "a"
  },
  "r465": {
   "Name": "Forms 10-K, 10-Q, 20-F",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "13",
   "Subsection": "a-1"
  },
  "r466": {
   "Name": "Regulation 12B",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "b-2"
  },
  "r467": {
   "Name": "Regulation S-K (SK)",
   "Number": "229",
   "Paragraph": "(a)",
   "Publisher": "SEC",
   "Section": "1402"
  },
  "r468": {
   "Name": "Regulation S-T",
   "Number": "232",
   "Publisher": "SEC",
   "Section": "405"
  },
  "r469": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(a)(3)(iii)(03)",
   "Topic": "848"
  },
  "r47": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=d3e640-108580"
  },
  "r48": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=d3e681-108580"
  },
  "r49": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669686-108580"
  },
  "r5": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6676-107765"
  },
  "r50": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669619-108580"
  },
  "r51": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669619-108580"
  },
  "r52": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669625-108580"
  },
  "r53": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669625-108580"
  },
  "r54": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124431353&loc=SL124442407-227067"
  },
  "r55": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124431353&loc=SL124442411-227067"
  },
  "r56": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124431353&loc=SL124452729-227067"
  },
  "r57": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(210.5-03(11))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r58": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(1))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r59": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(10))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r6": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6676-107765"
  },
  "r60": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(20))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r61": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(22))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r62": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(25))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r63": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(5))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r64": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.1,2)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r65": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.2(a),(d))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r66": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.2)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r67": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.3)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r68": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.4)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r69": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.7(b))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r7": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6676-107765"
  },
  "r70": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.9)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r71": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3179-108585"
  },
  "r72": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3213-108585"
  },
  "r73": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3255-108585"
  },
  "r74": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3255-108585"
  },
  "r75": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3291-108585"
  },
  "r76": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3291-108585"
  },
  "r77": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3291-108585"
  },
  "r78": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3367-108585"
  },
  "r79": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3367-108585"
  },
  "r8": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6801-107765"
  },
  "r80": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3000-108585"
  },
  "r81": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "24",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3521-108585"
  },
  "r82": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3536-108585"
  },
  "r83": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3536-108585"
  },
  "r84": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3602-108585"
  },
  "r85": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3602-108585"
  },
  "r86": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3602-108585"
  },
  "r87": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3044-108585"
  },
  "r88": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123431023&loc=d3e4273-108586"
  },
  "r89": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123431023&loc=d3e4297-108586"
  },
  "r9": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6812-107765"
  },
  "r90": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123431023&loc=d3e4304-108586"
  },
  "r91": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123431023&loc=d3e4313-108586"
  },
  "r92": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123431023&loc=d3e4332-108586"
  },
  "r93": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123431023&loc=SL98516268-108586"
  },
  "r94": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(c))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690"
  },
  "r95": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(d))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690"
  },
  "r96": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(f))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690"
  },
  "r97": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(g)(1)(ii))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690"
  },
  "r98": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(h)(2))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690"
  },
  "r99": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(h))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690"
  }
 },
 "version": "2.1"
}
