/**
 * Avatar Component Styles
 * User profile images with fallback initials, status indicators, and group display
 */

/* Base Avatar */
.avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-border);
    color: var(--color-text);
    font-weight: 500;
    flex-shrink: 0;
    user-select: none;
}

/* Size Variants */
.avatar-xs {
    width: 24px;
    height: 24px;
    font-size: var(--text-xs);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: var(--text-sm);
}

.avatar-md {
    width: 40px;
    height: 40px;
    font-size: var(--text-base);
}

.avatar-lg {
    width: 48px;
    height: 48px;
    font-size: var(--text-lg);
}

.avatar-xl {
    width: 64px;
    height: 64px;
    font-size: var(--text-xl);
}

.avatar-2xl {
    width: 96px;
    height: 96px;
    font-size: var(--text-3xl);
}

/* Avatar Image */
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Avatar Initials */
.avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-transform: uppercase;
    background: var(--color-accent);
    color: white;
}

/* Status Indicator */
.avatar-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 25%;
    height: 25%;
    min-width: 8px;
    min-height: 8px;
    border-radius: 50%;
    border: 2px solid var(--color-surface);
}

.avatar-status-online {
    background: #10b981; /* Green */
}

.avatar-status-offline {
    background: #6b7280; /* Gray */
}

.avatar-status-busy {
    background: #ef4444; /* Red */
}

.avatar-status-away {
    background: #f59e0b; /* Amber */
}

/* Ring Variants */
.avatar-ring {
    box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-accent);
}

.avatar-ring-secondary {
    box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-accent-secondary);
}

/* Avatar Group */
.avatar-group {
    display: inline-flex;
    align-items: center;
}

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

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

.avatar-group .avatar:hover {
    z-index: 10;
    transform: translateY(-2px);
}

/* Avatar with Text */
.avatar-with-text {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
}

.avatar-text {
    display: flex;
    flex-direction: column;
}

.avatar-name {
    font-weight: 500;
    font-size: var(--text-sm);
    color: var(--color-text);
}

.avatar-meta {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

/* Responsive adjustments */
@media (max-width: 968px) {
    .avatar-group .avatar {
        margin-left: -6px;
    }
}
