/* ======================================================
   HI WALLET NAV
   Third navigation family shared by wallet ecosystem pages.
====================================================== */

.wallet-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  overflow-x: auto;
  scrollbar-width: none;
}

.wallet-nav::-webkit-scrollbar {
  display: none;
}

.wallet-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: inherit;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.65px;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.78;
  background: transparent;
  transition:
    opacity 0.18s ease,
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.wallet-nav a + a {
  margin-left: 2px;
}

.wallet-nav a::after {
  display: none;
}

.wallet-nav a:hover,
.wallet-nav a.active,
.wallet-nav a[aria-current="page"] {
  opacity: 1;
  color: var(--brand-orange);
  background: rgba(255, 103, 31, 0.1);
  border-color: rgba(255, 103, 31, 0.22);
  transform: translateY(-1px);
}

body.theme-dark .wallet-nav a:hover,
body.theme-dark .wallet-nav a.active,
body.theme-dark .wallet-nav a[aria-current="page"] {
  background: rgba(255, 103, 31, 0.14);
  border-color: rgba(255, 255, 255, 0.11);
}

body.theme-light .wallet-nav a {
  opacity: 0.72;
}

body.theme-light .wallet-nav a:hover,
body.theme-light .wallet-nav a.active,
body.theme-light .wallet-nav a[aria-current="page"] {
  color: #b44508;
  background: rgba(255, 103, 31, 0.1);
  border-color: rgba(180, 69, 8, 0.18);
}

.site-header .wallet-nav,
.personal-header .wallet-nav {
  justify-self: center;
}

@media (min-width: 769px) {
  .site-header .wallet-nav {
    grid-column: 2;
  }

  .personal-header .wallet-nav {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (min-width: 769px) and (max-width: 1280px) {
  .personal-header .wallet-nav {
    grid-area: nav;
    justify-self: center;
  }
}

@media (max-width: 768px) {
  .site-header .wallet-nav,
  .personal-header .wallet-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    left: auto;
    z-index: 80;
    width: min(360px, calc(100vw - 24px));
    max-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    overflow: hidden;
    padding: 0 10px;
    border-radius: 18px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    transition:
      max-height 0.35s ease,
      padding 0.35s ease,
      opacity 0.25s ease,
      transform 0.25s ease;
  }

  body.theme-dark .wallet-nav {
    background: rgba(10, 12, 12, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  body.theme-light .wallet-nav {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(13, 33, 24, 0.1);
    box-shadow: 0 18px 38px rgba(20, 38, 30, 0.12);
  }

  .wallet-nav.open {
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding: 10px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .wallet-nav.open a {
    justify-content: flex-start;
    min-height: 46px;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.2;
    white-space: normal;
  }

  .wallet-nav.open a + a {
    margin-left: 0;
  }
}
