/* Responsive styles for the header */
/* Open Search */
.header-right.search-expanded .menu-wrapper,
.header-right.search-expanded .button-search-container > a {
  display: none;
}

.header-right.search-expanded .button-search-container {
  justify-content: end;
  margin-left: 2rem;
  width: 100%;
}

.header-right.search-expanded .nav-search-form-container {
  width: 100%;
}

.mobile {
  display: none;
}

@media only screen and (max-width: 1024px) {
  .desktop {
    display: none !important;
  }

  .mobile {
    display: revert;
  }

  .menu-toggle {
    display: block;
    /* order: 2; */
  }

  .header-right .button-search-container > a {
    display: none;
  }
  .logo-container img {
    width: 95px;
  }

  .header-container {
    height: 3.5rem;
    width: 90%;
  }

  .header-right {
    justify-content: end;
    align-items: center;
  }

  .header-right .menu-wrapper {
    flex-direction: column;
    order: 1;
    margin-left: 1rem;
  }

  .primary-nav {
    margin-left: 0;
    /* order: 1; */
  }

  .primary-nav.active {
    display: block;
  }

  .menu > li:hover > .sub-menu {
    display: none;
  }

  .menu > li:hover > .sub-menu.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    z-index: 21;
    padding: 2rem;
  }

  #primary-menu.menu > li:hover > .sub-menu.active li {
    height: auto;
    margin-bottom: 1.5rem;
  }

  .sub-menu li a,
  .sub-menu li a:visited {
    font-weight: 600;
  }
  li.top-level-added a,
  li.top-level-added a:visited {
    font-weight: 600;
    color: var(--promo-text-black);
    border-bottom: 4px solid var(--primary-color);
  }

  #primary-menu {
    flex-direction: column;
    gap: 1.5rem;
  }

  .utility-nav {
    display: flex;
  }

  .utility-nav,
  .menu-utility-nav-container {
    height: auto;
  }

  .utility-nav-container {
    flex-direction: column;
    align-items: start;
    height: auto;
    gap: 0.5rem;
  }

  .utility-nav-left {
    order: 2;
  }

  #utility-menu {
    margin-top: 0.5rem;
    flex-direction: column;
    gap: 1.5rem;
    height: auto;
  }

  #utility-menu li {
    height: auto;
  }

  .utility-nav-right button {
    margin: 1rem 0;
  }

  .mobile-menu-container {
    display: none;
    padding: 2rem;
  }
  .mobile-menu-container .primary-nav {
  }

  .mobile-menu-container.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: white;
    z-index: 20;
  }

  .mobile-menu-container .close {
    width: 1rem;
    margin: 0.5rem;
  }
  .mobile-menu-container .close-wrapper {
    display: flex;
    justify-content: end;
    margin-bottom: 0.5rem;
  }

  .mobile-menu-container button {
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
  }

  #primary-menu li.menu-item-has-children > a:after {
    display: inline-block;
    transform: rotate(-90deg);
  }

  .sign-out-container {
    display: flex;
    gap: 0.25rem;
  }

  .sign-out {
    font-family: var(--primary-font);
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.25rem;
  }

  .back {
    font-weight: bold;
    font-size: 0.875rem;
  }
  .sub-menu.active .back {
    margin-bottom: 1.5rem;
  }
}

@media only screen and (max-width: 768px) {
  /* Search */
  .header-left.search-expanded {
    display: none;
  }
  .header-right.search-expanded .button-search-container {
    margin-left: 0;
  }
  .header-right.search-expanded #searchform .search-submit {
    display: none;
  }
  .header-right.search-expanded #searchform .search-field {
    border-radius: 18.75rem;
  }
}
