/* ==========================================================================
   头像组件 (Avatar)
   ========================================================================== */

.zuoekai-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  overflow: hidden;
  user-select: none;
  background-color: var(--zuoekai-color-surface-page);
  color: var(--zuoekai-color-text-secondary);
  border-radius: var(--zuoekai-radius-sm);
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

/* 图片头像 */
.zuoekai-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* 文字/图标头像 */
.zuoekai-avatar__text {
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  text-transform: uppercase;
}

/* --- 形状 (Shapes) --- */

.zuoekai-avatar--circle {
  border-radius: 50%;
}

/* --- 尺寸 (Sizes) --- */

.zuoekai-avatar--xs {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.zuoekai-avatar--sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.zuoekai-avatar--md {
  width: 40px; /* Default */
  height: 40px;
  font-size: 14px;
}

.zuoekai-avatar--lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.zuoekai-avatar--xl {
  width: 64px;
  height: 64px;
  font-size: 20px;
}

/* --- 占位符颜色 (Placeholders) --- */

.zuoekai-avatar--placeholder {
  background-color: #e2e8f0; /* slate-200 */
}

/* --- 状态指示器 (Status Indicator) --- */

.zuoekai-avatar-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  display: block;
  width: 25%; /* Relative to avatar size */
  height: 25%;
  min-width: 8px;
  min-height: 8px;
  max-width: 16px;
  max-height: 16px;
  border-radius: 50%;
  border: 2px solid white; /* Cutout effect */
  background-color: #94a3b8; /* Default: Offline/Neutral */
}

/* Indicator Colors */
.zuoekai-avatar-indicator--online { background-color: var(--zuoekai-color-success-600); }
.zuoekai-avatar-indicator--busy { background-color: var(--zuoekai-color-error-600); }
.zuoekai-avatar-indicator--away { background-color: var(--zuoekai-color-warning-600); }

/* Wrapper for positioning indicator outside overflow:hidden */
.zuoekai-avatar-wrapper {
  position: relative;
  display: inline-block;
  line-height: 0;
}

/* --- 头像组 (Avatar Group) --- */

.zuoekai-avatar-group {
  display: flex;
  align-items: center;
}

.zuoekai-avatar-group .zuoekai-avatar {
  border: 2px solid white;
  margin-left: -12px; /* Overlap */
  transition: transform 0.2s, z-index 0.2s;
}

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

.zuoekai-avatar-group .zuoekai-avatar:hover {
  transform: translateY(-2px);
  z-index: 10;
  border-color: var(--zuoekai-color-surface-panel);
}

/* 计数器头像 */
.zuoekai-avatar--counter {
  background-color: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}
