/* Avatar Component Styles */
/* Shared avatar styles for family member photos and initials */

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  font-weight: 600;
  color: white;
}

.avatar__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar__initial {
  font-size: inherit;
  color: white;
  font-weight: inherit;
}

.avatar__check-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--success-color, #34C759);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  border: 2px solid white;
}

/* Size variants */
.avatar--small {
  width: 32px;
  height: 32px;
  font-size: 14px;
}

.avatar--small .avatar__check-badge {
  width: 16px;
  height: 16px;
  font-size: 10px;
  border-width: 1px;
}

.avatar--medium {
  width: 48px;
  height: 48px;
  font-size: 20px;
}

.avatar--large {
  width: 64px;
  height: 64px;
  font-size: 28px;
}

.avatar--large .avatar__check-badge {
  width: 28px;
  height: 28px;
  font-size: 16px;
  border-width: 3px;
}

/* Context-specific overrides for existing styles */
/* These allow gradual migration from old classes to new avatar component */

.mobile-chores-member-row__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  font-weight: 600;
  color: white;
  width: 48px;
  height: 48px;
  font-size: 20px;
}

.mobile-chores-member-row__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chore-field__member-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  /* overflow: hidden removed - allows checkmark badge to overflow */
  flex-shrink: 0;
  position: relative;
  font-weight: 600;
  color: white;
}

.chore-field__member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
