/* Score Grouping Enhanced Styles */
/* This file provides consistent styling for AI and Community score groups across all pages */

:root {
    --ai-primary: #007bff;
    --ai-secondary: #0056b3;
    --community-primary: #17a2b8;
    --community-secondary: #138496;
    --success-primary: #28a745;
    --success-secondary: #1e7e34;
    --warning-primary: #ffc107;
    --warning-secondary: #e0a800;
    --danger-primary: #dc3545;
    --danger-secondary: #c82333;
}

/* AI Scores Group */
.ai-scores-group {
    position: relative;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.08), rgba(0, 123, 255, 0.04));
    border: 1px solid rgba(0, 123, 255, 0.15);
    border-left: 4px solid var(--ai-primary);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.ai-scores-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ai-primary), var(--ai-secondary));
    opacity: 0.6;
}

.ai-scores-group:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.15);
    border-color: rgba(0, 123, 255, 0.25);
}

/* Community Scores Group */
.user-scores-group {
    position: relative;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.08), rgba(23, 162, 184, 0.04));
    border: 1px solid rgba(23, 162, 184, 0.15);
    border-left: 4px solid var(--community-primary);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.user-scores-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--community-primary), var(--community-secondary));
    opacity: 0.6;
}

.user-scores-group:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.15);
    border-color: rgba(23, 162, 184, 0.25);
}

/* Badge Enhancements */
.ai-scores-group .badge,
.user-scores-group .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ai-scores-group .badge:hover,
.user-scores-group .badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Group Labels */
.ai-scores-group > .badge.bg-light,
.user-scores-group > .badge.bg-light {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #495057 !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: inline-block;
    position: relative;
}

.ai-scores-group > .badge.bg-light::after {
    content: '🤖';
    margin-left: 0.3rem;
    font-size: 0.8rem;
}

.user-scores-group > .badge.bg-light::after {
    content: '👥';
    margin-left: 0.3rem;
    font-size: 0.8rem;
}

/* Enhanced Badge Colors with Gradients */
.ai-scores-group .badge.bg-primary {
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary)) !important;
    border: none;
    color: white;
}

.ai-scores-group .badge.bg-success {
    background: linear-gradient(135deg, var(--success-primary), var(--success-secondary)) !important;
    color: white;
}

.ai-scores-group .badge.bg-warning {
    background: linear-gradient(135deg, var(--warning-primary), var(--warning-secondary)) !important;
    color: #212529 !important;
    font-weight: 700;
}

.ai-scores-group .badge.bg-danger {
    background: linear-gradient(135deg, var(--danger-primary), var(--danger-secondary)) !important;
    color: white;
}

.user-scores-group .badge.bg-info {
    background: linear-gradient(135deg, var(--community-primary), var(--community-secondary)) !important;
    border: none;
    color: white;
}

/* No Comments Styling */
.user-scores-group .badge.bg-light.text-muted {
    background: repeating-linear-gradient(
        45deg,
        #f8f9fa,
        #f8f9fa 10px,
        #e9ecef 10px,
        #e9ecef 20px
    ) !important;
    color: #6c757d !important;
    font-style: italic;
}

/* Score Badge Improvements for Lists */
.score-badge {
    font-weight: 600;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.score-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.score-badge:hover::before {
    left: 100%;
}

.score-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-scores-group,
    .user-scores-group {
        padding: 0.6rem;
        margin-bottom: 0.6rem;
    }

    .ai-scores-group .badge,
    .user-scores-group .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
        margin-right: 0.3rem;
        margin-bottom: 0.3rem;
    }

    .ai-scores-group > .badge.bg-light::after,
    .user-scores-group > .badge.bg-light::after {
        display: none;
    }
}

@media (max-width: 576px) {
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.5rem !important;
    }

    .ai-scores-group,
    .user-scores-group {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .ai-scores-group .badge,
    .user-scores-group .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ai-scores-group {
        background: linear-gradient(135deg, rgba(0, 123, 255, 0.15), rgba(0, 123, 255, 0.08));
        border-color: rgba(0, 123, 255, 0.3);
    }

    .user-scores-group {
        background: linear-gradient(135deg, rgba(23, 162, 184, 0.15), rgba(23, 162, 184, 0.08));
        border-color: rgba(23, 162, 184, 0.3);
    }

    .ai-scores-group > .badge.bg-light,
    .user-scores-group > .badge.bg-light {
        background: rgba(33, 37, 41, 0.9) !important;
        color: #f8f9fa !important;
        border-color: rgba(255, 255, 255, 0.2);
    }
}

/* Print styles */
@media print {
    .ai-scores-group,
    .user-scores-group {
        box-shadow: none;
        border: 1px solid #000;
        background: none !important;
    }

    .ai-scores-group::before,
    .user-scores-group::before {
        display: none;
    }

    .badge {
        box-shadow: none !important;
        border: 1px solid #000 !important;
        background: #fff !important;
        color: #000 !important;
    }
}
