/* Scoped to the native dialog so the existing trade layout remains unchanged. */
.moo-wallet-dialog {
  box-sizing: border-box;
  width: min(480px, calc(100vw - 28px));
  max-height: min(720px, calc(100dvh - 36px));
  margin: auto;
  padding: 0;
  border: 3px double #fff;
  border-radius: 0;
  color: #fff;
  background: #000080;
  box-shadow: 8px 8px 0 #000;
  font: 15px/1.55 "IBM Plex Mono", "Consolas", "Courier New", monospace;
  overflow: auto;
  overscroll-behavior: contain;
}
.moo-wallet-dialog::backdrop { background: rgb(0 0 24 / 76%); }
.moo-wallet-dialog * { box-sizing: border-box; }
.moo-wallet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px 9px 18px;
  color: #000;
  background: #aaa;
  border-bottom: 2px solid #fff;
}
.moo-wallet-title { margin: 0; font: 30px/1.15 "VT323", "Courier New", monospace; font-weight: 400; }
.moo-wallet-dialog .moo-wallet-button {
  cursor: pointer;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #b4b4fa;
  border-radius: 0;
  color: #fff;
  background: #0000aa;
  font: inherit;
  text-align: center;
}
.moo-wallet-dialog .moo-wallet-button:hover { border-color: #ffff55; background: #000066; }
.moo-wallet-dialog .moo-wallet-button:focus-visible,
.moo-wallet-dialog .moo-wallet-address:focus-visible { outline: 3px solid #55ffff; outline-offset: 3px; }
.moo-wallet-dialog .moo-wallet-button:disabled { cursor: wait; opacity: .6; }
.moo-wallet-dialog .moo-wallet-close { min-height: 40px; min-width: 40px; padding: 0 8px; color: #000; background: #aaa; border: 2px solid #000; font-size: 26px; line-height: 1; }
.moo-wallet-dialog .moo-wallet-close:hover { color: #000; background: #ffff55; }
.moo-wallet-description { margin: 18px 18px 14px; color: #b4b4fa; }
.moo-wallet-body { padding: 0 18px; }
.moo-wallet-list { display: grid; gap: 10px; }
.moo-wallet-dialog .moo-wallet-choice { display: flex; align-items: center; width: 100%; gap: 12px; min-height: 66px; padding: 12px; text-align: left; }
.moo-wallet-icon { display: block; width: 32px; height: 32px; flex: 0 0 32px; object-fit: contain; }
.moo-wallet-icon-fallback { font: 28px/32px monospace; color: #ffff55; text-align: center; }
.moo-wallet-name { min-width: 0; flex: 1; overflow-wrap: anywhere; font-weight: 600; }
.moo-wallet-detected { margin-left: auto; color: #b4b4fa; font-size: 11px; }
.moo-wallet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.moo-wallet-dialog .moo-wallet-primary { color: #000; background: #ffff55; border: 2px outset #fff; font-weight: 600; }
.moo-wallet-dialog .moo-wallet-primary:hover { color: #000; background: #fff; }
.moo-wallet-progress, .moo-wallet-empty, .moo-wallet-account { padding: 16px; border: 1px solid #7777d5; background: #000055; }
.moo-wallet-progress > .moo-wallet-icon { display: inline-block; margin: 0 10px 0 0; vertical-align: middle; }
.moo-wallet-progress > strong { overflow-wrap: anywhere; }
.moo-wallet-note, .moo-wallet-empty p { margin: 12px 0 0; color: #b4b4fa; }
.moo-wallet-label { display: block; margin-bottom: 6px; color: #b4b4fa; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.moo-wallet-dialog .moo-wallet-address { display: block; width: 100%; min-height: 44px; margin: 0 0 18px; padding: 8px; color: #fff; background: #000055; border: 1px solid #7777d5; border-radius: 0; font: 12px/1.5 "IBM Plex Mono", monospace; }
.moo-wallet-network { margin: 0; overflow-wrap: anywhere; }
.moo-wallet-status { margin: 16px 18px 0; padding: 10px 12px; color: #ffff55; border-left: 3px solid #ffff55; background: #000055; overflow-wrap: anywhere; }
.moo-wallet-status[data-error="true"] { color: #ffd4d4; border-left-color: #ff5555; }
.moo-wallet-status[hidden] { display: none; }
.moo-wallet-footer { margin: 18px; padding-top: 13px; border-top: 1px solid #5555aa; color: #b4b4fa; font-size: 12px; }
@media (max-width: 420px) {
  .moo-wallet-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 28px); box-shadow: 5px 5px 0 #000; font-size: 14px; }
  .moo-wallet-header { padding-left: 12px; }
  .moo-wallet-description, .moo-wallet-status, .moo-wallet-footer { margin-left: 12px; margin-right: 12px; }
  .moo-wallet-body { padding: 0 12px; }
  .moo-wallet-title { font-size: 28px; }
  .moo-wallet-actions > button { flex: 1 1 100%; }
  .moo-wallet-choice { gap: 8px; }
  .moo-wallet-detected { font-size: 10px; }
}
