/* Commit Complexity Analysis Styles */

.complexity-card {
    border-left: 4px solid #6f42c1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.complexity-stats-card {
    border-left: 4px solid #17a2b8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recent-analyses-card {
    border-left: 4px solid #28a745;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* High Impact Commits */
.high-impact-commits {
    max-height: 400px;
    overflow-y: auto;
}

.impact-commit-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.impact-commit-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Commit Recommendations */
.commit-recommendations {
    max-height: 500px;
    overflow-y: auto;
}

.recommendation-item {
    background: #ffffff;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef !important;
}

.recommendation-item:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #dee2e6 !important;
}

.recommendation-content .alert {
    background-color: #e7f3ff;
    border-color: #b3d9ff;
    color: #0c5460;
}

.recommendation-content .alert i {
    color: #17a2b8;
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.dashboard-actions .btn {
    border-radius: 6px;
    font-weight: 500;
}

/* Progress Circle */
.progress {
    background-color: #e9ecef;
}

.progress.circular {
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

/* Weekly Metrics Mini Chart */
.weekly-metrics-mini {
    display: flex;
    align-items: end;
    gap: 2px;
    height: 20px;
}

.weekly-bar {
    width: 8px;
    background: linear-gradient(to top, #28a745, #20c997);
    border-radius: 2px;
    min-height: 2px;
    transition: all 0.2s ease;
}

.weekly-bar:hover {
    background: linear-gradient(to top, #20c997, #17a2b8);
    transform: scaleY(1.1);
}

/* Card Enhancements */
.card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0 !important;
}

.card-title {
    color: #495057;
    font-weight: 600;
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.alert-heading {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Badge Enhancements */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

/* Table Enhancements */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Progress Bar in Table */
.progress {
    border-radius: 4px;
}

.progress-bar {
    border-radius: 4px;
}

/* Responsive Adjustments */
@@media (max-width: 768px) {
    .dashboard-header .d-flex {
        flex-direction: column;
        align-items: start !important;
    }

    .dashboard-actions {
        margin-top: 1rem;
        width: 100%;
    }

    .dashboard-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .weekly-metrics-mini {
        display: none;
    }
}

/* Loading States */
.spinner-border {
    border-width: 3px;
}

/* Animation for cards */
@@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease-out;
}

/* Complexity Level Colors */
.complexity-faible {
    color: #28a745;
}

.complexity-moyenne {
    color: #17a2b8;
}

.complexity-elevee {
    color: #ffc107;
}

.complexity-critique {
    color: #dc3545;
}

.commit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.commit-id {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #495057;
}

.impact-score .badge {
    font-size: 0.75em;
}

.commit-summary {
    font-size: 0.9em;
    color: #495057;
    margin-bottom: 8px;
    line-height: 1.4;
}

.commit-tags {
    margin-bottom: 6px;
}

.commit-tags .badge {
    font-size: 0.7em;
    padding: 2px 6px;
}

.commit-complexity {
    font-size: 0.8em;
}

/* Complexity Statistics */
.complexity-stats {
    padding: 10px 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #495057;
}

.stat-label {
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 4px;
}

/* Complexity Distribution */
.complexity-distribution {
    margin-top: 15px;
}

.distribution-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.distribution-label {
    min-width: 80px;
    font-size: 0.85em;
    color: #495057;
}

.distribution-bar {
    flex: 1;
    height: 16px;
    background: #e9ecef;
    border-radius: 8px;
    margin: 0 10px;
    overflow: hidden;
}

.distribution-fill {
    height: 100%;
    transition: width 0.3s ease;
}

/* Dark Theme Support for Complexity Analysis */
[data-bs-theme="dark"] .complexity-card,
[data-bs-theme="dark"] .complexity-stats-card,
[data-bs-theme="dark"] .recent-analyses-card {
    background-color: var(--radiance-card-bg);
    color: var(--radiance-text-primary);
    box-shadow: 0 2px 4px var(--radiance-card-shadow);
}

[data-bs-theme="dark"] .impact-commit-item {
    background: var(--radiance-card-bg);
    border-color: var(--radiance-border-color);
    color: var(--radiance-text-primary);
}

[data-bs-theme="dark"] .impact-commit-item:hover {
    background: var(--radiance-input-bg);
    box-shadow: 0 2px 8px var(--radiance-card-shadow);
}

[data-bs-theme="dark"] .commit-id {
    color: var(--radiance-text-primary);
}

[data-bs-theme="dark"] .commit-summary {
    color: var(--radiance-text-secondary);
}

[data-bs-theme="dark"] .stat-value {
    color: var(--radiance-text-primary);
}

[data-bs-theme="dark"] .stat-label {
    color: var(--radiance-text-muted);
}

[data-bs-theme="dark"] .distribution-label {
    color: var(--radiance-text-primary);
}

[data-bs-theme="dark"] .distribution-bar {
    background: var(--radiance-input-bg);
}

[data-bs-theme="dark"] .progress {
    background-color: var(--radiance-input-bg);
}

[data-bs-theme="dark"] .card {
    background-color: var(--radiance-card-bg);
    color: var(--radiance-text-primary);
}

.distribution-count {
    min-width: 30px;
    text-align: right;
    font-size: 0.8em;
    color: #6c757d;
}

/* Common Tags */
.common-tags {
    margin-top: 15px;
}

.tag-cloud .badge {
    font-size: 0.75em;
    padding: 4px 8px;
}

/* Recent Analyses */
.recent-analyses-list {
    max-height: 500px;
    overflow-y: auto;
}

.analysis-item {
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
}

.analysis-item:last-child {
    border-bottom: none;
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.commit-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-name {
    font-size: 0.85em;
}

.analysis-scores {
    display: flex;
    gap: 5px;
}

.analysis-scores .badge {
    font-size: 0.75em;
}

.analysis-summary {
    font-size: 0.9em;
    color: #495057;
    margin-bottom: 8px;
    line-height: 1.4;
}

.analysis-recommendations {
    background: #e7f3ff;
    border-left: 3px solid #17a2b8;
    padding: 8px 12px;
    margin: 8px 0;
    border-radius: 4px;
}

.analysis-footer {
    font-size: 0.8em;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .commit-header,
    .analysis-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .analysis-scores {
        align-self: flex-end;
    }
    
    .distribution-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .distribution-bar {
        width: 100%;
        margin: 0;
    }
}

/* Color Variants */
.text-purple {
    color: #6f42c1 !important;
}

.bg-purple {
    background-color: #6f42c1 !important;
}

.bg-outline-primary {
    background-color: transparent;
    border: 1px solid #007bff;
    color: #007bff;
}

/* Animation for loading states */
.complexity-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6c757d;
}

.complexity-loading i {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
