/* wraith-dashboard.css — styles for elements injected by
   wraith-dashboard.js on the /dashboard route only.

   Every selector here is scoped under `.wraith-*` class names that
   only exist on injected nodes. Safe to load on every page — selectors
   simply don't match outside /dashboard, so the landing/about/docs
   pages stay 100% unaffected.

   Color tokens follow the host site's CSS variables (--fg = #0a0a0a,
   --bg = #f0f0f0) so panels feel native to the light landing theme
   AND remain readable inside the dark wallet-connected dashboard. */

/* Live pulse dot */
.w-pulse {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: wraithPulse 1.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  flex-shrink: 0;
}
@keyframes wraithPulse {
  0%   { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0); }
}

/* Slide-in entry */
@keyframes wraithSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Network status strip */
.wraith-net-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  padding: 12px 18px;
  margin: 20px 0;
  background: rgba(10, 10, 10, 0.04);
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  position: relative;
  animation: wraithSlideIn 360ms cubic-bezier(0.22, 1, 0.36, 1);
}
.w-net-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.w-net-grow { flex: 1; }
.w-net-label {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: rgba(10, 10, 10, 0.45);
  text-transform: uppercase;
}
.w-net-val {
  font-size: 13px;
  color: #0a0a0a;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 200ms;
}
.w-net-val.w-bump { color: #059669; }
.w-mono-small { font-size: 11px !important; color: rgba(10, 10, 10, 0.62) !important; }

.w-flash {
  animation: wraithFlash 380ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes wraithFlash {
  0%   { background-color: rgba(10, 10, 10, 0.04); }
  40%  { background-color: rgba(16, 185, 129, 0.16); }
  100% { background-color: rgba(10, 10, 10, 0.04); }
}

/* Quick actions toolbar */
.wraith-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px 0;
  animation: wraithSlideIn 380ms cubic-bezier(0.22, 1, 0.36, 1) 80ms backwards;
}
.wraith-action {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 9px 14px !important;
  background: #ffffff !important;
  border: 1px solid rgba(10, 10, 10, 0.16) !important;
  border-radius: 6px;
  color: rgba(10, 10, 10, 0.78) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 200ms cubic-bezier(0.22,1,0.36,1),
              border-color 200ms cubic-bezier(0.22,1,0.36,1),
              color 200ms cubic-bezier(0.22,1,0.36,1),
              transform 140ms cubic-bezier(0.22,1,0.36,1),
              box-shadow 200ms !important;
}
.wraith-action svg { flex-shrink: 0; }
.wraith-action:hover {
  border-color: #0a0a0a !important;
  color: #0a0a0a !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px -6px rgba(10, 10, 10, 0.25);
}
.wraith-action:active { transform: translateY(1px) scale(0.985); }
.wraith-action[data-id="logout"]:hover {
  border-color: #b91c1c !important;
  color: #b91c1c !important;
}

/* Live activity feed */
.wraith-activity {
  background: #ffffff;
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 0 0 28px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  animation: wraithSlideIn 420ms cubic-bezier(0.22, 1, 0.36, 1) 160ms backwards;
}
.wraith-activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(10, 10, 10, 0.08);
}
.wraith-activity-title {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(10, 10, 10, 0.6);
  text-transform: uppercase;
}
.wraith-activity-count {
  font-size: 10px;
  color: rgba(10, 10, 10, 0.45);
  letter-spacing: 0.08em;
}
.wraith-activity-list {
  display: flex; flex-direction: column;
  max-height: 280px;
  overflow: hidden;
  position: relative;
}
.wraith-activity-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  font-size: 11.5px;
  border-bottom: 1px solid rgba(10, 10, 10, 0.05);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 340ms cubic-bezier(0.22,1,0.36,1),
              transform 340ms cubic-bezier(0.22,1,0.36,1),
              background-color 200ms;
}
.wraith-activity-row.w-show { opacity: 1; transform: translateX(0); }
.wraith-activity-row:hover { background-color: rgba(10, 10, 10, 0.03); }
.w-act-time {
  color: rgba(10, 10, 10, 0.42);
  font-size: 10.5px;
  min-width: 64px;
}
.w-act-tag {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid;
  border-radius: 3px;
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 600;
  min-width: 56px;
  text-align: center;
}
.w-act-addr {
  color: rgba(10, 10, 10, 0.82);
  font-size: 11px;
  min-width: 90px;
}
.w-act-text {
  color: rgba(10, 10, 10, 0.58);
  flex: 1;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Toast */
.wraith-toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translate(-50%, 20px);
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 12px 20px;
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0;
  z-index: 2147483646;
  transition: opacity 240ms cubic-bezier(0.22,1,0.36,1),
              transform 240ms cubic-bezier(0.22,1,0.36,1);
  pointer-events: none;
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.4);
}
.wraith-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Dark-theme variant of the activity feed + net strip — used IF the
   surrounding dashboard ever switches to a dark surface. Detected via
   the dashboard having a dark bg ancestor. */
[class*="bg-fg"] .wraith-net-strip,
[class*="bg-bg"][data-theme="dark"] .wraith-net-strip,
.dark .wraith-net-strip {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}
[class*="bg-fg"] .wraith-net-strip .w-net-label,
.dark .wraith-net-strip .w-net-label { color: rgba(255,255,255,0.45); }
[class*="bg-fg"] .wraith-net-strip .w-net-val,
.dark .wraith-net-strip .w-net-val   { color: #ffffff; }

/* Mobile collapse */
@media (max-width: 720px) {
  .wraith-net-strip { gap: 12px 18px; }
  .w-net-item { flex: 0 0 calc(50% - 10px); }
  .wraith-action .w-action-label { display: none; }
  .wraith-action { padding: 9px 11px !important; }
  .w-act-text { display: none; }
}
