/* ── User Info Card (presence list popover) ────────── */

.user-info-card {
  position: absolute;
  z-index: 300;
  background: #0e0e14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  width: 240px;
  padding: 12px;
  font-family: var(--font-mono);
  color: #c0c0d0;
  overflow: hidden; /* clips banner art to the rounded corners */
}
.user-info-card.hidden { display: none; }

/* Tint overlay over the banner art. The banner element itself is
 * z:0 (per relics.css) — this overlay sits above the banner but
 * below the content, darkening the artwork so text/stats stay
 * readable. Pointer-events disabled so clicks pass through to the
 * card's interactive controls. */
.user-card-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 14, 20, 0.55) 0%,
    rgba(14, 14, 20, 0.85) 60%,
    rgba(14, 14, 20, 0.95) 100%
  );
  pointer-events: none;
}

/* Lift all direct content children above the banner + overlay. */
.user-info-card > .user-card-header,
.user-info-card > .user-card-stats,
.user-info-card > .user-card-actions {
  position: relative;
  z-index: 1;
}

/* Header: avatar + name */
.user-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.user-card-avatar-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.user-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.user-card-avatar[hidden] { display: none; }
.user-card-avatar-ph {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 14px;
  color: #a0a0b8;
  text-transform: uppercase;
}
.user-card-avatar-ph[hidden] { display: none; }

.user-card-identity {
  min-width: 0;
  flex: 1;
}
/* .user-card-name is now a <retro-username size="hero"> element rather
 * than a plain text span. The hero-tier styling in relics.css applies
 * (nameplate backdrop + flair/badge inline). Overrides here adapt the
 * sizing for the popover context (narrower than a profile hero) and
 * drop the old text-clip rules that hid the nameplate. */
.user-card-name {
  display: flex !important;     /* override hero's inline-flex so it spans the popover width */
  min-width: 0 !important;      /* override hero's 280px so we don't overflow narrow popovers */
  width: 100%;
  padding: 6px 14px !important; /* tighter than hero's 10px 24px */
  font-size: 14px !important;   /* tighter than hero's 20px */
  color: #eaeaf2;
}
.user-card-name .retro-username-text {
  font-size: 14px !important;   /* match the element's outer font-size */
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-card-name .retro-username-flair,
.user-card-name .retro-username-badge {
  width: 16px !important;       /* hero default is 24px — too big for popover */
  height: 16px !important;
  flex-shrink: 0;
}
.user-card-status {
  font-size: 10px;
  color: #8888a0;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stats rows */
.user-card-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: #9090a8;
}
.user-card-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}
.user-card-stat-value {
  color: #d8d8e4;
  font-weight: 600;
}

/* Action area (friend button + profile link) */
.user-card-actions {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Compact friend-action button inside the card */
.user-info-card .friend-action-wrap {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.user-info-card .friend-action {
  padding: 3px 10px;
  font-size: 9px;
}

.user-card-profile-link {
  display: block;
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 1px;
  color: #8888a0;
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.15s;
}
.user-card-profile-link:hover {
  color: var(--accent);
}

/* Loading / error state */
.user-card-loading {
  text-align: center;
  padding: 12px 0;
  font-size: 11px;
  color: #9090a8;
}

@media (max-width: 800px) {
  .user-info-card {
    width: calc(100vw - 32px);
    max-width: 260px;
  }
}
