/*
 * Vibeforge Avatar System
 * Consolidated avatar styles - import after design tokens
 */

/* Base avatar */
.avatar,
.avatarz,
.user-avatar {
  --avatar-size: 40px;
  position: relative;
  width: var(--avatar-size);
  height: var(--avatar-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--vf-text-primary, #333);
  line-height: 1;
  font-size: 14px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--vf-surface-alt, #f0f2f5);
  overflow: hidden;
}

.avatar > img,
.avatarz > img,
.user-avatar > img {
  display: inline-block;
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar > svg,
.avatarz > svg {
  display: inline-block;
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Avatar sizes */
.avatar-xs,
.avatarz[data-size="xs"],
.avatar-xs {
  --avatar-size: 24px;
  font-size: 10px;
}

.avatar-sm,
.avatarz[data-size="sm"],
.avatar-sm {
  --avatar-size: 32px;
  font-size: 12px;
}

.avatar-lg,
.avatarz[data-size="lg"],
.avatar-lg {
  --avatar-size: 48px;
  font-size: 16px;
}

.avatar-xl,
.avatarz[data-size="xl"],
.avatar-xl {
  --avatar-size: 64px;
  font-size: 20px;
}

.avatar-2xl,
.avatarz[data-size="2xl"],
.avatar-2xl {
  --avatar-size: 96px;
  font-size: 28px;
}

/* Avatar group for multiple avatars */
.avatar-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vf-space-xs, 4px);
}

/* Avatar stack (overlapping avatars) */
.avatar-stack {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.avatar-stack .avatar,
.avatar-stack .avatarz {
  margin-left: -8px;
  border: 2px solid var(--vf-surface, #fff);
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

.avatar-stack span.total {
  display: inline-block;
  padding-top: 6px;
  margin-left: 6px;
  font-weight: 700;
  font-size: 20px;
  color: var(--vf-text-secondary, #65676b);
}

/* Avatar online status indicator */
.avatar-online::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--vf-success, #31a24c);
  border: 2px solid var(--vf-surface, #fff);
  border-radius: 50%;
}

.avatar-offline::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--vf-text-tertiary, #8a8d8f);
  border: 2px solid var(--vf-surface, #fff);
  border-radius: 50%;
}

.avatar-busy::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--vf-warning, #f7b928);
  border: 2px solid var(--vf-surface, #fff);
  border-radius: 50%;
}

/* Avatar placeholder (when no image) */
.avatar-placeholder {
  background: var(--vf-accent, #4c6fff);
  color: var(--vf-text-inverse, #fff);
  font-weight: 600;
}

/* Avatar ring (like Facebook stories) */
.avatar-ring {
  padding: 3px;
  background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-radius: 50%;
}

.avatar-ring img {
  border: 2px solid var(--vf-surface, #fff);
  border-radius: 50%;
}