/*
 * Upcuan v1.0.0.6
 * True viewport-centered desktop navigation.
 *
 * The primary menu and Search/User utilities are now wrapped by
 * .upc-desktop-nav-group in header.tpl.  Positioning the wrapper at 50% of
 * the header makes the complete menu group geometrically centered on every
 * public page, independent of the logo or other flex siblings.
 */

@media (min-width: 992px) {
  #header.upc-header .upc-header-inner {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #header.upc-header .upc-desktop-nav-group {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    width: max-content !important;
    max-width: calc(100vw - 56px) !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    background: transparent !important;
    z-index: 5 !important;
  }

  #header.upc-header .upc-desktop-nav-group > .upc-navbar,
  #header.upc-header .upc-desktop-nav-group > .upc-utility-nav {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }

  #header.upc-header .upc-desktop-nav-group > .upc-navbar,
  #header.upc-header .pkp_navigation_primary {
    justify-content: center !important;
  }

  #header.upc-header .upc-desktop-nav-group > .upc-utility-nav {
    justify-content: flex-start !important;
  }

  /* The optional journal logo is independently anchored and therefore can
     never push the centered navigation group left or right. */
  #header.upc-header .logo:not(:empty) {
    position: absolute !important;
    left: 28px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    z-index: 6 !important;
  }
}
