/* ==========================================================================
   AIRH Avatar — Futuristic Neumorphism
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Base Avatar — Raised neumorphic
   --------------------------------------------------------------------------- */
.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(35, 131, 226, 0.12), rgba(99, 102, 241, 0.12));
  color: var(--color-accent);
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
  user-select: none;
  box-shadow: var(--neu-raised-sm);
}

/* ---------------------------------------------------------------------------
   Sizes
   --------------------------------------------------------------------------- */
.avatar--xs { width: 24px; height: 24px; font-size: 10px; }
.avatar--sm { width: 32px; height: 32px; font-size: var(--text-xs); }
.avatar--md { width: 40px; height: 40px; font-size: var(--text-sm); }
.avatar--lg { width: 56px; height: 56px; font-size: var(--text-xl); }
.avatar--xl { width: 80px; height: 80px; font-size: var(--text-2xl); }

/* ---------------------------------------------------------------------------
   Image
   --------------------------------------------------------------------------- */
.avatar__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

/* ---------------------------------------------------------------------------
   Initials Fallback
   --------------------------------------------------------------------------- */
.avatar__initials {
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* ---------------------------------------------------------------------------
   Color Variants
   --------------------------------------------------------------------------- */
.avatar--blue {
  background: linear-gradient(135deg, rgba(35, 131, 226, 0.15), rgba(35, 131, 226, 0.08));
  color: #2383e2;
}

.avatar--green {
  background: linear-gradient(135deg, rgba(15, 123, 108, 0.15), rgba(15, 123, 108, 0.08));
  color: #0f7b6c;
}

.avatar--orange {
  background: linear-gradient(135deg, rgba(217, 115, 13, 0.15), rgba(217, 115, 13, 0.08));
  color: #d9730d;
}

.avatar--purple {
  background: linear-gradient(135deg, rgba(144, 101, 176, 0.15), rgba(144, 101, 176, 0.08));
  color: #9065b0;
}

.avatar--red {
  background: linear-gradient(135deg, rgba(212, 76, 71, 0.15), rgba(212, 76, 71, 0.08));
  color: #d44c47;
}

.avatar--teal {
  background: linear-gradient(135deg, rgba(51, 126, 169, 0.15), rgba(51, 126, 169, 0.08));
  color: #337ea9;
}

/* ---------------------------------------------------------------------------
   Status Indicator — Raised dot
   --------------------------------------------------------------------------- */
.avatar__status {
  position: absolute;
  bottom: 0;
  right: 0;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-bg-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.avatar--xs .avatar__status { width: 8px; height: 8px; border-width: 1.5px; }
.avatar--sm .avatar__status { width: 10px; height: 10px; }
.avatar--md .avatar__status { width: 12px; height: 12px; }
.avatar--lg .avatar__status { width: 14px; height: 14px; border-width: 2.5px; }
.avatar--xl .avatar__status { width: 18px; height: 18px; border-width: 3px; }

.avatar__status--online { background-color: var(--color-success); }
.avatar__status--offline { background-color: var(--color-text-disabled); }
.avatar__status--busy { background-color: var(--color-error); }
.avatar__status--away { background-color: var(--color-warning); }

/* ---------------------------------------------------------------------------
   Avatar Group (overlapping) — Neumorphic
   --------------------------------------------------------------------------- */
.avatar-group {
  display: inline-flex;
  align-items: center;
  flex-direction: row-reverse;
}

.avatar-group .avatar {
  border: 2px solid var(--color-bg-primary);
  margin-left: -8px;
  transition: transform var(--transition-fast);
}

.avatar-group .avatar:last-child { margin-left: 0; }

.avatar-group .avatar:hover {
  transform: translateY(-2px);
  z-index: 1;
  box-shadow: var(--neu-raised);
}

.avatar-group--sm .avatar { margin-left: -6px; }
.avatar-group--lg .avatar { margin-left: -12px; }

/* Overflow indicator */
.avatar-group__overflow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-bg-primary);
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  border: 2px solid var(--color-bg-primary);
  margin-left: -8px;
  box-shadow: var(--neu-inset-sm);
}

.avatar-group--sm .avatar-group__overflow { width: 32px; height: 32px; margin-left: -6px; }
.avatar-group .avatar-group__overflow { width: 40px; height: 40px; }
