/**
 * Statistics Panel Styles - Compact Right Sidebar
 * Real-time statistics dashboard
 */

/* Stats Panel Container */
#statsPanel {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 8px;
    z-index: 100;
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    box-sizing: border-box;
}

#statsPanel.hidden {
    display: none;
}

/* Stats Header */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-header h4 {
    margin: 0;
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 600;
}

.stats-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
}

.stats-toggle:hover {
    color: #fff;
}

/* Stats Content */
.stats-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Stats Groups - Compact */
.stats-group {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    padding: 6px;
}

.stats-group-title {
    font-size: 9px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

/* Stats Rows - Inline */
.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.stats-row:last-child {
    margin-bottom: 0;
}

.stats-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
}

.stats-value {
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    font-family: 'Consolas', monospace;
}

/* Special value colors */
.stats-value.positive {
    color: var(--color-primary);
}

.stats-value.warning {
    color: var(--color-warning);
}

.stats-value.danger {
    color: var(--color-danger);
}

/* Speed Graph Canvas - Mini */
#statsCanvas {
    width: 100%;
    height: 35px;
    border-radius: 4px;
    margin-top: 4px;
}

/* Safety Score Badge - Compact */
.safety-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
    padding: 6px;
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.2), rgba(var(--color-primary-rgb), 0.05));
    border-radius: 6px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
}

.safety-score-icon {
    font-size: 14px;
}

.safety-score-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
    font-family: 'Consolas', monospace;
}

/* Collapsed state */
#statsPanel.collapsed .stats-content {
    display: none;
}

#statsPanel.collapsed {
    width: auto;
    padding: 6px 10px;
}

/* Events Section - Integrated into Stats */
.events-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 4px;
}

.event-badge {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-size: 9px;
}

.event-badge .icon {
    font-size: 10px;
}

.event-badge .count {
    color: #fff;
    font-weight: 600;
}