/* Site-local adapter. No rules apply until JS validates and owns the matching DOM. */
:root { --ap-site-navigation-ready: 1; }
/* Only a detected, genuinely wrapped WordPress toolbar receives these overrides.
   Its corrected height is also read by Gecko's existing body-gap calculation. */
#wpadminbar.ap-site-toolbar-wrapped { height: var(--ap-site-toolbar-height) !important; }
.admin-bar .gc-header__wrapper.ap-site-toolbar-header { top: var(--ap-site-toolbar-offset) !important; }
.admin-bar .gc-header__sidebar.ap-site-toolbar-sidebar { top: var(--ap-site-toolbar-offset) !important; }
.admin-bar .gc-header__sidebar-close.ap-site-toolbar-close {
  top: calc(var(--ap-site-toolbar-offset) + var(--PADD--MD, 20px)) !important;
}
.gc-header.ap-site-header .ap-site-vendor-nav { display: none !important; }
.gc-header.ap-site-header .ap-site-primary {
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
}
.gc-header.ap-site-header .ap-site-primary > .ap-site-primary-list {
  display: flex !important;
  flex: 0 0 auto;
  flex-wrap: nowrap !important;
  width: max-content;
  min-width: 0;
}
.gc-header.ap-site-header .ap-site-primary-list > li {
  display: flex !important;
  flex: 0 0 auto;
  white-space: nowrap;
}
.gc-header.ap-site-header .ap-site-primary li:focus-within > .sub-menu { display: block; }
.gc-header.ap-site-header.ap-site-header--compact .ap-site-primary {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}
.gc-header.ap-site-header .ap-site-main-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 108px;
  box-sizing: border-box;
  padding: 9px 13px !important;
  border: 1px solid currentColor !important;
  border-radius: 7px !important;
  box-shadow: none !important;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.gc-header.ap-site-header .ap-site-main-toggle {
  margin-inline-start: auto;
  color: var(--menu-link-color, #fff);
  background: transparent;
}
.gc-header.ap-site-header:not(.ap-site-header--compact) .ap-site-main-toggle { display: none !important; }
.ap-site-menu-icon { font-size: 20px; line-height: 1; }
.gc-header.ap-site-header .ap-site-main-toggle:focus-visible {
  outline: 3px solid #efbd46;
  outline-offset: 3px;
}
/* Leave accounts/notifications in their original header widgets. */
@media (max-width: 480px) {
  .gc-header.ap-site-header .gc-header__inner { padding-inline: 10px; gap: 4px; }
  .gc-header.ap-site-header .gc-header__logo { min-width: 0; margin-inline-end: 6px; }
  .gc-header.ap-site-header .gc-logo__image { max-width: 100%; }
  .gc-header.ap-site-header .gc-logo__image img { max-width: 100%; object-fit: contain; }
  .gc-header.ap-site-header .ap-site-main-toggle { min-width: 100px; padding-inline: 10px !important; }
}

/* Pages only. The original native menu remains available if enhancement cannot start. */
.ps-focus--page .ap-site-tabs-vendor {
  position: absolute !important;
  width: 100%;
  left: 0;
  visibility: hidden !important;
  pointer-events: none !important;
  overflow: hidden !important;
}
.ps-focus--page .ap-site-tabs {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  /* PeepSo's native mobile menu is fixed at 63px. Our wrapped menu must
     reserve all its rows in the footer flow, not paint over the next section. */
  height: auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 5px;
  overflow: visible;
  background: #fff;
  border-top: 1px solid #e0e5ed;
}
.ps-focus--page .ap-site-tabs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
}
.ps-focus--page .ap-site-tabs .ap-site-tab-link {
  display: flex !important;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
  border-radius: 5px;
}
.ps-focus--page .ap-site-tabs .ap-site-tab-link .ps-focus__menu-item-inner {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}
.ps-focus--page .ap-site-tabs .ps-focus__menu-item-inner > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
