/* ═══ POLYSTATS — Wallet Picker ═══ */

.wp {
  position: relative;
  width: 100%;
  font-family: 'Inter', sans-serif;
}
/* When used inside ladder .form-row, take remaining space beside the label */
.form-row > .wp { flex: 1 1 auto; max-width: 360px; }
@media (max-width: 768px) {
  .form-row > .wp { max-width: 100%; }
}

/* Trigger button */
.wp-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.wp-trigger:hover,
.wp.is-open .wp-trigger {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px var(--cyan-glow);
  background: var(--panel);
}

.wp-trigger-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 6px var(--cyan);
  flex: 0 0 auto;
}
.wp-trigger-dot.empty { background: var(--muted); box-shadow: none; }

.wp-trigger-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.wp-trigger-name {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wp-trigger-meta {
  color: var(--muted);
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}
.wp-trigger-bal {
  flex: 0 0 auto;
  color: var(--green);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 13px;
}
.wp-trigger-bal.zero { color: var(--muted); }

.wp-chevron {
  flex: 0 0 auto;
  width: 10px; height: 10px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(45deg);
  transition: transform .2s;
  margin-right: 4px;
  margin-top: -4px;
}
.wp.is-open .wp-chevron { transform: rotate(-135deg); margin-top: 4px; }

/* Panel */
.wp-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--cyan);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 0 2px var(--cyan-glow);
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height .22s ease, opacity .18s ease, transform .22s ease;
  z-index: 1000;
  pointer-events: none;
}
.wp.is-open .wp-panel {
  max-height: 340px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.wp-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.wp-panel-head b { color: var(--cyan); font-family: 'Orbitron', sans-serif; letter-spacing: .12em; }

.wp-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}

.wp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s;
  min-height: 48px;
}
.wp-item:hover { background: rgba(0,212,255,.08); }
.wp-item.is-selected {
  background: rgba(0,212,255,.14);
  box-shadow: inset 0 0 0 1px var(--cyan);
}

.wp-item-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 4px var(--cyan);
  flex: 0 0 auto;
}

.wp-item-main { flex: 1 1 auto; min-width: 0; }
.wp-item-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wp-item-addr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.wp-item-bal {
  flex: 0 0 auto;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 13px;
  color: var(--green);
}
.wp-item-bal.zero { color: var(--muted); }

.wp-item-check {
  flex: 0 0 auto;
  width: 16px; height: 16px;
  color: var(--cyan);
  opacity: 0;
}
.wp-item.is-selected .wp-item-check { opacity: 1; }

.wp-item-none {
  padding: 10px 12px;
  color: var(--muted);
  font-style: italic;
  font-size: 12px;
}

/* Empty state */
.wp-empty {
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* Variants */
.wp.wp-purple .wp-trigger:hover,
.wp.wp-purple.is-open .wp-trigger {
  border-color: var(--purple);
  box-shadow: 0 0 0 2px var(--purple-glow);
}
.wp.wp-purple .wp-chevron { border-color: var(--purple); }
.wp.wp-purple .wp-panel { border-color: var(--purple); box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 0 2px var(--purple-glow); }
.wp.wp-purple .wp-panel-head b { color: var(--purple); }
.wp.wp-purple .wp-item:hover { background: rgba(168,85,247,.08); }
.wp.wp-purple .wp-item.is-selected { background: rgba(168,85,247,.14); box-shadow: inset 0 0 0 1px var(--purple); }
.wp.wp-purple .wp-item-dot,
.wp.wp-purple .wp-trigger-dot { background: var(--purple); box-shadow: 0 0 4px var(--purple); }
.wp.wp-purple .wp-item-check { color: var(--purple); }

/* Mobile */
@media (max-width: 768px) {
  .wp-trigger { font-size: 14px; min-height: 48px; }
  .wp-panel { max-height: 0; }
  .wp.is-open .wp-panel { max-height: 60vh; }
  .wp-item { min-height: 52px; padding: 12px; }
  .wp-trigger-name, .wp-item-name { font-size: 14px; }
}
@media (max-width: 480px) {
  .wp-trigger-meta { display: none; }
  .wp-item-addr { font-size: 10px; }
}
