/* Customer Profile Links - Generic Styling */

/* Base profile link styles */
.customer-profile-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.customer-profile-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.customer-profile-link:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Profile link with icon */
.customer-profile-link .fas {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Avatar link styles */
.avatar-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 50%;
    overflow: hidden;
}

.avatar-link:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.avatar-link:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Customer card styles */
.customer-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.customer-card:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

.customer-card-avatar {
    flex-shrink: 0;
}

.customer-card-info {
    flex: 1;
    min-width: 0;
}

.customer-card-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-card-stats {
    font-size: 0.9em;
    color: #666;
}

.card-profile-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.card-profile-link:hover {
    color: #007bff;
    text-decoration: underline;
}

/* Avatar placeholder styles */
.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.avatar-placeholder .fas {
    color: #6c757d;
}

/* Context-specific styles */

/* In tables */
.table-cell .customer-profile-link {
    font-size: inherit;
    font-weight: inherit;
}

.table-cell .customer-profile-link:hover {
    background-color: rgba(0, 123, 255, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
}

/* In badges/champion sections */
.champion-badge-name .customer-profile-link {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.champion-badge-name .customer-profile-link:hover {
    color: #f8f9fa;
    text-decoration: underline;
}

/* In TOP 5 sections */
.top5-player-name .customer-profile-link {
    color: #333;
    font-weight: 600;
}

.top5-player-name .customer-profile-link:hover {
    color: #007bff;
}

/* In tournament brackets */
.tournament-player .customer-profile-link {
    font-size: 0.9em;
    color: #495057;
}

.tournament-player .customer-profile-link:hover {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    padding: 1px 3px;
    border-radius: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .customer-card {
        padding: 8px;
        gap: 8px;
    }
    
    .customer-card-avatar img,
    .customer-card-avatar .avatar-placeholder {
        width: 40px !important;
        height: 40px !important;
    }
    
    .customer-card-name {
        font-size: 0.9em;
    }
    
    .customer-card-stats {
        font-size: 0.8em;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .customer-card {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .customer-card-name {
        color: #e2e8f0;
    }
    
    .customer-card-stats {
        color: #a0aec0;
    }
    
    .avatar-placeholder {
        background: #4a5568;
        border-color: #718096;
    }
    
    .avatar-placeholder .fas {
        color: #a0aec0;
    }
}

/* Animation for new profile links */
.customer-profile-link.new-profile {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* Loading state */
.customer-profile-link.loading {
    opacity: 0.6;
    pointer-events: none;
}

.customer-profile-link.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 4px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
