barua-ui 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,802 @@
1
+ /* ==========================================================================
2
+ Barua UI — Content
3
+ Card, List, Description List, Table, Data Grid, Tree, Timeline, Feed,
4
+ Accordion/Disclosure, Badge, Tag, Chip, Avatar, Icon, Image, Code Block,
5
+ Quote, Statistic, Empty State.
6
+ ========================================================================== */
7
+
8
+ @layer components {
9
+ /* ---- Card ---------------------------------------------------------------- */
10
+ .b-card {
11
+ background: var(--b-surface);
12
+ border: 1px solid var(--b-separator);
13
+ border-radius: var(--b-radius-xl);
14
+ box-shadow: var(--b-shadow-xs);
15
+ overflow: hidden;
16
+ }
17
+ .b-card__body { padding: var(--b-space-5); }
18
+ .b-card__header {
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: space-between;
22
+ gap: var(--b-space-3);
23
+ padding: var(--b-space-4) var(--b-space-5);
24
+ border-bottom: 1px solid var(--b-separator);
25
+ }
26
+ .b-card__footer {
27
+ display: flex;
28
+ align-items: center;
29
+ gap: var(--b-space-2);
30
+ padding: var(--b-space-4) var(--b-space-5);
31
+ border-top: 1px solid var(--b-separator);
32
+ background: var(--b-fill-quaternary);
33
+ }
34
+ .b-card__title { font-size: var(--b-text-headline); font-weight: var(--b-weight-semibold); }
35
+ .b-card__subtitle { font-size: var(--b-text-footnote); color: var(--b-text-secondary); }
36
+ .b-card__media { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
37
+ .b-card__eyebrow {
38
+ font-size: var(--b-text-caption);
39
+ font-weight: var(--b-weight-semibold);
40
+ text-transform: uppercase;
41
+ letter-spacing: var(--b-tracking-wide);
42
+ color: var(--b-text-secondary);
43
+ }
44
+
45
+ /* ---- Card family (iOS varieties) ----------------------------------------
46
+ --media-overlay : App Store "Today" story card — text over full-bleed art
47
+ --icon : feature card led by an icon tile
48
+ (grouped list) : .b-card--flush + .b-list--plain = iOS Settings group
49
+ (app row) : compose __art + meta + tinted pill button
50
+ --------------------------------------------------------------------------- */
51
+ .b-card--media-overlay {
52
+ position: relative;
53
+ display: flex;
54
+ flex-direction: column;
55
+ justify-content: flex-end;
56
+ min-height: 18rem;
57
+ border-radius: var(--b-radius-2xl);
58
+ border: none;
59
+ color: #fff;
60
+ box-shadow: var(--b-elevation-3);
61
+ }
62
+ .b-card--media-overlay > .b-card__media {
63
+ position: absolute;
64
+ inset: 0;
65
+ height: 100%;
66
+ aspect-ratio: auto;
67
+ }
68
+ .b-card--media-overlay > .b-card__overlay {
69
+ position: relative;
70
+ padding: var(--b-space-5);
71
+ background: linear-gradient(transparent, rgba(8, 10, 16, 0.62) 70%);
72
+ }
73
+ .b-card--media-overlay .b-card__eyebrow { color: rgba(255, 255, 255, 0.75); }
74
+ .b-card--media-overlay .b-card__title {
75
+ font-size: var(--b-text-title2);
76
+ line-height: var(--b-leading-tight);
77
+ letter-spacing: var(--b-tracking-tight);
78
+ }
79
+ .b-card--media-overlay .b-card__subtitle { color: rgba(255, 255, 255, 0.78); }
80
+
81
+ .b-card--icon .b-card__body {
82
+ display: flex;
83
+ flex-direction: column;
84
+ align-items: flex-start;
85
+ gap: var(--b-space-3);
86
+ }
87
+
88
+ .b-card--flush .b-card__body { padding: 0; }
89
+ .b-card--flush .b-list { border: none; border-radius: 0; box-shadow: none; }
90
+
91
+ .b-card__art {
92
+ width: 4rem;
93
+ height: 4rem;
94
+ flex: none;
95
+ border-radius: var(--b-radius-lg);
96
+ object-fit: cover;
97
+ background: var(--b-fill-tertiary);
98
+ box-shadow: inset 0 0 0 0.5px var(--b-hairline);
99
+ }
100
+
101
+ .b-card--glass {
102
+ position: relative;
103
+ background: var(--b-material-regular-bg);
104
+ -webkit-backdrop-filter: var(--b-glass);
105
+ backdrop-filter: var(--b-glass);
106
+ border-color: light-dark(rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.05));
107
+ box-shadow: var(--b-glass-shadow);
108
+ overflow: hidden;
109
+ }
110
+ .b-card--glass::before {
111
+ content: "";
112
+ position: absolute;
113
+ inset: 0;
114
+ border-radius: inherit;
115
+ box-shadow: var(--b-glass-edge);
116
+ pointer-events: none;
117
+ }
118
+ /* Glass clear — transparent, for media-rich backgrounds */
119
+ .b-card--glass-clear {
120
+ position: relative;
121
+ background: light-dark(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
122
+ -webkit-backdrop-filter: blur(var(--b-blur-md)) saturate(1.5);
123
+ backdrop-filter: blur(var(--b-blur-md)) saturate(1.5);
124
+ border-color: light-dark(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.04));
125
+ box-shadow: var(--b-glass-shadow);
126
+ overflow: hidden;
127
+ }
128
+ .b-card--glass-clear::before {
129
+ content: "";
130
+ position: absolute;
131
+ inset: 0;
132
+ border-radius: inherit;
133
+ box-shadow: var(--b-glass-edge);
134
+ pointer-events: none;
135
+ }
136
+ /* Glass prominent — tinted accent glass */
137
+ .b-card--glass-prominent {
138
+ position: relative;
139
+ background: var(--b-glass-tint);
140
+ -webkit-backdrop-filter: var(--b-glass);
141
+ backdrop-filter: var(--b-glass);
142
+ border-color: light-dark(rgba(10, 122, 255, 0.12), rgba(10, 132, 255, 0.16));
143
+ box-shadow: var(--b-glass-shadow);
144
+ overflow: hidden;
145
+ }
146
+ .b-card--glass-prominent::before {
147
+ content: "";
148
+ position: absolute;
149
+ inset: 0;
150
+ border-radius: inherit;
151
+ box-shadow: var(--b-glass-edge);
152
+ pointer-events: none;
153
+ }
154
+ /* Compact density — widget-like cards for dashboards */
155
+ .b-card--compact .b-card__body { padding: var(--b-space-3) var(--b-space-4); }
156
+ .b-card--compact .b-card__header { padding: var(--b-space-3) var(--b-space-4); }
157
+ .b-card--compact .b-stat__value { font-size: var(--b-text-title3); }
158
+
159
+ /* Works on any background: the veil is neutral, so the card sits one
160
+ readable step off whatever is behind it rather than imposing a value.
161
+ Pair with a wallpaper scope so the ink follows the backdrop too. */
162
+ .b-card--neutral {
163
+ background: var(--b-material-neutral-bg);
164
+ -webkit-backdrop-filter: blur(var(--b-blur-lg)) saturate(1.1);
165
+ backdrop-filter: blur(var(--b-blur-lg)) saturate(1.1);
166
+ border-color: var(--b-material-neutral-edge);
167
+ box-shadow: var(--b-glass-edge), var(--b-elevation-2);
168
+ }
169
+ .b-card--elevated { border: none; box-shadow: var(--b-elevation-3); }
170
+ .b-card--flat { box-shadow: none; }
171
+ .b-card--interactive {
172
+ cursor: pointer;
173
+ transition: translate var(--b-duration-normal) var(--b-ease-out),
174
+ box-shadow var(--b-duration-normal) var(--b-ease-out);
175
+ }
176
+ .b-card--interactive:hover {
177
+ translate: 0 -2px;
178
+ box-shadow: var(--b-elevation-3);
179
+ }
180
+ .b-card--accent { border-top: 3px solid var(--b-color-accent); }
181
+
182
+ /* ---- List / List Item ------------------------------------------------------ */
183
+ .b-list {
184
+ list-style: none;
185
+ margin: 0;
186
+ padding: 0;
187
+ background: var(--b-surface);
188
+ border: 1px solid var(--b-separator);
189
+ border-radius: var(--b-radius-xl);
190
+ overflow: hidden;
191
+ }
192
+ .b-list--plain { background: none; border: none; border-radius: 0; }
193
+ .b-list-item {
194
+ display: flex;
195
+ align-items: center;
196
+ gap: var(--b-space-3);
197
+ padding: var(--b-space-3) var(--b-space-4);
198
+ font-size: var(--b-text-subheadline);
199
+ }
200
+ .b-list > .b-list-item + .b-list-item { border-top: 1px solid var(--b-separator); }
201
+ .b-list--inset-divider > .b-list-item + .b-list-item {
202
+ border-top: none;
203
+ position: relative;
204
+ }
205
+ .b-list--inset-divider > .b-list-item + .b-list-item::before {
206
+ content: "";
207
+ position: absolute;
208
+ top: 0;
209
+ inset-inline: var(--b-space-4) 0;
210
+ border-top: 1px solid var(--b-separator);
211
+ }
212
+ .b-list-item--interactive { cursor: pointer; transition: background var(--b-duration-fast); }
213
+ .b-list-item--interactive:hover { background: var(--b-fill-quaternary); }
214
+ .b-list-item.is-selected { background: var(--b-color-accent-soft); }
215
+ .b-list-item__leading { flex: none; display: flex; color: var(--b-text-secondary); }
216
+ .b-list-item__leading svg { width: 1.25rem; height: 1.25rem; }
217
+ .b-list-item__content { flex: 1; min-width: 0; }
218
+ .b-list-item__title { display: block; font-weight: var(--b-weight-medium); }
219
+ .b-list-item__subtitle {
220
+ display: block;
221
+ font-size: var(--b-text-footnote);
222
+ color: var(--b-text-secondary);
223
+ }
224
+ .b-list-item__trailing {
225
+ flex: none;
226
+ display: flex;
227
+ align-items: center;
228
+ gap: var(--b-space-2);
229
+ color: var(--b-text-tertiary);
230
+ font-size: var(--b-text-footnote);
231
+ }
232
+ .b-list-item__chevron { color: var(--b-text-quaternary); font-size: var(--b-text-callout); }
233
+
234
+
235
+ /* ---- GroupBox (SwiftUI GroupBox) ---------------------------------------- */
236
+ .b-groupbox {
237
+ padding: var(--b-space-4);
238
+ background: var(--b-fill-quaternary);
239
+ border: 1px solid var(--b-separator);
240
+ border-radius: var(--b-radius-lg);
241
+ }
242
+ .b-groupbox > .b-groupbox { background: var(--b-surface); }
243
+ .b-groupbox__label {
244
+ display: flex;
245
+ align-items: center;
246
+ gap: var(--b-space-2);
247
+ margin-block-end: var(--b-space-3);
248
+ font-size: var(--b-text-subheadline);
249
+ font-weight: var(--b-weight-semibold);
250
+ }
251
+ .b-groupbox__label svg { width: 1.1rem; height: 1.1rem; color: var(--b-color-accent-text); }
252
+
253
+ /* ---- Labeled Content (SwiftUI LabeledContent) ---------------------------- */
254
+ .b-labeled {
255
+ display: flex;
256
+ align-items: center;
257
+ justify-content: space-between;
258
+ gap: var(--b-space-4);
259
+ padding-block: var(--b-space-2);
260
+ font-size: var(--b-text-subheadline);
261
+ }
262
+ .b-labeled + .b-labeled { border-top: 1px solid var(--b-separator); }
263
+ .b-labeled__label { color: var(--b-text); font-weight: var(--b-weight-medium); flex: none; }
264
+ .b-labeled__label small { display: block; font-size: var(--b-text-caption); color: var(--b-text-tertiary); }
265
+ .b-labeled__value {
266
+ color: var(--b-text-secondary);
267
+ text-align: end;
268
+ min-width: 0;
269
+ overflow-wrap: anywhere;
270
+ }
271
+
272
+ /* ---- List section header / footer (iOS grouped captions) ----------------- */
273
+ .b-list__header {
274
+ padding: var(--b-space-2) var(--b-space-4) var(--b-space-1);
275
+ font-size: var(--b-text-footnote);
276
+ font-weight: var(--b-weight-semibold);
277
+ text-transform: uppercase;
278
+ letter-spacing: var(--b-tracking-wide);
279
+ color: var(--b-text-tertiary);
280
+ }
281
+ .b-list__footer {
282
+ padding: var(--b-space-1) var(--b-space-4) var(--b-space-2);
283
+ font-size: var(--b-text-footnote);
284
+ color: var(--b-text-tertiary);
285
+ }
286
+
287
+ /* ---- Description List ------------------------------------------------------- */
288
+ .b-dl {
289
+ display: grid;
290
+ grid-template-columns: max-content 1fr;
291
+ gap: var(--b-space-2) var(--b-space-6);
292
+ margin: 0;
293
+ }
294
+ .b-dl dt {
295
+ font-size: var(--b-text-footnote);
296
+ color: var(--b-text-secondary);
297
+ font-weight: var(--b-weight-medium);
298
+ }
299
+ .b-dl dd { margin: 0; font-size: var(--b-text-subheadline); }
300
+ .b-dl--stacked { grid-template-columns: 1fr; gap: var(--b-space-1); }
301
+ .b-dl--stacked dd { margin-block-end: var(--b-space-3); }
302
+
303
+ /* ---- Table / Data Grid ------------------------------------------------------- */
304
+ .b-table-wrap {
305
+ overflow-x: auto;
306
+ background: var(--b-surface);
307
+ border: 1px solid var(--b-separator);
308
+ border-radius: var(--b-radius-lg);
309
+ }
310
+ .b-table {
311
+ width: 100%;
312
+ border-collapse: collapse;
313
+ font-size: var(--b-text-footnote);
314
+ }
315
+ .b-table th {
316
+ padding: var(--b-space-3) var(--b-space-4);
317
+ text-align: start;
318
+ font-weight: var(--b-weight-semibold);
319
+ color: var(--b-text-secondary);
320
+ border-bottom: 1px solid var(--b-border);
321
+ white-space: nowrap;
322
+ background: var(--b-fill-quaternary);
323
+ }
324
+ .b-table td {
325
+ padding: var(--b-space-3) var(--b-space-4);
326
+ border-bottom: 1px solid var(--b-separator);
327
+ }
328
+ .b-table tbody tr:last-child td { border-bottom: none; }
329
+ .b-table tbody tr { transition: background var(--b-duration-fast); }
330
+ .b-table--hover tbody tr:hover { background: var(--b-fill-quaternary); }
331
+ .b-table--striped tbody tr:nth-child(even) { background: var(--b-fill-quaternary); }
332
+ .b-table tr.is-selected td { background: var(--b-color-accent-soft); }
333
+ .b-table--compact :is(th, td) { padding: var(--b-space-2) var(--b-space-3); }
334
+ .b-table__num { text-align: end; font-variant-numeric: tabular-nums; }
335
+
336
+ /* Sortable header */
337
+ .b-table__sort {
338
+ display: inline-flex;
339
+ align-items: center;
340
+ gap: var(--b-space-1);
341
+ background: none;
342
+ border: none;
343
+ padding: 0;
344
+ font: inherit;
345
+ color: inherit;
346
+ cursor: pointer;
347
+ }
348
+ .b-table__sort::after { content: "↕"; opacity: 0.4; font-size: 0.9em; }
349
+ .b-table__sort.is-asc::after { content: "↑"; opacity: 1; color: var(--b-color-accent-text); }
350
+ .b-table__sort.is-desc::after { content: "↓"; opacity: 1; color: var(--b-color-accent-text); }
351
+
352
+ /* Data grid extras — sticky header + row actions */
353
+ .b-datagrid { max-height: var(--b-datagrid-h, 26rem); overflow: auto; }
354
+ .b-datagrid .b-table th { position: sticky; top: 0; z-index: 1; background: var(--b-surface-2); }
355
+ .b-datagrid .b-table td .b-row-actions { visibility: hidden; }
356
+ .b-datagrid .b-table tr:hover .b-row-actions { visibility: visible; }
357
+
358
+ /* ---- Tree ---------------------------------------------------------------------- */
359
+ .b-tree { list-style: none; margin: 0; padding: 0; font-size: var(--b-text-subheadline); }
360
+ .b-tree .b-tree { padding-inline-start: var(--b-space-5); }
361
+ .b-tree-item > summary,
362
+ .b-tree-item__row {
363
+ display: flex;
364
+ align-items: center;
365
+ gap: var(--b-space-2);
366
+ padding: var(--b-space-1) var(--b-space-2);
367
+ border-radius: var(--b-radius-sm);
368
+ cursor: pointer;
369
+ list-style: none;
370
+ user-select: none;
371
+ }
372
+ .b-tree-item > summary::-webkit-details-marker { display: none; }
373
+ .b-tree-item > summary::before {
374
+ content: "›";
375
+ display: inline-block;
376
+ width: 1em;
377
+ color: var(--b-text-tertiary);
378
+ transition: rotate var(--b-duration-fast) var(--b-ease-standard);
379
+ }
380
+ .b-tree-item[open] > summary::before { rotate: 90deg; }
381
+ .b-tree-item__row { padding-inline-start: calc(var(--b-space-2) + 1em + var(--b-space-2)); }
382
+ .b-tree :is(summary, .b-tree-item__row):hover { background: var(--b-fill-tertiary); }
383
+ .b-tree .is-selected { background: var(--b-color-accent-soft); color: var(--b-color-accent-text); }
384
+ .b-tree svg { width: 1rem; height: 1rem; color: var(--b-text-secondary); }
385
+
386
+ /* ---- Timeline -------------------------------------------------------------------- */
387
+ .b-timeline { list-style: none; margin: 0; padding: 0; }
388
+ .b-timeline > li {
389
+ position: relative;
390
+ padding-inline-start: var(--b-space-8);
391
+ padding-block-end: var(--b-space-5);
392
+ }
393
+ .b-timeline > li::before {
394
+ content: "";
395
+ position: absolute;
396
+ inset-inline-start: calc(0.5rem - 1px);
397
+ top: 1.1rem;
398
+ bottom: -0.25rem;
399
+ width: 2px;
400
+ background: var(--b-separator);
401
+ }
402
+ .b-timeline > li:last-child::before { display: none; }
403
+ .b-timeline > li::after {
404
+ content: "";
405
+ position: absolute;
406
+ inset-inline-start: 0;
407
+ top: 0.3rem;
408
+ width: 1rem; height: 1rem;
409
+ background: var(--b-surface);
410
+ border: 2px solid var(--b-gray-3);
411
+ border-radius: 50%;
412
+ }
413
+ .b-timeline > li.is-active::after { border-color: var(--b-color-accent); background: var(--b-color-accent-soft); }
414
+ .b-timeline > li.is-complete::after { border-color: var(--b-color-accent); background: var(--b-color-accent); }
415
+ .b-timeline__time { font-size: var(--b-text-caption); color: var(--b-text-tertiary); }
416
+ .b-timeline__title { font-weight: var(--b-weight-semibold); font-size: var(--b-text-subheadline); }
417
+ .b-timeline__body { font-size: var(--b-text-footnote); color: var(--b-text-secondary); }
418
+
419
+ /* ---- Feed -------------------------------------------------------------------------- */
420
+ .b-feed { display: flex; flex-direction: column; gap: var(--b-space-4); }
421
+ .b-feed__item { display: flex; gap: var(--b-space-3); }
422
+ .b-feed__item .b-avatar { flex: none; }
423
+ .b-feed__bubble {
424
+ flex: 1;
425
+ padding: var(--b-space-3) var(--b-space-4);
426
+ background: var(--b-surface);
427
+ border: 1px solid var(--b-separator);
428
+ border-radius: var(--b-radius-lg);
429
+ }
430
+ .b-feed__bubble--glass {
431
+ position: relative;
432
+ background: var(--b-material-thin-bg);
433
+ -webkit-backdrop-filter: var(--b-glass);
434
+ backdrop-filter: var(--b-glass);
435
+ border-color: light-dark(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
436
+ box-shadow: var(--b-glass-ambient);
437
+ overflow: hidden;
438
+ }
439
+ .b-feed__bubble--glass::before {
440
+ content: "";
441
+ position: absolute;
442
+ inset: 0;
443
+ border-radius: inherit;
444
+ box-shadow: var(--b-glass-edge);
445
+ pointer-events: none;
446
+ }
447
+ .b-feed__meta { font-size: var(--b-text-caption); color: var(--b-text-tertiary); margin-block-start: var(--b-space-1); }
448
+
449
+ /* ---- Accordion / Disclosure ---------------------------------------------------------- */
450
+ .b-accordion {
451
+ background: var(--b-surface);
452
+ border: 1px solid var(--b-separator);
453
+ border-radius: var(--b-radius-lg);
454
+ overflow: hidden;
455
+ }
456
+ .b-accordion > .b-disclosure + .b-disclosure { border-top: 1px solid var(--b-separator); }
457
+ .b-disclosure > summary {
458
+ display: flex;
459
+ align-items: center;
460
+ justify-content: space-between;
461
+ gap: var(--b-space-3);
462
+ padding: var(--b-space-4);
463
+ font-weight: var(--b-weight-medium);
464
+ font-size: var(--b-text-subheadline);
465
+ cursor: pointer;
466
+ list-style: none;
467
+ user-select: none;
468
+ transition: background var(--b-duration-fast);
469
+ }
470
+ .b-disclosure > summary::-webkit-details-marker { display: none; }
471
+ .b-disclosure > summary:hover { background: var(--b-fill-quaternary); }
472
+ .b-disclosure > summary::after {
473
+ content: "⌄";
474
+ color: var(--b-text-tertiary);
475
+ font-size: var(--b-text-callout);
476
+ transition: rotate var(--b-duration-normal) var(--b-ease-standard);
477
+ }
478
+ .b-disclosure[open] > summary::after { rotate: 180deg; }
479
+ .b-disclosure__body {
480
+ padding: 0 var(--b-space-4) var(--b-space-4);
481
+ font-size: var(--b-text-subheadline);
482
+ color: var(--b-text-secondary);
483
+ }
484
+ .b-disclosure--plain { background: none; border: none; }
485
+
486
+ /* ---- Badge ------------------------------------------------------------------------------ */
487
+ .b-badge {
488
+ display: inline-flex;
489
+ align-items: center;
490
+ gap: var(--b-space-1);
491
+ padding: 0.1rem var(--b-space-2);
492
+ font-size: var(--b-text-caption);
493
+ font-weight: var(--b-weight-semibold);
494
+ line-height: 1.4;
495
+ color: var(--b-text-secondary);
496
+ background: var(--b-fill-tertiary);
497
+ border-radius: var(--b-radius-full);
498
+ white-space: nowrap;
499
+ }
500
+ .b-badge--accent { color: var(--b-color-accent-text); background: var(--b-color-accent-soft); }
501
+ .b-badge--success { color: var(--b-color-success); background: var(--b-color-success-soft); }
502
+ .b-badge--warning { color: light-dark(#b46200, var(--b-color-warning)); background: var(--b-color-warning-soft); }
503
+ .b-badge--danger { color: var(--b-color-danger); background: var(--b-color-danger-soft); }
504
+ .b-badge--solid { color: var(--b-color-on-accent); background: var(--b-color-accent); }
505
+ .b-badge--dot::before {
506
+ content: "";
507
+ width: 0.4rem; height: 0.4rem;
508
+ border-radius: 50%;
509
+ background: currentColor;
510
+ }
511
+ .b-badge--count {
512
+ min-width: 1.25rem;
513
+ justify-content: center;
514
+ padding-inline: 0.3rem;
515
+ font-variant-numeric: tabular-nums;
516
+ color: #fff;
517
+ background: var(--b-color-red);
518
+ }
519
+ /* Glass badge — Apple-style Liquid Glass notification badge */
520
+ .b-badge--glass {
521
+ position: relative;
522
+ background: var(--b-material-thin-bg);
523
+ -webkit-backdrop-filter: var(--b-glass);
524
+ backdrop-filter: var(--b-glass);
525
+ box-shadow: var(--b-glass-ambient);
526
+ overflow: hidden;
527
+ }
528
+ .b-badge--glass::before {
529
+ content: "";
530
+ position: absolute;
531
+ inset: 0;
532
+ border-radius: inherit;
533
+ box-shadow: var(--b-glass-edge);
534
+ pointer-events: none;
535
+ }
536
+
537
+ /* ---- Tag & Chip -------------------------------------------------------------------------- */
538
+ .b-tag {
539
+ display: inline-flex;
540
+ align-items: center;
541
+ gap: var(--b-space-1);
542
+ padding: 0.15rem var(--b-space-2);
543
+ font-size: var(--b-text-caption);
544
+ font-weight: var(--b-weight-medium);
545
+ color: var(--b-text-secondary);
546
+ background: none;
547
+ border: 1px solid var(--b-border);
548
+ border-radius: var(--b-radius-sm);
549
+ }
550
+ .b-chip {
551
+ display: inline-flex;
552
+ align-items: center;
553
+ gap: var(--b-space-1);
554
+ height: var(--b-control-h-sm);
555
+ padding-inline: var(--b-space-3);
556
+ font-size: var(--b-text-footnote);
557
+ font-weight: var(--b-weight-medium);
558
+ color: var(--b-text);
559
+ background: var(--b-fill-tertiary);
560
+ border: none;
561
+ border-radius: var(--b-radius-full);
562
+ cursor: pointer;
563
+ transition: background var(--b-duration-fast), color var(--b-duration-fast);
564
+ }
565
+ .b-chip:hover { background: var(--b-fill-secondary); }
566
+ .b-chip.is-selected, .b-chip[aria-pressed="true"] {
567
+ color: var(--b-color-on-accent);
568
+ background: var(--b-color-accent);
569
+ }
570
+ .b-chip__remove {
571
+ display: inline-grid;
572
+ place-items: center;
573
+ width: 1.1rem; height: 1.1rem;
574
+ margin-inline-end: calc(var(--b-space-1) * -1);
575
+ font-size: 0.75rem;
576
+ color: inherit;
577
+ background: color-mix(in srgb, currentColor 14%, transparent);
578
+ border: none;
579
+ border-radius: 50%;
580
+ cursor: pointer;
581
+ }
582
+ .b-chip__remove:hover { background: color-mix(in srgb, currentColor 26%, transparent); }
583
+
584
+ /* ---- Avatar / Avatar Group ----------------------------------------------------------------- */
585
+ .b-avatar {
586
+ --b-avatar-size: 2.25rem;
587
+ display: inline-flex;
588
+ align-items: center;
589
+ justify-content: center;
590
+ width: var(--b-avatar-size);
591
+ height: var(--b-avatar-size);
592
+ font-size: calc(var(--b-avatar-size) * 0.4);
593
+ font-weight: var(--b-weight-semibold);
594
+ color: var(--b-color-accent-text);
595
+ background: var(--b-color-accent-soft);
596
+ border-radius: 50%;
597
+ overflow: hidden;
598
+ flex: none;
599
+ user-select: none;
600
+ }
601
+ .b-avatar img { width: 100%; height: 100%; object-fit: cover; }
602
+ .b-avatar--xs { --b-avatar-size: 1.5rem; }
603
+ .b-avatar--sm { --b-avatar-size: 1.875rem; }
604
+ .b-avatar--lg { --b-avatar-size: 3rem; }
605
+ .b-avatar--xl { --b-avatar-size: 4rem; }
606
+ .b-avatar--square { border-radius: var(--b-radius-md); }
607
+ .b-avatar--online { position: relative; overflow: visible; }
608
+ .b-avatar--online::after {
609
+ content: "";
610
+ position: absolute;
611
+ inset-block-end: 0;
612
+ inset-inline-end: 0;
613
+ width: 26%; height: 26%;
614
+ background: var(--b-color-success);
615
+ border: 2px solid var(--b-bg);
616
+ border-radius: 50%;
617
+ }
618
+ .b-avatar--online img { border-radius: 50%; }
619
+
620
+ .b-avatar-group { display: inline-flex; }
621
+ .b-avatar-group .b-avatar {
622
+ border: 2px solid var(--b-bg);
623
+ margin-inline-start: calc(var(--b-avatar-size) * -0.28);
624
+ }
625
+ .b-avatar-group .b-avatar:first-child { margin-inline-start: 0; }
626
+ .b-avatar-group .b-avatar--more {
627
+ color: var(--b-text-secondary);
628
+ background: var(--b-fill-secondary);
629
+ font-size: calc(var(--b-avatar-size) * 0.34);
630
+ }
631
+
632
+ /* ---- Icon ------------------------------------------------------------------------------------ */
633
+ .b-icon {
634
+ display: inline-flex;
635
+ width: 1.25rem;
636
+ height: 1.25rem;
637
+ flex: none;
638
+ color: currentColor;
639
+ }
640
+ .b-icon svg { width: 100%; height: 100%; }
641
+ .b-icon--sm { width: 1rem; height: 1rem; }
642
+ .b-icon--lg { width: 1.5rem; height: 1.5rem; }
643
+ .b-icon--xl { width: 2rem; height: 2rem; }
644
+ .b-icon-tile {
645
+ display: inline-grid;
646
+ place-items: center;
647
+ width: 2.5rem; height: 2.5rem;
648
+ border-radius: var(--b-radius-md);
649
+ color: var(--b-color-accent-text);
650
+ background: var(--b-color-accent-soft);
651
+ flex: none;
652
+ }
653
+ /* iOS Settings-row size: small solid square, white glyph */
654
+ .b-icon-tile--sm { width: 1.85rem; height: 1.85rem; border-radius: var(--b-radius-sm); }
655
+ .b-icon-tile--sm svg { width: 1.05rem; height: 1.05rem; }
656
+ .b-icon-tile--solid { color: #fff; background: var(--b-color-accent); }
657
+ .b-icon-tile--green { color: #fff; background: var(--b-color-green); }
658
+ .b-icon-tile--orange { color: #fff; background: var(--b-color-orange); }
659
+ .b-icon-tile--red { color: #fff; background: var(--b-color-red); }
660
+ .b-icon-tile--purple { color: #fff; background: var(--b-color-purple); }
661
+ .b-icon-tile--teal { color: #fff; background: var(--b-color-teal); }
662
+ .b-icon-tile--indigo { color: #fff; background: var(--b-color-indigo); }
663
+ .b-icon-tile--gray { color: #fff; background: var(--b-gray-1); }
664
+ .b-icon-tile svg { width: 1.25rem; height: 1.25rem; }
665
+
666
+ /* ---- Image ------------------------------------------------------------------------------------ */
667
+ .b-img { border-radius: var(--b-radius-lg); object-fit: cover; }
668
+ .b-img--framed {
669
+ border-radius: var(--b-radius-lg);
670
+ box-shadow: var(--b-elevation-2);
671
+ }
672
+ .b-figure { display: flex; flex-direction: column; gap: var(--b-space-2); margin: 0; }
673
+ .b-figure figcaption { font-size: var(--b-text-footnote); color: var(--b-text-tertiary); }
674
+
675
+ /* ---- Code Block -------------------------------------------------------------------------------- */
676
+ .b-code {
677
+ position: relative;
678
+ background: light-dark(#101014, #0c0c10);
679
+ color: light-dark(#e8e8ef, #e8e8ef);
680
+ border: 1px solid var(--b-hairline);
681
+ border-radius: var(--b-radius-lg);
682
+ overflow: hidden;
683
+ color-scheme: dark;
684
+ }
685
+ .b-code__header {
686
+ display: flex;
687
+ align-items: center;
688
+ justify-content: space-between;
689
+ padding: var(--b-space-2) var(--b-space-4);
690
+ font-size: var(--b-text-caption);
691
+ color: rgba(235, 235, 245, 0.55);
692
+ border-bottom: 1px solid rgba(255, 255, 255, 0.08);
693
+ }
694
+ .b-code pre {
695
+ margin: 0;
696
+ padding: var(--b-space-4);
697
+ background: none;
698
+ border: none;
699
+ border-radius: 0;
700
+ }
701
+ .b-code code { background: none; color: inherit; }
702
+ .b-code__copy {
703
+ padding: 0.2rem var(--b-space-2);
704
+ font-size: var(--b-text-caption);
705
+ color: rgba(235, 235, 245, 0.7);
706
+ background: rgba(255, 255, 255, 0.08);
707
+ border: none;
708
+ border-radius: var(--b-radius-sm);
709
+ cursor: pointer;
710
+ }
711
+ .b-code__copy:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
712
+
713
+ /* ---- Quote -------------------------------------------------------------------------------------- */
714
+ .b-quote {
715
+ display: flex;
716
+ flex-direction: column;
717
+ gap: var(--b-space-3);
718
+ padding: var(--b-space-5);
719
+ background: var(--b-color-accent-soft);
720
+ border-inline-start: 3px solid var(--b-color-accent);
721
+ border-radius: var(--b-radius-lg);
722
+ }
723
+ .b-quote p { font-size: var(--b-text-callout); }
724
+ .b-quote cite {
725
+ font-style: normal;
726
+ font-size: var(--b-text-footnote);
727
+ color: var(--b-text-secondary);
728
+ }
729
+
730
+ /* ---- Statistic ----------------------------------------------------------------------------------- */
731
+ .b-stat { display: flex; flex-direction: column; gap: var(--b-space-1); }
732
+ .b-stat__label {
733
+ font-size: var(--b-text-footnote);
734
+ font-weight: var(--b-weight-medium);
735
+ color: var(--b-text-secondary);
736
+ }
737
+ .b-stat__value {
738
+ font-size: var(--b-text-title1);
739
+ font-weight: var(--b-weight-bold);
740
+ letter-spacing: var(--b-tracking-tight);
741
+ font-variant-numeric: tabular-nums;
742
+ line-height: var(--b-leading-tight);
743
+ }
744
+ .b-stat__delta {
745
+ display: inline-flex;
746
+ align-items: center;
747
+ gap: var(--b-space-1);
748
+ font-size: var(--b-text-footnote);
749
+ font-weight: var(--b-weight-semibold);
750
+ }
751
+ .b-stat__delta.is-up { color: var(--b-color-success); }
752
+ .b-stat__delta.is-down { color: var(--b-color-danger); }
753
+
754
+ /* ---- Empty State ---------------------------------------------------------------------------------- */
755
+ .b-empty {
756
+ display: flex;
757
+ flex-direction: column;
758
+ align-items: center;
759
+ justify-content: center;
760
+ gap: var(--b-space-2);
761
+ padding: var(--b-space-12) var(--b-space-6);
762
+ text-align: center;
763
+ }
764
+ .b-empty__icon {
765
+ display: grid;
766
+ place-items: center;
767
+ width: 3.5rem; height: 3.5rem;
768
+ margin-block-end: var(--b-space-2);
769
+ color: var(--b-text-tertiary);
770
+ background: var(--b-fill-tertiary);
771
+ border-radius: var(--b-radius-full);
772
+ }
773
+ .b-empty__icon svg { width: 1.75rem; height: 1.75rem; }
774
+ .b-empty__title { font-size: var(--b-text-headline); font-weight: var(--b-weight-semibold); }
775
+ .b-empty__desc {
776
+ max-width: 28rem;
777
+ font-size: var(--b-text-subheadline);
778
+ color: var(--b-text-secondary);
779
+ }
780
+ .b-empty .b-btn { margin-block-start: var(--b-space-3); }
781
+ }
782
+ /* A picture behind flat cards is a picture nobody sees. When a wallpaper is
783
+ hanging (Barua.wallpaper adds .b-has-wallpaper), surfaces on the wall
784
+ become the neutral material — derived from whatever is behind them, so it
785
+ holds over any picture. A product that wants opaque surfaces simply never
786
+ hangs one. */
787
+ .b-has-wallpaper .b-workspace,
788
+ .b-has-wallpaper .b-workspace__main,
789
+ .b-has-wallpaper .b-inspector { background: transparent; }
790
+ .b-has-wallpaper .b-card {
791
+ background: var(--b-material-neutral-bg);
792
+ -webkit-backdrop-filter: blur(var(--b-blur-lg)) saturate(1.1);
793
+ backdrop-filter: blur(var(--b-blur-lg)) saturate(1.1);
794
+ border-color: var(--b-material-neutral-edge);
795
+ }
796
+ /* A panel inside glass is a fill, never a second material. */
797
+ .b-has-wallpaper .b-card .b-card {
798
+ background: var(--b-fill-quaternary);
799
+ -webkit-backdrop-filter: none;
800
+ backdrop-filter: none;
801
+ }
802
+