/* Commit Complexity Analysis Styles */

.complexity-card {
    border-left: 4px solid var(--v2-accent);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.complexity-stats-card {
    border-left: 4px solid var(--v2-info);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recent-analyses-card {
    border-left: 4px solid var(--v2-success);
    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 var(--v2-border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: var(--v2-surface-2);
    transition: all 0.2s ease;
}

.impact-commit-item:hover {
    background: var(--v2-border);
    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: var(--v2-surface);
    transition: all 0.2s ease;
    border: 1px solid var(--v2-border) !important;
}

.recommendation-item:hover {
    background: var(--v2-surface-2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--v2-border) !important;
}

.recommendation-content .alert {
    background-color: var(--v2-info-bg);
    border-color: var(--v2-info-border);
    color: var(--v2-info);
}

.recommendation-content .alert i {
    color: var(--v2-info);
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title {
    color: var(--v2-text-bright);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.dashboard-actions .btn {
    border-radius: 6px;
    font-weight: 500;
}

/* Progress Circle */
.progress {
    background-color: var(--v2-border);
}

.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: var(--v2-success);
    border-radius: 2px;
    min-height: 2px;
    transition: all 0.2s ease;
}

.weekly-bar:hover {
    background: var(--v2-info);
    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: var(--v2-surface-2);
    border-bottom: 1px solid var(--v2-border);
    border-radius: 12px 12px 0 0 !important;
}

.card-title {
    color: var(--v2-text-bright);
    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: var(--v2-surface-2);
    border-bottom: 2px solid var(--v2-border);
    font-weight: 600;
    color: var(--v2-text-bright);
}

.table tbody tr:hover {
    background-color: var(--v2-surface-2);
}

/* 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: var(--v2-success);
}

.complexity-moyenne {
    color: var(--v2-info);
}

.complexity-elevee {
    color: var(--v2-warning);
}

.complexity-critique {
    color: var(--v2-error);
}

.commit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.commit-id {
    font-family: var(--v2-font-mono);
    font-weight: bold;
    color: var(--v2-text-bright);
}

.impact-score .badge {
    font-size: 0.75em;
}

.commit-summary {
    font-size: 0.9em;
    color: var(--v2-text-bright);
    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: var(--v2-text-bright);
}

.stat-label {
    font-size: 0.8em;
    color: var(--v2-text-dim);
    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: var(--v2-text-bright);
}

.distribution-bar {
    flex: 1;
    height: 16px;
    background: var(--v2-border);
    border-radius: 8px;
    margin: 0 10px;
    overflow: hidden;
}

.distribution-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.distribution-count {
    min-width: 30px;
    text-align: right;
    font-size: 0.8em;
    color: var(--v2-text-dim);
}

/* 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 var(--v2-border);
    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: var(--v2-text-bright);
    margin-bottom: 8px;
    line-height: 1.4;
}

.analysis-recommendations {
    background: var(--v2-info-bg);
    border-left: 3px solid var(--v2-info);
    padding: 8px 12px;
    margin: 8px 0;
    border-radius: 4px;
}

.analysis-footer {
    font-size: 0.8em;
    color: var(--v2-text-dim);
}

/* 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: var(--v2-accent) !important;
}

.bg-purple {
    background-color: var(--v2-accent) !important;
}

.bg-outline-primary {
    background-color: transparent;
    border: 1px solid var(--v2-accent);
    color: var(--v2-accent);
}

/* Animation for loading states */
.complexity-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: var(--v2-text-dim);
}

.complexity-loading i {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
