.c-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-bg-overlay);
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  flex-shrink: 0;
  user-select: none;
}

.c-avatar__inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.c-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.c-avatar__initials { line-height: 1; }

/* Race ring tint */
.c-avatar--race-terran  { box-shadow: 0 0 0 2px var(--color-race-terran); }
.c-avatar--race-protoss { box-shadow: 0 0 0 2px var(--color-race-protoss); }
.c-avatar--race-zerg    { box-shadow: 0 0 0 2px var(--color-race-zerg); }
.c-avatar--race-random  { box-shadow: 0 0 0 2px var(--color-race-random); }

/* Presence dot */
.c-avatar__presence {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28%;
  height: 28%;
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  background: var(--color-presence-offline);
  border: 2px solid var(--color-bg-elevated);
  box-sizing: border-box;
}
.c-avatar__presence.is-online   { background: var(--color-presence-online); }
.c-avatar__presence.is-idle     { background: var(--color-presence-idle); }
.c-avatar__presence.is-busy     { background: var(--color-presence-busy); }
.c-avatar__presence.is-offline  { background: var(--color-presence-offline); }

/* Verification badge */
.c-avatar__verified {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-bg-elevated);
  box-sizing: border-box;
}
