/* ============================================
   EXPERT BADGES & HIGHLIGHTING
   ============================================ */

.expert-indicator {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.03), rgba(236, 72, 153, 0.03));
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

/* ========================================
   EXPERT LEVEL
   ======================================== */

.expert-level {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.875rem;
    width: fit-content;
}

.level-icon {
    font-size: 1rem;
}

.level-legend {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.level-expert {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.level-specialist {
    background: linear-gradient(135deg, #EC4899, #DB2777);
    color: white;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.level-contributor {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.level-member {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ========================================
   EXPERT STATS
   ======================================== */

.expert-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 2px solid rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #8B5CF6;
}

.stat-item svg {
    color: #8B5CF6;
}

.rank-badge {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    border-color: transparent;
}

.rank-badge::before {
    content: '🏆';
    margin-right: 0.25rem;
}

/* ========================================
   USER BADGES
   ======================================== */

.user-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #8B5CF6;
    transition: all 0.2s ease;
    cursor: help;
}

.badge-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
    border-color: #8B5CF6;
}

.badge-icon {
    font-size: 0.875rem;
}

.badge-more {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #8B5CF6;
    cursor: help;
}

/* ========================================
   EXPERT ANSWER HIGHLIGHTING
   ======================================== */

.ap-answer.expert-answer {
    border-left: 4px solid #8B5CF6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.02), transparent);
}

.ap-answer.expert-answer::before {
    content: '✨ Expert Answer';
    display: block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 8px 8px 0 0;
    margin: -1rem -1rem 1rem -1rem;
}

/* ========================================
   ANSWER QUALITY INDICATORS
   ======================================== */

.answer-quality-score {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #065F46;
}

.answer-quality-score svg {
    color: #10B981;
}

.answer-quality-high {
    border-color: #10B981;
}

.answer-quality-medium {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
    border-color: rgba(59, 130, 246, 0.3);
    color: #1E40AF;
}

.answer-quality-medium svg {
    color: #3B82F6;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .expert-indicator {
        padding: 0.875rem;
    }

    .expert-stats {
        gap: 0.5rem;
    }

    .stat-item {
        padding: 0.25rem 0.625rem;
        font-size: 0.75rem;
    }

    .badge-item {
        padding: 0.25rem 0.625rem;
    }
}

@media (max-width: 480px) {
    .expert-level {
        font-size: 0.8125rem;
    }

    .level-name {
        display: none;
    }

    .level-icon {
        font-size: 1.25rem;
    }

    .user-badges {
        gap: 0.375rem;
    }

    .badge-name {
        display: none;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.badge-item:focus,
.badge-more:focus {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .badge-item {
        transition: none;
    }

    .badge-item:hover {
        transform: none;
    }
}

