-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHealthBadge.css
More file actions
86 lines (76 loc) · 2.36 KB
/
HealthBadge.css
File metadata and controls
86 lines (76 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/* In the name of God, the Merciful, the Compassionate */
/* Executive Health Badge — single 0-100 score with severity colour + trend arrow.
* Designed to slot into NavMenu (full bar) or compact in MainLayout header. */
.health-badge {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
border-radius: 10px;
background: var(--bg-panel);
border: 1px solid var(--border);
font-size: 12px;
line-height: 1;
cursor: default;
transition: background 120ms, border-color 120ms;
}
.health-badge-score {
font-weight: 700;
font-size: 14px;
color: var(--text-primary);
}
.health-badge-trend {
display: inline-flex;
align-items: center;
font-size: 11px;
}
.health-badge-label {
font-size: 11px;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.5px;
}
/* Severity colour bands — left-edge accent and tinted background */
.health-badge.sev-healthy {
border-color: rgba(34, 197, 94, 0.4);
background: rgba(34, 197, 94, 0.08);
}
.health-badge.sev-healthy .health-badge-score { color: #4ade80; }
.health-badge.sev-warning {
border-color: rgba(245, 158, 11, 0.45);
background: rgba(245, 158, 11, 0.10);
}
.health-badge.sev-warning .health-badge-score { color: #fcd34d; }
.health-badge.sev-critical {
border-color: rgba(239, 68, 68, 0.5);
background: rgba(239, 68, 68, 0.12);
/* Subtle pulse so a critical aggregate is hard to miss */
animation: healthBadgePulse 2.4s ease-in-out infinite;
}
.health-badge.sev-critical .health-badge-score { color: #fca5a5; }
.health-badge.sev-unknown {
opacity: 0.65;
}
@keyframes healthBadgePulse {
0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
50% { box-shadow: 0 0 8px 1px rgba(239, 68, 68, 0.35); }
}
/* Rate-limit badge — only rendered while throttling is active.
* Amber colour to distinguish from health-critical red. */
.ratelimit-badge {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
border-radius: 10px;
background: rgba(245, 158, 11, 0.10);
border: 1px solid rgba(245, 158, 11, 0.45);
color: #fcd34d;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
cursor: default;
animation: healthBadgePulse 2.4s ease-in-out infinite;
}
.ratelimit-badge i { font-size: 12px; }