@import "govuk_publishing_components/individual_component_support";
@import "govuk/components/header/header";

.gem-c-layout-header.gem-c-layout-header--no-bottom-border,
.gem-c-layout-header.gem-c-layout-header--no-bottom-border .govuk-header__container {
  border-bottom: 0;
}

.gem-c-layout-header--search-left {
  .gem-c-header__menu-button.govuk-header__menu-button {
    margin-top: - govuk-spacing(7);
    left: govuk-spacing(3);
  }

  .gem-c-header__nav-wrapper {
    position: relative;
    padding-left: 0;
  }

  .govuk-header__navigation--end {
    padding-top: 0;
    text-align: left;
  }

  .gem-c-header__content {
    position: relative;
    width: 100%;
    padding-bottom: govuk-spacing(2);
  }

  @include govuk-media-query($from: desktop) {
    .govuk-header__navigation-item {
      padding: 0 0 govuk-spacing(1) 0;
    }

    .gem-c-header__logo {
      margin-top: 0;
    }

    .gem-c-header__content.govuk-header__content {
      @include govuk-grid-column(two-thirds);
      padding-left: govuk-spacing(6);
      padding-right: govuk-spacing(1);
    }
  }
}

.gem-c-layout-header__logo {
  @include govuk-media-query($until: "tablet") {
    margin-bottom: govuk-spacing(3);
  }
}

.gem-c-header__environment {
  padding-top: 2px;
  padding-bottom: 3px;
}

.gem-c-header__logo {
  display: flex;
  flex-wrap: wrap;
  row-gap: govuk-spacing(2);
}

.gem-c-header__content.govuk-header__content {
  width: auto;

  @include govuk-media-query($from: desktop) {
    float: right;
  }
}

.gem-c-header__product-name {
  display: none;

  @include govuk-media-query($from: tablet) {
    display: inline-block;
  }
}

.govuk-header__navigation-item--collapsed-menu-only {
  @include govuk-media-query($from: desktop) {
    display: none;
  }
}

.govuk-header__menu-button.gem-c-header__menu-button {
  top: govuk-spacing(4);
  right: 0;
}

.gem-c-header__nav {
  clear: both;
}

@include govuk-media-query($media-type: print) {
  .gem-c-layout-header .govuk-header__container {
    border-color: $govuk-print-text-colour;

    .govuk-grid-column-two-thirds {
      width: auto;
      float: none;
    }

    .govuk-header__logo {
      margin: 0;
      padding: 0 2mm 2mm 0;
    }

    .gem-c-header__product-name {
      color: $govuk-print-text-colour;
      background: none;
    }
  }
}
