/* Wallet picker: the production RainbowKit compact modal (darkTheme, modalBackground #1a201e, accentColor #89763f). */
.modal-container.wallet-rk { inset: 0; top: 0; max-height: none; height: 100vh; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.5); }
.wallet-modal-rk {
  width: 360px; max-width: calc(100vw - 32px); background: #1a201e; color: #fff; border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.32);
  font-family: SFRounded, ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-transform: uppercase; letter-spacing: normal;
}
.wallet-rk-head { position: relative; display: flex; align-items: center; justify-content: center; padding: 18px 18px 0; }
.wallet-rk-title { margin: 0; font-size: 18px; line-height: 24px; font-weight: 800; }
.wallet-rk-close {
  position: absolute; right: 18px; top: 16px; width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.6); font-size: 20px; line-height: 28px; cursor: pointer;
}
.wallet-rk-close:hover { transform: scale(1.1); }
.wallet-rk-list { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 12px; }
.wallet-group { margin: 12px 6px 4px; font-size: 14px; line-height: 18px; font-weight: 700; color: rgba(255, 255, 255, 0.6); }
.wallet-group:first-child { margin-top: 0; color: #89763f; }
.wallet-option {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 5px 6px; border: 0; border-radius: 12px;
  background: transparent; color: #fff; text-align: left; text-transform: uppercase; cursor: pointer; font: inherit;
}
.wallet-option:hover { background: rgba(255, 255, 255, 0.08); }
.wallet-option:disabled { opacity: 0.6; cursor: wait; }
.wallet-option img, .wallet-icon { width: 28px; height: 28px; border-radius: 6px; flex: none; }
.wallet-icon { background: rgba(255, 255, 255, 0.08); }
.wallet-name { display: block; font-size: 16px; line-height: 20px; font-weight: 700; }
.wallet-recent { display: block; font-size: 12px; line-height: 14px; font-weight: 500; color: #89763f; }
.wallet-rk-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 16px 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.6);
}
.wallet-rk-foot a { color: #89763f; font-weight: 700; text-decoration: none; }

/* Account modal: RainbowKit ProfileDetails as measured in production (362px, #1a1b1f, profileForeground layer). */
.wallet-modal-rk.rk-profile { background: #1a1b1f; overflow: hidden; }
.rk-profile { padding: 16px; background-image: linear-gradient(rgba(224, 232, 255, 0.05), rgba(224, 232, 255, 0.05)); }
.rk-profile-body { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; margin: 8px; text-align: center; }
.rk-profile-close {
  position: absolute; right: -8px; top: -8px; width: 28px; height: 28px; border: 0; border-radius: 9999px; padding: 0;
  display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.08); color: rgba(224, 232, 255, 0.6); cursor: pointer;
}
.rk-profile-close:hover { transform: scale(1.1); }
.rk-profile-avatar { width: 74px; height: 74px; border-radius: 9999px; object-fit: contain; }
.rk-profile-name { margin: 0; color: #fff; font-size: 18px; line-height: 24px; font-weight: 800; }
.rk-profile-balance { margin: 0; color: rgba(255, 255, 255, 0.6); font-size: 14px; line-height: 18px; font-weight: 600; }
.rk-profile-actions { display: flex; gap: 8px; margin: 16px 2px 2px; }
.rk-profile-action {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 8px; border: 0;
  border-radius: 12px; background: rgba(224, 232, 255, 0.1); color: #fff; font: inherit; font-size: 13px; line-height: 18px; font-weight: 600; cursor: pointer;
}
.rk-profile-action:hover { transform: scale(1.025); }
.rk-profile-icon { display: flex; height: 16px; align-items: center; padding-top: 2px; }

/* Chain modal: RainbowKit ChainModal (wrong network): title, hint, site chain, Disconnect. */
.wallet-modal-rk.rk-chain { padding: 16px 16px 8px; text-transform: none; }
.rk-chain-head { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 0; }
.rk-chain-head .rk-profile-close { position: static; }
.rk-chain-title { margin: 0; font-size: 18px; line-height: 24px; font-weight: 800; color: #fff; }
.rk-chain-hint { margin: 14px 8px 0; font-size: 14px; line-height: 18px; font-weight: 500; color: rgba(255, 255, 255, 0.6); }
.rk-chain-list { display: flex; flex-direction: column; gap: 4px; padding: 2px; padding-bottom: 16px; margin-top: 14px; }
.rk-chain-option {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 6px 14px; min-height: 40px; border: 0; border-radius: 12px;
  background: transparent; color: #fff; font: inherit; font-size: 16px; font-weight: 700; text-align: left; cursor: pointer;
}
.rk-chain-option:hover { background: rgba(224, 232, 255, 0.1); }
.rk-chain-disconnect { justify-content: flex-start; gap: 12px; color: #ff494a; }
.rk-chain-pending { display: flex; align-items: center; font-size: 14px; font-weight: 500; }
.rk-dot { display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 9999px; }
.rk-dot-standby { background: #ffd641; }
.rk-chain-divider { height: 1px; margin: 0 8px; background: rgba(255, 255, 255, 0.04); }

/* Returning wallet being restored: an empty connected-size button with a pulse, instead of "Become a Metarunner". */
[data-role=wallet-button][data-state=loading] { cursor: progress; animation: wallet-restoring 1s ease-in-out infinite alternate; }
@keyframes wallet-restoring { from { opacity: .35; } to { opacity: .8; } }
