/* Fundraising module local navigation. Loaded last on purpose. */

.module-nav {
  position: relative;
  left: auto;
  width: 100%;
  margin-left: 0;
  background: rgba(247, 250, 247, .96);
  border-top: 1px solid #edf0ed;
  border-bottom: 1px solid #dde5df;
}

.module-nav__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-height: 54px;
  margin: 0;
  /* Keep the same visible right edge as the live header.
     Using 100% instead of 100vw avoids the scrollbar-width offset. */
  padding: 0 40px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.module-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: #416c4f;
  font-family: "GothamPRO", "Gotham", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.module-nav__brand::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #dd0c15;
}

.module-nav__brand:hover {
  color: #416c4f;
  opacity: .8;
}

.module-nav__links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  margin-left: auto;
}

.module-nav__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: #31563e;
  font-family: "GothamPRO", "Gotham", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.module-nav__links a:hover {
  background: #e8f0ea;
  color: #31563e;
}

.module-nav__links a.module-nav__primary {
  color: #fff;
  background: #416c4f;
  font-weight: 700;
}

.module-nav__links a.module-nav__primary:hover {
  color: #fff;
  background: #31563e;
}

.module-nav__links a.module-nav__moderation {
  color: #a2182b;
  font-weight: 700;
}

.module-nav__links a.module-nav__moderation:hover {
  background: #f8ecee;
  color: #a2182b;
}

.module-nav__links a.module-nav__logout {
  margin-left: 4px;
  color: #a2182b;
  border: 1px solid rgba(162, 24, 43, .24);
  background: #fff;
  font-weight: 700;
}

.module-nav__links a.module-nav__logout:hover {
  color: #fff;
  border-color: #a2182b;
  background: #a2182b;
}

@media (max-width: 820px) {
  .module-nav__inner {
    min-height: 52px;
    padding-inline: 16px;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .module-nav__inner::-webkit-scrollbar {
    display: none;
  }

  .module-nav__links {
    flex: 0 0 auto;
  }
}

@media (max-width: 560px) {
  .module-nav__inner {
    min-height: 50px;
    padding-inline: 12px;
  }

  .module-nav__brand {
    font-size: 14px;
  }

  .module-nav__links a {
    min-height: 34px;
    padding-inline: 11px;
    font-size: 13px;
  }
}

/* V7.1 repair. These selectors intentionally outrank later V7 rules so the
   two header rows behave as one dynamic header and keep the same page rail. */
html body .foundation-header {
  position: relative !important;
  top: auto !important;
  left: auto !important;
}

html body .module-nav {
  position: relative !important;
  top: auto !important;
}

html body .foundation-header .foundation-header__inner,
html body .module-nav .module-nav__inner {
  width: min(1320px, calc(100% - 48px)) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

/* V7 adds a real span-dot in the template. Disable the older pseudo-dot. */
html body .module-nav .module-nav__brand::before {
  content: none !important;
  display: none !important;
}

html body .module-nav .module-nav__brand > span {
  flex: 0 0 7px !important;
}

/* Menu now follows the scrolling header instead of being pinned to viewport. */
html body .foundation-header .foundation-menu__panel {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  left: auto !important;
  max-height: min(620px, calc(100vh - 96px)) !important;
}

@media (max-width: 820px) {
  html body .foundation-header .foundation-header__inner,
  html body .module-nav .module-nav__inner {
    width: calc(100% - 28px) !important;
  }
}

@media (max-width: 560px) {
  html body .foundation-header .foundation-header__inner,
  html body .module-nav .module-nav__inner {
    width: calc(100% - 20px) !important;
  }
}
