/* Max Mega Menu: Above Header bar menu (location above-topnav). Loaded after the plugin's own stylesheet on the front
   end and in the editor (inc/megamenu.php). The plugin settings for this menu (link colour, 15px side padding, 2px
   spacing after each item) are in inc/megamenu.php. */

/* Dividers: a 1px line on the right of every item but the last, in the link colour (theme.json
   settings.custom.menu.aboveHeaderLinkColor, which the menu setting reads too). It is 2px taller than the text (Inter's capitals 0.73em + descenders
   0.21em, in em so it follows the menu's font size; re-measure if the Navigation font changes) and centred in the
   bar's 32px, drawn as a pseudo-element so the links keep that full height. */
#mega-menu-wrap-above-topnav
  #mega-menu-above-topnav
  > li.mega-menu-item:not(:last-child)::after {
  content: "" !important;
  display: block !important; /* the plugin hides li::after */
  position: absolute !important;
  top: 50% !important;
  right: 0 !important;
  height: calc(0.94em + 2px) !important;
  border-right: 1px solid var(--wp--custom--menu--above-header-link-color) !important;
  transform: translateY(-50%) !important;
  pointer-events: none !important;
}

#mega-menu-wrap-above-topnav
  #mega-menu-above-topnav
  > li.mega-menu-item:last-child {
  margin-right: 0 !important;
}

/* The first and last links have no outer padding, so the bar's text lines up with the edges. */
#mega-menu-wrap-above-topnav
  #mega-menu-above-topnav
  > li.mega-menu-item:first-child
  > a.mega-menu-link {
  padding-left: 0 !important;
}

#mega-menu-wrap-above-topnav
  #mega-menu-above-topnav
  > li.mega-menu-item:last-child
  > a.mega-menu-link {
  padding-right: 0 !important;
}
