@mixin hmcts-width-container($width: $hmcts-page-width) {
  // Limit the width of the container to the page width
  max-width: $width;

  @include govuk-if-ie8 {
    width: $width;
  }

  // On mobile, add half width gutters
  margin: 0 $hmcts-gutter-half;

  // On tablet, add full width gutters
  @include mq($from: tablet) {
    margin: 0 $hmcts-gutter;
  }

  // As soon as the viewport is greater than the width of the page plus the
  // gutters, just centre the content instead of adding gutters.
  @include mq($and: "(min-width: #{($width + $hmcts-gutter * 2)})") {
    margin: 0 auto;
  }
}