:root {
  --sticky-height: 0;
  --menu-default-position: 0;
  --menu-current-position: 0;
}

body.main-menu--open {
  overflow: hidden;
}

/* Fix for admin panel */
.toolbar-fixed {
  .fixed-sticky .sticky-branding {
    top: 39px;
  }

  &.toolbar-tray-open .fixed-sticky .sticky-branding {
    top: 79px;
  }
}

@media only screen and (max-width: 1080px) {
  .main-menu--open .region--sticky {
    position: fixed;
    top: var(--menu-default-position);
    width: 100%;
    z-index: 20;
    overflow: auto;
    height: calc(100vh - var(--menu-default-position));
  }

  .main-menu--open .fixed-sticky .region--sticky {
    top: var(--menu-current-position);
    height: calc(100vh - var(--menu-current-position));
  }

  .fixed-sticky {
    .sticky-branding {
      position: fixed;
      top: 0;
      width: 100%;
      z-index: 20;
      background-color: var(--neutral-01);
    }

    .theme--dark-mode {
      .sticky-branding {
        background-color: var(--primary-01);
      }
    }

    .site-branding .sticky-shadow {
      padding-top: var(--sticky-height);
    }

    .logo-icon {
      display: none;
    }

    .sticky-branding .sticky-logo-icon {
      display: block;
    }
  }
}

@media only screen and (min-width: 1080px) {
  .toolbar-fixed {
    .fixed-sticky .region--sticky {
      top: 39px;
    }

    &.toolbar-tray-open .fixed-sticky .region--sticky {
      top: 79px;
    }
  }

  .fixed-sticky {
    .region--sticky {
      position: fixed;
      top: 0;
      width: 100%;
      z-index: 20;
      background-color: var(--neutral-01);
    }

    .header-sticky__wrapper .sticky-shadow {
      padding-top: var(--sticky-height);
    }

    .main-nav__list {
      max-width: calc(100% - 48px);
    }

    .main-menu .site-logo {
      display: block;
    }

    .menu-sticky--wrapper {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .main-nav__list--0 {
      width: auto;
      gap: 1.5rem;
    }

    .main-nav__item-lvl--0 {
      > a {
        padding-top: 1.5rem;
        padding-bottom: 1.25rem;
        font-size: var(--title-xs);
        line-height: var(--line-h-title-xs);
      }
    }

    .main-menu {
      .sticky-logo-icon {
        display: block;
      }
    }
  }
}

@media only screen and (min-width: 1440px) {
  .fixed-sticky {
    .main-nav__list--0 {
      gap: 2.5rem;
    }
  }
}
