/**
 * Top information bar — [wp_body_open], [aamenu_infobar] or aamenu_infobar().
 *
 * Like the announcement bar it is not fixed or sticky: it renders in normal document flow at the top of the page and
 * scrolls away with it, so it never has to negotiate a z-index or an overlap with a theme's own (sticky) header.
 * Every selector carries the plugin prefix; the doubled-class guard below keeps a theme's or builder's link colour
 * from changing the colour of the bar's own links (the same policy as the call button, docs/THEME-COMPATIBILITY.md).
 *
 * Colours and size: --mm-infobar-bg, --mm-infobar-text and --mm-infobar-size are printed on the bar only when they
 * are set in Top Info Bar; otherwise the bar follows the plugin's own tokens. Which items show at the desktop and at
 * the mobile width is printed with the configured breakpoint (AAMENU_Info_Bar::breakpoint_css()).
 */

.aamenu-info-bar {
  box-sizing: border-box;
  width: 100%;
  padding: 8px 16px;
  background: var(--mm-infobar-bg, var(--mm-accent-soft));
  color: var(--mm-infobar-text, var(--mm-text-primary));
  font-family: var(--mm-font);
  font-size: var(--mm-infobar-size, 13px);
  line-height: 1.4;
}

.aamenu-info-bar__inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: var(--mm-panel-max-w, 1200px);
  margin: 0 auto;
}

.aamenu-info-bar__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 2px 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aamenu-info-bar--align-center .aamenu-info-bar__line {
  justify-content: center;
}

.aamenu-info-bar--align-right .aamenu-info-bar__line {
  justify-content: flex-end;
}

.aamenu-info-bar__item {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The separator stands before every item but the first one shown on its line (the first one is left out through the
   breakpoint rules printed with the bar). */
.aamenu-info-bar__item::before {
  content: none;
}

.aamenu-info-bar--sep-line .aamenu-info-bar__item::before {
  content: "";
  align-self: stretch;
  width: 0;
  margin: 0.2em 0.9em;
  border-left: 1px solid currentcolor;
  opacity: 0.35;
}

.aamenu-info-bar--sep-dot .aamenu-info-bar__item::before {
  content: "\00b7";
  margin: 0 0.7em;
  opacity: 0.6;
}

/* Only space between items: a gap counts the items that are shown, so an item hidden at this width leaves no stray margin. */
.aamenu-info-bar--sep-none .aamenu-info-bar__line {
  column-gap: 1.4em;
}

/* WCAG 2.2 target size (2.5.8): a standalone link is at least 24 px tall. */
.aamenu-info-bar__link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: inherit;
  text-decoration: none;
}

.aamenu-info-bar__link:hover,
.aamenu-info-bar__link:focus-visible {
  text-decoration: underline;
}

.aamenu-info-bar__link:focus-visible {
  outline: 2px solid currentcolor;
  outline-offset: 2px;
}

.aamenu-info-bar__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* aamenu:infobar-guard begin */

/* The links keep the bar's own text colour against a theme or builder link colour (see the call button guard in
   desktop-menu.css; doubled class, no important flag). */
.aamenu-info-bar__link.aamenu-info-bar__link,
.aamenu-info-bar__link.aamenu-info-bar__link:is(:hover, :focus-visible) {
  color: inherit;
}

/* aamenu:infobar-guard end */
