/* Match original bestbirdfeederproduct / XTransfer AIPageNav look */

.site-nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  width: 100%;
  background: #F5F8FB;
  color: #222;
  padding-top: env(safe-area-inset-top, 0px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  --mainTitleColor: #222222;
  --sidebarBgColor: #558DAC;
  --sidebarTextColor: #FFFFFF;
  --sidebarHighlightBgColor: #F7F8FA;
  --sidebarActiveTextColor: #558DAC;
}

/* Reserve space so content is not hidden under fixed nav */
body {
  padding-top: calc(76px + env(safe-area-inset-top, 0px));
}

.site-nav {
  width: min(1256px, 100%);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.site-nav-logo {
  display: block;
  width: 246px;
  height: 52px;
  max-width: none;
  max-height: none;
  margin-right: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.site-nav-logo img {
  width: 246px;
  height: 52px;
  display: block;
  object-fit: contain;
  max-width: none;
  max-height: none;
  filter: none;
}

.site-nav-menu {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0;
  margin-left: auto;
}

.site-nav-menu a {
  cursor: pointer;
  display: inline-block;
  color: var(--mainTitleColor);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-style: normal;
  font-weight: 600;
  line-height: 26px;
  margin-right: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: none;
  white-space: nowrap;
  text-decoration: none;
}

.site-nav-menu a:last-child {
  margin-right: 0;
}

.site-nav-menu a:hover,
.site-nav-menu a.is-active {
  font-weight: 600;
  color: #74e1ff;
}

.site-nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.site-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #222;
  position: relative;
}

.site-nav-toggle span::before,
.site-nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: #222;
}

.site-nav-toggle span::before { top: -7px; }
.site-nav-toggle span::after { top: 7px; }

/* Mobile drawer - matches original sidebar theme */
.site-nav-drawer-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 300;
}

.site-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(78vw, 300px);
  max-width: 100%;
  background: #fff;
  z-index: 310;
  transform: translateX(-105%);
  transition: transform 0.25s ease;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}

.site-nav-drawer.is-open {
  transform: translateX(0);
}

.site-nav-drawer-mask.is-open {
  display: block;
}

.site-nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}

.site-nav-drawer-head img {
  width: 180px;
  height: 38px;
  object-fit: contain;
  max-width: none;
  max-height: none;
  filter: none;
}

.site-nav-drawer-close {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #222;
}

.site-nav-drawer-menu {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.site-nav-drawer-menu a {
  display: block;
  padding: 14px 20px;
  color: #222;
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.site-nav-drawer-menu a:hover,
.site-nav-drawer-menu a.is-active {
  background: var(--sidebarHighlightBgColor);
  color: #74e1ff;
  border-left-color: #74e1ff;
  font-weight: 600;
}

/* Mobile breakpoint ~ original H5 switch */
@media (max-width: 768px) {
  body {
    padding-top: calc(58px + env(safe-area-inset-top, 0px));
  }

  .site-nav {
    min-height: 58px;
    padding: 0 16px;
    justify-content: space-between;
  }

  .site-nav-logo {
    width: 160px;
    height: 34px;
    max-width: none;
    max-height: none;
    margin-right: 0;
  }

  .site-nav-logo img {
    width: 160px;
    height: 34px;
  }

  .site-nav-menu {
    display: none;
  }

  .site-nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 480px) {
  .site-nav-logo {
    width: 140px;
    height: 30px;
  }
  .site-nav-logo img {
    width: 140px;
    height: 30px;
  }
}


@media (max-width: 980px) and (min-width: 769px) {
  .site-nav-logo {
    width: 200px;
    height: 42px;
    margin-right: 0;
  }
  .site-nav-logo img {
    width: 200px;
    height: 42px;
  }
  .site-nav-menu a {
    font-size: 14px;
    margin-right: 22px;
  }
}
