/* GamePC: stable desktop mega menus without page dimming. */
@media (min-width: 992px) {
  /*
   * Apollo shows #cboxOverlay (z-index: 1002) while a submenu is open and
   * expects the header above it. The custom sticky-header rule otherwise
   * keeps #header at z-index: 9 !important, so the overlay intercepts the
   * pointer and starts an open/close loop.
   */
  html body:not(.ordering-process).submenu-visible:not(.menu-helper-visible) #header#header {
    z-index: 9999 !important;
  }

  /*
   * Keep Apollo's outside-menu hit area, but remove its 75% black paint while
   * any desktop top-level navigation submenu is open. Colorbox dialogs retain
   * their original backdrop because they do not keep a navigation item open.
   */
  html body.submenu-visible:has(
    #header :is(#navigation, .menu-helper) .menu-level-1 > li.ext:is(:hover, .exp, .gpc-mega-hold, :focus-within) >
      :is(.menu-level-2, .gpc-support-menu)
  ) #cboxOverlay {
    background-color: transparent !important;
  }

  /* Keep the panel hit area stationary and non-interactive while closed. */
  #header#header :is(#navigation, .menu-helper) .menu-item-711 > .menu-level-2 {
    transform: translate(-50%) !important;
    pointer-events: none !important;
  }

  /* Repeat every native open state after the bundled CSS for a deterministic cascade. */
  #header#header :is(#navigation, .menu-helper) .menu-item-711:is(:hover, .exp, .gpc-mega-hold) > .menu-level-2,
  #header#header :is(#navigation, .menu-helper) .menu-item-711 > .menu-level-2:focus-within {
    visibility: visible !important;
    transform: translate(-50%) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Full-width rail bridges the boundary below the navigation. */
  #header#header :is(#navigation, .menu-helper) .menu-level-1 > .menu-item-711::after {
    position: fixed !important;
    z-index: 1099 !important;
    top: calc(var(--gpc-retail-menu-top, 103px) - 2px) !important;
    right: 0 !important;
    left: 0 !important;
    display: none !important;
    width: 100vw !important;
    height: 14px !important;
    content: "";
    pointer-events: auto !important;
  }

  #header#header :is(#navigation, .menu-helper) .menu-level-1 > .menu-item-711:is(:hover, .exp, .gpc-mega-hold)::after {
    display: block !important;
  }
}
