
/* Site Navigation inside header wrapper */
.site-navigation {
  position: static;
  display: flex;
  z-index: -1;
}

/* the button that triggers the menu contanier */
.menu-toggle {
  position: static;
  display: flex;
  align-items: center;
  background-color: transparent;
  padding-block: 0.5em;
  padding-inline-start: 0.75em;
  padding-inline-end: 3.25em;
  border: none;
  font-size: var(--fluid-text-18-20);
  color: var(--brand-white);
  height: calc(var(--header-height) - 2 * var(--header-block-padding));
  z-index: 5;
}

.menu-toggle > * {
  z-index: 999999;
}

.menu-toggle[aria-expanded="true"] {
  background-color: var(--brand-black-100);
}

.menu-toggle .menu-icon {
  position: absolute;
  inset-block-start: 50%;
  transform: translateY(-50%);
  inset-block-end: 0;
  inset-inline-end: .25rem;
  display: grid;
  place-items: center;
  grid-template-areas: "icon";
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--brand-rodeo-dust);
}

.menu-toggle .open-icon,
.menu-toggle .closed-icon {
  grid-area: icon;
  grid-row: 1;
  transition: opacity .3s ease-in-out;
}

/* Cross Icon */
.menu-toggle .open-icon {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .open-icon {
  opacity: 1;
}

/* Avatar icon */
.menu-toggle .closed-icon {
  opacity: 1;
}

.menu-toggle[aria-expanded="true"] .closed-icon {
  opacity: 0;
}






/* Menu flyout container */
.menu-container {
  --menu-padding: clamp(var(--imutable-outer-margin), 0.857rem + 2.14vw, 3rem);

  position: absolute;
  display: flex;
  flex-direction: column;
  inset-block-start: 100%;
  inset-block-end: 0;
  background-color: var(--brand-black-100);
  height: 100vh;
  margin-block-start: var(--header-block-padding);
  transition: width 0.4s ease-in-out, opacity 0.4s ease-in-out;
  max-width: 35rem;
  z-index: 3;
  padding-inline-start: var(--fluid-space-32-64);
  padding-block-start: var(--fluid-space-32-64);
  padding-block-end: var(--header-height);
  box-shadow: 0px 103px 62px rgba(0, 0, 0, 0.05), 0px 46px 46px rgba(0, 0, 0, 0.09), 0px 11px 25px rgba(0, 0, 0, 0.1);
}

.menu-container.hidden {
  visibility: hidden;
  inset-inline-end: -100vw;
  opacity: 0;
  width: 0;
}

.menu-container.active {
  visibility: visible;
  opacity: 1;
  inset-inline-end: 0;
  width: 100%;
}


.relative-wrapper {
  overflow-y: auto;
  overflow-x: visible;
  padding-block-end: var(--fluid-space-24-32);
}

.relative-wrapper::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-block-end: 0;
  inset-inline-start: 0;
  width: 100rem;
  height: 100%;
  background-color: var(--brand-black-100);
  z-index: -1;
}

/* Attached behind the menu contaner to fill out the space to the left */














/* Inside the menu */
.main-menu {
  display: flex;
  flex-direction: column;
  gap: var(--fluid-space-24-32);
  padding-inline-start: 0;
  list-style: none;
  /* Transition opacity .2 ease-in with a .2 delay and no delay ease-out */
  transition: opacity 0.2s ease-in 0.2s, opacity 0.1s ease-out;
}


.menu-container.hidden .main-menu {
  opacity: 0;
}

.menu-container.active {
  opacity: 1;
}


/* Some resets */
.main-menu .menu-item {
  display: block;
  width: 100%;
}

.main-menu button {
  width: 100%;
}

.main-menu a {
  display: flex;
  font-family: var(--header-font);
  font-weight: 400;
  font-style: normal;
  text-decoration: none;
  color: var(--brand-white);
  font-size: 1.5rem;
  line-height: 1;
}





/* Toggle the Sub menu */
.submenu-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  background-color: transparent;
  color: var(--brand-white);
  padding-inline: 0;
  text-decoration: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.submenu-toggle svg {
  transition: transform 0.2s ease-in-out;
  transform: rotate(180deg);
}

.submenu-toggle[aria-expanded="true"] svg {
  transform: rotate(0deg);
}





/* Sub menus*/
.submenu {
  padding-inline-start: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: height 0.2s ease-in-out;
  /* run animation resetHeightSetByJavascript  with a .2 delay */
  animation: resetHeightSetByJavascript 0.2s ease-in-out 0.2s;
  height: 0;
  overflow-x: hidden;
  overflow-y: hidden; /* these should only overflow momentarily when showing/hiding the submenus, and we'd like to avoid a scrollbar flashing during the animation */
}

.submenu.hidden {
  visibility: hidden;
  opacity: 0;
  height: 0;
}

.submenu.active {
  visibility: visible;
  opacity: 1;
  margin-block-start: 1rem;
}
.submenu-item {
  list-style-type: none;
}
.submenu-item a {
  font-size: 1.25rem;
  transition: opacity 0.6s ease-in-out;
}

.submenu.hidden a {
  opacity: 0;
}

.submenu.active a {
  opacity: 1;
}




/* Misc */
.logout-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block-start: 2rem;
  text-decoration: none;
  font-family: var(--header-font);
  font-weight: 400;
  font-style: normal;
  color: var(--brand-black-100) !important;
}

/* Keyframe animation */
@keyframes resetHeightSetByJavascript {
  0% {
    height: auto;
  }
  100% {
    height: auto;
  }
}
