/**
 * @file
 * Navigation in header.
 */

.site-header__fixable {
  width: 100%;
}

.site-header__inner__container {
  min-height: 4rem;
}

[dir="ltr"] .header-nav {
  left: 100%;
  padding-left: 1.125rem;
  padding-right: 1.125rem;
}

[dir="rtl"] .header-nav {
  right: 100%;
  padding-right: 1.125rem;
  padding-left: 1.125rem;
}

html.js .header-nav {
  position: fixed;
  z-index: 100; /* appear above overlay */
  top: 0;
  visibility: hidden;
  overflow: auto;
  /* Ensure that header nav not use additional space and force
     system branding block text to unnecessarily wrap. */
  flex-basis: 0;
  flex-grow: 1; /* Necessary for IE11. */
  box-sizing: border-box;
  width: 100%;
  max-width: 31.25rem;
  height: 100%;
  padding: 0;
  border-top: solid #fff 54px; /** Create room for the "close" button. */
  box-shadow: 0 0 72px rgba(0, 0, 0, 0.1);
}

html.js .header-nav:not(.is-active) {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: center;
  align-items: center;
  background-color: var(--laurier-purple);
}

html.js .header-nav.is-active {
  visibility: visible;
  color: var(--laurier-purple);
  background-color: #fff;
  transform: translateX(-100%); /* LTR */
  border-top-width: 150px;
  outline: solid 5px var(--laurier-gold);
  padding: 10px 30px;
}

html.js [dir="rtl"] .header-nav.is-active {
  transform: translateX(100%);
}

@media (max-width: 480px) {
  .header-nav.is-active {
    border-top-width: 260px;
  }
}

@supports (flex-basis: max-content) {
  .header-nav {
    flex-basis: max-content;
  }
}

@media (min-width: 43.75rem) {
  .header-nav {
    padding-bottom: 3.375rem;
  }
}

@media (min-width: 62.5rem) {
  .header-nav {
    -ms-grid-column: 5;
    -ms-grid-column-span: 9;
    grid-column: 5 / 14;
  }
}

/*
 * Only apply transition styles when JS is loaded. This
 * works around https://bugs.chromium.org/p/chromium/issues/detail?id=332189
 */

html.js .header-nav {
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

/* Toolbar is horizontal fixed, and tray is open. */

/** This cutoff needs to match when the mobile menu hides itself, in nav-button-mobile.css, so that the mobile menu appears when the full menu disappears **/
@media (min-width: 85rem) {
  [dir="ltr"] body .header-nav {
    padding-left: 0;
  }

  [dir="rtl"] body .header-nav {
    padding-right: 0;
  }

  [dir="ltr"] body .header-nav {
    padding-right: 0;
  }

  [dir="rtl"] body .header-nav {
    padding-left: 0;
  }

  html.js body .header-nav {
    position: static;
    display: flex;
    visibility: visible;
    overflow: visible;
    align-items: center;
    justify-content: flex-end;
    max-width: none;
    border-top-width: 260px;
    min-height: 4rem;
    padding-top: 0;
    padding-bottom: 0;
    transition: transform 0.2s;
    transform: none;
    border-top: 0;
    box-shadow: none;
  }
}

.header-nav .menu--main,
.primary-nav__menu.primary-nav__menu--level-1:last-child {
  padding-left: 0;
  padding-right: 0;
}

.header-nav.is-active .menu--main {
  padding-top: 2rem;
}
