/* Account menu → kit x-ddm. Compact (anh): narrow, 12px, tight pad. Clip-path steps(4) reveal. */

/* Connected top-bar wallet chip. JS adds .v2-wallet-fit (acctmenu paintWalletBtn /
   nav paintWallet). Raises the soft 28vw/14em cap for Wallet + short addr (or
   short addr alone on phones). Go button is at least the short-addr width so
   flex-end + overflow:hidden cannot clip "0x" off the left at 320px. Ellipsis
   still caps any longer overflow on the right. */
.v2-nav .v2-wallet.v2-wallet-fit,
.v2-prof-nav .v2-wallet.v2-wallet-fit,
.v2-tab-nav .v2-wallet.v2-wallet-fit,
body.v2-land .v2-nav .v2-wallet.v2-wallet-fit,
.v2-inv .v2-nav .v2-wallet.v2-wallet-fit {
  max-width: min(56vw, 18em);
  min-width: 0;
  flex: 0 1 auto;
}
.v2-nav .v2-wallet.v2-wallet-fit .v2-wallet-go,
.v2-prof-nav .v2-wallet.v2-wallet-fit .v2-wallet-go,
.v2-tab-nav .v2-wallet.v2-wallet-fit .v2-wallet-go,
body.v2-land .v2-nav .v2-wallet.v2-wallet-fit .v2-wallet-go,
.v2-inv .v2-nav .v2-wallet.v2-wallet-fit .v2-wallet-go {
  /* ~90px short addr; never shrink below that (Trade copy sits beside this). */
  min-width: 7.5em;
  max-width: 100%;
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  /* flex-start: if anything overflows, clip on the right — not the leading "0x". */
  justify-content: flex-start;
}
.v2-wallet.v2-wallet-fit .v2-wallet-go > span[hidden] {
  display: none;
}
.v2-wallet.v2-wallet-fit .v2-wallet-go > span:not([hidden]) {
  flex: 0 0 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.v2-wallet.v2-wallet-fit .v2-wallet-addr {
  flex: 0 1 auto;
  min-width: 7.5em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@keyframes x-pop {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.v2-ac {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 52px 12px 12px;
  pointer-events: none;
}
.v2-ac[hidden] {
  display: none;
}
/* Opaque hatch veil (kit), not rgba soft scrim. */
.v2-ac-scrim {
  position: absolute;
  inset: 0;
  background: var(--bg);
  background-image: var(--hatch);
  opacity: 1;
  pointer-events: auto;
}
.v2-ac-panel.x-ddm,
.v2-ac-panel {
  position: relative;
  z-index: 1;
  width: min(280px, calc(100vw - 24px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  background: var(--tile);
  border: 1px solid var(--acc);
  box-shadow: 4px 4px 0 var(--acc);
  color: var(--tx);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  font: 400 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  clip-path: inset(0 0 100% 0);
}
.v2-ac:not([hidden]) .v2-ac-panel {
  animation: x-pop 160ms steps(4, end) forwards;
}
.v2-ac-hd {
  height: var(--v2-hd-h);
  flex: 0 0 var(--v2-hd-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  background: var(--alt);
  border-bottom: 1px solid var(--line);
  color: var(--mute);
  font-size: var(--fs-12);
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.v2-ac-x {
  margin-left: auto;
  width: 28px;
  height: 22px;
  min-height: 22px;
  padding: 0;
}
.v2-ac-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  padding: 0;
}
.v2-ac-top,
.v2-ac-g {
  background: var(--tile);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.v2-ac-id {
  display: flex;
  align-items: center;
  gap: 8px;
}
.v2-ac-id .v2-copy {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--mute);
  width: 22px;
  height: 22px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.v2-ac-id .v2-copy:hover {
  color: var(--acc);
}
.v2-ac-id .v2-copy svg {
  width: 14px;
  height: 14px;
}
.v2-ac-val {
  font-size: var(--v2-fs-equity);
}
.v2-ac-sub {
  color: var(--mute);
}
.v2-ac-row {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: 100%;
  min-height: 28px;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}
.v2-ac-row.st {
  cursor: default;
}
button.v2-ac-row:hover,
button.v2-ac-row:focus-visible {
  background: var(--acc);
  color: var(--ink);
  outline: 0;
}
.v2-ac-n {
  flex: 1 1 auto;
  min-width: 0;
}
.v2-ac-v {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.v2-ac-v.mut,
.mut {
  color: var(--mute);
  font-weight: 400;
}
.v2-ac-v.up {
  color: var(--acc);
}
.v2-ac-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 4px;
  background: var(--alt);
  color: var(--acc);
  font-size: var(--fs-12);
  font-family: var(--mono);
  font-weight: 400;
}
.v2-ac-net {
  width: 160px;
  flex: 0 0 160px;
  height: 26px;
}
.v2-ac-net .v2-btn {
  height: 26px;
  min-height: 26px;
  padding: 0 6px;
}
.v2-ac-tog {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 20px;
  padding: 0 6px;
  background: var(--alt);
  color: var(--mute);
  font-weight: 700;
}
.v2-ac-tog.on {
  background: var(--acc);
  color: var(--ink);
}
.mono {
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .v2-ac:not([hidden]) .v2-ac-panel {
    animation: none;
    clip-path: none;
  }
}
