/* Player Avatar Component Styles */

/* Avatar Size Utilities */
.avatar-xs {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-md {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.player-avatar-display {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0; /* Prevent image from shrinking */
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.player-avatar-display:hover {
    border-color: var(--bs-primary);
}

.initials-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #6c757d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0; /* Prevent circle from shrinking */
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.initials-circle:hover {
    background-color: var(--bs-primary);
    transform: scale(1.05);
}

/* Size overrides when using avatar utility classes */
.initials-circle.avatar-xs {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.initials-circle.avatar-sm {
    width: 40px;
    height: 40px;
}

.initials-circle.avatar-md {
    width: 48px;
    height: 48px;
    font-size: 16px;
}

.initials-circle.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 18px;
}

/* Dark mode support */
[data-bs-theme="dark"] .initials-circle {
    background-color: #495057;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .player-avatar-display {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .player-avatar-display:hover {
    border-color: var(--bs-primary);
}

/* Profile page specific styles */
.player-profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--theme-border-color, rgba(0, 0, 0, 0.125));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.player-profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--theme-info, #3b82f6);
}

/* Ensure initials circle with profile image class also gets styled appropriately */
.initials-circle.player-profile-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--theme-info, #3b82f6);
    color: white;
    font-weight: 600;
    border: 3px solid var(--theme-border-color, rgba(0, 0, 0, 0.125));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.initials-circle.player-profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Dark mode adjustments for profile image */
[data-bs-theme="dark"] {
    .player-profile-image {
        border-color: var(--theme-border-color, rgba(255, 255, 255, 0.1));
    }

    .initials-circle.player-profile-image {
        background-color: var(--theme-surface-2, #334155);
        border-color: var(--theme-border-color, rgba(255, 255, 255, 0.1));
    }
}
