/* ConnectX modal — scoped under .cx-overlay. Theme via CSS custom
   properties: set them on :root or pass init({ui:{theme:{...}}}).
   Every class below is a documented hook — override freely. */
.cx-overlay {
  --cx-accent: #6d6bff;
  --cx-accent-hover: #8483ff;
  --cx-bg: rgba(8, 9, 14, 0.72);
  --cx-surface: #16171e;
  --cx-surface-2: #1e2029;
  --cx-border: #2b2e3c;
  --cx-text: #f4f5f9;
  --cx-muted: #9299ad;
  --cx-danger: #f87171;
  --cx-warn: #fbbf24;
  --cx-ok: #4ade80;
  --cx-radius: 18px;
  --cx-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cx-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--cx-font);
  animation: cxFadeIn 0.16s ease-out;
}
@keyframes cxFadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes cxSlideUp { from { opacity: 0; transform: translateY(14px) scale(0.985) } to { opacity: 1; transform: none } }
.cx-modal {
  position: relative;
  width: 380px;
  max-width: calc(100vw - 28px);
  max-height: min(640px, 84vh);
  overflow-y: auto;
  background: var(--cx-surface);
  color: var(--cx-text);
  border: 1px solid var(--cx-border);
  border-radius: var(--cx-radius);
  padding: 22px 22px 20px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.35);
  animation: cxSlideUp 0.18s ease-out;
}
.cx-modal::-webkit-scrollbar { width: 6px }
.cx-modal::-webkit-scrollbar-thumb { background: var(--cx-border); border-radius: 3px }
.cx-modal h2 { margin: 0 0 4px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.cx-modal .cx-sub { color: var(--cx-muted); font-size: 13px; margin-bottom: 16px; line-height: 1.45; }
.cx-close {
  position: absolute; top: 14px; right: 16px; width: 30px; height: 30px;
  display: grid; place-items: center; border: none; border-radius: 8px;
  background: transparent; color: var(--cx-muted); font-size: 20px; cursor: pointer;
}
.cx-close:hover { background: var(--cx-surface-2); color: var(--cx-text); }
.cx-wallet-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; margin: 7px 0;
  border: 1px solid var(--cx-border); border-radius: 14px;
  background: var(--cx-surface-2); color: var(--cx-text);
  font-size: 15px; font-weight: 600; cursor: pointer; text-align: left;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
}
.cx-wallet-row:hover:not(:disabled) { border-color: var(--cx-accent); background: var(--cx-surface); }
.cx-wallet-row:active:not(:disabled) { transform: scale(0.985); }
.cx-wallet-row:disabled { opacity: 0.4; cursor: not-allowed; }
.cx-wallet-row .cx-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cx-accent), #4338ca);
  font-size: 16px; font-weight: 800; color: #fff;
}
.cx-wallet-row .cx-badge {
  margin-left: auto; font-size: 11px; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; background: var(--cx-border); color: var(--cx-muted);
}
.cx-wallet-row .cx-badge.cx-yes { background: rgba(74, 222, 128, 0.14); color: var(--cx-ok); }
.cx-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 14px; }
.cx-table td { padding: 8px 0; border-bottom: 1px solid var(--cx-border); vertical-align: top; word-break: break-all; line-height: 1.5; }
.cx-table td:first-child { color: var(--cx-muted); width: 36%; padding-right: 10px; }
.cx-risk { padding: 11px 13px; border-radius: 12px; font-size: 13px; line-height: 1.5; margin: 10px 0; }
.cx-risk-low { background: rgba(74, 222, 128, 0.1); color: var(--cx-ok); }
.cx-risk-medium { background: rgba(251, 191, 36, 0.1); color: var(--cx-warn); }
.cx-risk-high { background: rgba(248, 113, 113, 0.12); color: var(--cx-danger); }
.cx-warning { color: var(--cx-warn); font-size: 12px; margin: 5px 0; line-height: 1.5; }
.cx-actions { display: flex; gap: 10px; margin-top: 18px; }
.cx-btn {
  flex: 1; padding: 13px; border: none; border-radius: 13px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}
.cx-btn:active { transform: scale(0.98); }
.cx-btn-primary { background: var(--cx-accent); color: #fff; }
.cx-btn-primary:hover { background: var(--cx-accent-hover); }
.cx-btn-ghost { background: transparent; border: 1px solid var(--cx-border); color: var(--cx-muted); }
.cx-btn-ghost:hover { border-color: var(--cx-muted); color: var(--cx-text); }
.cx-connect-btn {
  padding: 11px 22px; border: none; border-radius: 12px;
  background: var(--cx-accent, #6d6bff); color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: var(--cx-font, -apple-system, sans-serif);
  transition: background 0.12s, transform 0.08s;
}
.cx-connect-btn:hover { background: var(--cx-accent-hover, #8483ff); }
.cx-connect-btn:active { transform: scale(0.98); }
