/* ============================================================
   Shared "More" nav dropdown
   Wraps low-frequency nav items (e.g. Wallet) behind a single
   trigger. Works with either a .nav-btn (pill) or .icon-btn
   (circular) trigger — the wrapping menu styles itself off CSS
   custom properties already defined on most pages, with safe
   fallbacks for pages that don't define them.
   ============================================================ */
.af-more {
  position: relative;
  display: inline-flex;
}

.af-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
}

.af-more.open > .af-more-menu {
  display: flex;
}

@media (min-width: 1025px) {
  .af-more:hover > .af-more-menu {
    display: flex;
  }
}

.af-more-menu a,
.af-more-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  text-align: left;
  color: var(--text-color, #222);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  width: 100%;
  box-shadow: none;
}

.af-more-menu a:hover,
.af-more-menu button:hover {
  background: rgba(0, 0, 0, .06);
  transform: none;
  filter: none;
}

body.night .af-more-menu a:hover,
body.night .af-more-menu button:hover {
  background: rgba(255, 255, 255, .08);
}

.af-more-menu i,
.af-more-menu img {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.af-more-trigger {
  position: relative;
}

/* Collapsed / mobile nav (.navbar drawer only — index.html's inline
   user-menu keeps its normal wrapping behaviour at every width) */
@media (max-width: 1024px) {
  .navbar .af-more {
    display: flex;
    width: 100%;
  }

  .navbar .af-more-trigger {
    width: 100%;
    justify-content: center;
  }

  .navbar .af-more-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
    margin-top: 4px;
    width: 100%;
  }

  .navbar .af-more-menu a,
  .navbar .af-more-menu button {
    justify-content: center;
  }
}
