/* Profile preview card (js/user-card.js). Needs /style.css variables. */
.uc {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-sizing: border-box;
  width: min(320px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  padding: 14px 16px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: left;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 140ms ease-out, transform 140ms ease-out;
}
.uc[data-side="top"] { transform: translateY(-4px); }
.uc.uc--in { opacity: 1; transform: none; }

.uc__head { display: flex; align-items: center; gap: 12px; }
.uc__avatar { flex-shrink: 0; width: 56px; height: 56px; }
.uc__avatar svg { display: block; }
.uc--private .uc__avatar { opacity: 0.5; }
.uc__id { min-width: 0; }
.uc__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.uc__meta { margin: 2px 0 0; font-size: 0.8rem; color: var(--ink-dim); overflow-wrap: anywhere; }
.uc[aria-busy="true"] .uc__name { color: var(--ink-faint); }

.uc__badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-dim);
}
.uc__badge-img { flex-shrink: 0; }
.uc__badge-label { color: var(--teal); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.uc__badge-name { color: var(--ink); overflow-wrap: anywhere; }

.uc__bio { margin: 10px 0 0; color: var(--ink-dim); overflow-wrap: anywhere; white-space: pre-line; }

.uc__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.uc__links { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.uc__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--ink-dim);
  transition: color 120ms, background 120ms;
}
.uc__link:hover { color: var(--teal); background: var(--bg-2); }
.uc__view {
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid var(--teal-line);
  border-radius: 8px;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.uc__view:hover { background: var(--teal-dim); }
.uc__head + .uc__view { display: inline-block; margin-top: 12px; }
.uc a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .uc, .uc[data-side="top"] { transform: none; transition: none; }
}
