/* Stats Button & Callout Styles */

.stats-btn {
    font-size: 1.2rem;
    margin-bottom: 8px;
    /* Spacing between buttons */
}

.stats-btn.active {
    background-color: var(--primary-color, #18A0FB);
    color: white;
    border-color: var(--primary-color, #18A0FB);
    opacity: 1;
}

.stats-callout {
    position: absolute;
    /* Position to the left of controls to avoid overlapping */
    right: 80px;
    bottom: 20px;
    width: 300px;
    background: #000000;
    border: 1px solid var(--border-color, #333);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 16px;
    color: var(--text-primary, #fff);
    z-index: 1000;

    /* Animation */
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;

    /* Initial state hidden */
    display: none;
}

.stats-callout.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stats-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.close-stats-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #888);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
}

.close-stats-btn:hover {
    color: var(--text-primary, #fff);
}

.stats-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.stat-label {
    color: var(--text-secondary, #ccc);
}

.stat-value {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    color: var(--text-primary, #fff);
}

.stat-divider {
    height: 1px;
    background: var(--border-color, #333);
    margin: 8px 0;
}

.stat-group h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-tertiary, #666);
    letter-spacing: 0.5px;
}

.risk-meter {
    height: 6px;
    width: 100%;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    margin-bottom: 8px;
}

.risk-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.risk-bar.high {
    background-color: #EF5350;
    /* Red */
}

.risk-bar.medium {
    background-color: #FFCA28;
    /* Amber */
}

.risk-bar.low {
    background-color: #66BB6A;
    /* Green */
}

.risk-high .stat-value {
    color: #EF5350;
}

.risk-medium .stat-value {
    color: #FFCA28;
}

.risk-low .stat-value {
    color: #66BB6A;
}

.stat-subtext {
    font-size: 11px;
    color: var(--text-tertiary, #666);
    margin-left: 8px;
}