/**
 * Custom Styles for Unit Testing Report Dashboard
 */

/* View Mode Switcher */
.btn-group .btn-check:checked + .btn {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

/* Trend Indicators */
.trend-indicators {
    font-size: 0.85rem;
}

.trend-item {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.trend-label {
    font-weight: 600;
    color: #6c757d;
    min-width: 1.5rem;
    flex-shrink: 0;
}

.trend-item > span:not(.trend-label):not(.trend-icon) {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    line-height: 1.4;
}

.trend-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.25rem;
    font-size: 0.875rem;
    line-height: 1;
    min-width: 1rem;
}

.trend-icon.trend-up::before {
    content: '↑';
    color: #198754;
    font-weight: bold;
    display: inline-block;
}

.trend-icon.trend-down::before {
    content: '↓';
    color: #dc3545;
    font-weight: bold;
    display: inline-block;
}

/* Metric Cards in Cards View */
.metric-card {
    text-align: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.metric-card:hover {
    background-color: #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.metric-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: bold;
    color: #212529;
    margin-bottom: 0.25rem;
}

.metric-trend {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    line-height: 1.3;
}

/* Table View Enhancements */
.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    vertical-align: middle;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Card Header Styling */
.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
    
    .trend-indicators {
        font-size: 0.75rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
}

/* Chart Container */
#coverageChart {
    max-height: 400px;
}

/* Empty State */
.text-muted {
    font-style: italic;
}

/* Filter Section */
.card .card-body {
    padding: 1.5rem;
}

/* Success and Danger Colors for Trends */
.text-success {
    color: #198754 !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Ensure proper spacing */
.container {
    padding-bottom: 2rem;
}

/* Clickable table rows and cards */
.table-row-clickable:hover {
    background-color: #f8f9fa !important;
}

.card-clickable {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Info icon in table header */
th .bi-info-circle {
    cursor: help;
    font-size: 1rem;
    vertical-align: middle;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

th .bi-info-circle:hover {
    opacity: 1;
}

