/* User Cards AJAX Styles */

/* Grid Layout */
.user-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

@media (max-width: 768px) {
    .user-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
        padding: 1rem 0;
    }
}

/* User Card Styles */
.user-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-in-out;
}

.user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.user-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.user-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Avatar Section */
.user-card-avatar-section {
    padding: 2rem 2rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.user-card-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.user-card-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f8f9fa;
}

/* Info Section */
.user-card-info {
    padding: 1.5rem 2rem 2rem;
}

.user-card-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: #1f2937;
    line-height: 1.3;
}

.user-card-type {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.user-card-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1.5rem;
}

.user-card-location-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Stats Section */
.user-card-stats {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.user-card-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.user-card-stat-icon {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
}

/* Bio Section */
.user-card-bio {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0 0 1rem;
    font-style: italic;
}

/* Loader Styles */
.user-cards-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: none;
}

/* Loading States */
.user-cards-grid.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Fade-in Animation for New Cards */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty State */
.user-cards-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.user-cards-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #374151;
}

.user-cards-empty p {
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Error State */
.user-cards-error {
    text-align: center;
    padding: 4rem 2rem;
    color: #ef4444;
}

.user-cards-error h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.user-cards-error p {
    font-size: 1rem;
    margin-bottom: 2rem;
}

.user-cards-error button {
    padding: 0.75rem 1.5rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1rem;
}

.user-cards-error button:hover {
    background: #dc2626;
}

/* Alternative Avatar Gradients */
.user-card:nth-child(3n+1) .user-card-avatar-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.user-card:nth-child(3n+2) .user-card-avatar-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.user-card:nth-child(3n+3) .user-card-avatar-section {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.user-card:nth-child(5n+1) .user-card-avatar-section {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.user-card:nth-child(7n+1) .user-card-avatar-section {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .user-card-info {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .user-card-avatar-section {
        padding: 1.5rem 1.5rem 0.75rem;
    }
    
    .user-card-avatar {
        width: 60px;
        height: 60px;
    }
    
    .user-card-name {
        font-size: 1.125rem;
    }
    
    .user-card-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user-card-stat {
        justify-content: center;
    }
}
