@iota-uz/sdk 0.1.2 → 0.3.1

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.
@@ -1,39 +1,397 @@
1
1
  /**
2
2
  * BI-Chat UI Styles
3
- * CSS variables for theming
3
+ * Comprehensive CSS variable system for theming and customization
4
4
  */
5
5
 
6
+ /* =============================================================================
7
+ CSS Variables - Design Tokens
8
+ ============================================================================= */
9
+
6
10
  :root {
7
- --bichat-primary: #3b82f6;
8
- --bichat-bg: #ffffff;
9
- --bichat-text: #1f2937;
10
- --bichat-border: #e5e7eb;
11
- --bichat-bubble-user: #3b82f6;
12
- --bichat-bubble-assistant: #ffffff;
13
- }
14
-
15
- /* Dark mode support */
16
- @media (prefers-color-scheme: dark) {
17
- :root {
18
- --bichat-bg: #1f2937;
19
- --bichat-text: #f9fafb;
20
- --bichat-border: #374151;
21
- --bichat-bubble-assistant: #374151;
22
- }
11
+ /* -------------------------------------------------------------------------
12
+ Spacing Scale
13
+ ------------------------------------------------------------------------- */
14
+ --bichat-spacing-0: 0;
15
+ --bichat-spacing-px: 1px;
16
+ --bichat-spacing-0_5: 0.125rem;
17
+ --bichat-spacing-1: 0.25rem;
18
+ --bichat-spacing-1_5: 0.375rem;
19
+ --bichat-spacing-2: 0.5rem;
20
+ --bichat-spacing-2_5: 0.625rem;
21
+ --bichat-spacing-3: 0.75rem;
22
+ --bichat-spacing-3_5: 0.875rem;
23
+ --bichat-spacing-4: 1rem;
24
+ --bichat-spacing-5: 1.25rem;
25
+ --bichat-spacing-6: 1.5rem;
26
+ --bichat-spacing-7: 1.75rem;
27
+ --bichat-spacing-8: 2rem;
28
+ --bichat-spacing-9: 2.25rem;
29
+ --bichat-spacing-10: 2.5rem;
30
+ --bichat-spacing-12: 3rem;
31
+ --bichat-spacing-14: 3.5rem;
32
+ --bichat-spacing-16: 4rem;
33
+
34
+ /* Semantic spacing aliases */
35
+ --bichat-spacing-xs: var(--bichat-spacing-1);
36
+ --bichat-spacing-sm: var(--bichat-spacing-2);
37
+ --bichat-spacing-md: var(--bichat-spacing-4);
38
+ --bichat-spacing-lg: var(--bichat-spacing-6);
39
+ --bichat-spacing-xl: var(--bichat-spacing-8);
40
+ --bichat-spacing-2xl: var(--bichat-spacing-12);
41
+
42
+ /* -------------------------------------------------------------------------
43
+ Color Palette - Gray Scale
44
+ ------------------------------------------------------------------------- */
45
+ --bichat-color-gray-50: #f9fafb;
46
+ --bichat-color-gray-100: #f3f4f6;
47
+ --bichat-color-gray-200: #e5e7eb;
48
+ --bichat-color-gray-300: #d1d5db;
49
+ --bichat-color-gray-400: #9ca3af;
50
+ --bichat-color-gray-500: #6b7280;
51
+ --bichat-color-gray-600: #4b5563;
52
+ --bichat-color-gray-700: #374151;
53
+ --bichat-color-gray-800: #1f2937;
54
+ --bichat-color-gray-900: #111827;
55
+ --bichat-color-gray-950: #030712;
56
+
57
+ /* -------------------------------------------------------------------------
58
+ Color Palette - Primary (Blue)
59
+ ------------------------------------------------------------------------- */
60
+ --bichat-color-primary-50: #eff6ff;
61
+ --bichat-color-primary-100: #dbeafe;
62
+ --bichat-color-primary-200: #bfdbfe;
63
+ --bichat-color-primary-300: #93c5fd;
64
+ --bichat-color-primary-400: #60a5fa;
65
+ --bichat-color-primary-500: #3b82f6;
66
+ --bichat-color-primary-600: #2563eb;
67
+ --bichat-color-primary-700: #1d4ed8;
68
+ --bichat-color-primary-800: #1e40af;
69
+ --bichat-color-primary-900: #1e3a8a;
70
+ --bichat-color-primary-950: #172554;
71
+
72
+ /* -------------------------------------------------------------------------
73
+ Color Palette - Semantic Colors
74
+ ------------------------------------------------------------------------- */
75
+ --bichat-color-success-50: #f0fdf4;
76
+ --bichat-color-success-500: #22c55e;
77
+ --bichat-color-success-600: #16a34a;
78
+ --bichat-color-success-700: #15803d;
79
+
80
+ --bichat-color-error-50: #fef2f2;
81
+ --bichat-color-error-500: #ef4444;
82
+ --bichat-color-error-600: #dc2626;
83
+ --bichat-color-error-700: #b91c1c;
84
+
85
+ --bichat-color-warning-50: #fffbeb;
86
+ --bichat-color-warning-500: #f59e0b;
87
+ --bichat-color-warning-600: #d97706;
88
+ --bichat-color-warning-700: #b45309;
89
+
90
+ --bichat-color-info-50: #eff6ff;
91
+ --bichat-color-info-500: #3b82f6;
92
+ --bichat-color-info-600: #2563eb;
93
+ --bichat-color-info-700: #1d4ed8;
94
+
95
+ /* -------------------------------------------------------------------------
96
+ Semantic Color Tokens (Light Mode)
97
+ ------------------------------------------------------------------------- */
98
+ --bichat-color-bg: var(--bichat-color-gray-50);
99
+ --bichat-color-bg-subtle: var(--bichat-color-gray-100);
100
+ --bichat-color-bg-muted: var(--bichat-color-gray-200);
101
+
102
+ --bichat-color-surface: #ffffff;
103
+ --bichat-color-surface-raised: #ffffff;
104
+ --bichat-color-surface-overlay: rgba(255, 255, 255, 0.9);
105
+
106
+ --bichat-color-text: var(--bichat-color-gray-900);
107
+ --bichat-color-text-secondary: var(--bichat-color-gray-600);
108
+ --bichat-color-text-muted: var(--bichat-color-gray-500);
109
+ --bichat-color-text-disabled: var(--bichat-color-gray-400);
110
+ --bichat-color-text-inverse: #ffffff;
111
+ --bichat-color-code-text: var(--bichat-color-gray-800);
112
+ --bichat-color-code-bg: var(--bichat-color-gray-100);
113
+ --bichat-color-text-icon: var(--bichat-color-gray-500);
114
+
115
+ --bichat-color-border: var(--bichat-color-gray-200);
116
+ --bichat-color-border-subtle: var(--bichat-color-gray-100);
117
+ --bichat-color-border-strong: var(--bichat-color-gray-300);
118
+
119
+ --bichat-color-accent: var(--bichat-color-primary-600);
120
+ --bichat-color-accent-hover: var(--bichat-color-primary-700);
121
+ --bichat-color-accent-muted: var(--bichat-color-primary-100);
122
+
123
+ /* Chat-specific semantic tokens */
124
+ --bichat-color-user-bubble-bg: var(--bichat-color-primary-600);
125
+ --bichat-color-user-bubble-text: #ffffff;
126
+ --bichat-color-user-bubble-border: transparent;
127
+
128
+ --bichat-color-assistant-bubble-bg: var(--bichat-color-surface);
129
+ --bichat-color-assistant-bubble-text: var(--bichat-color-text);
130
+ --bichat-color-assistant-bubble-border: var(--bichat-color-border);
131
+
132
+ --bichat-color-system-bubble-bg: var(--bichat-color-bg-subtle);
133
+ --bichat-color-system-bubble-text: var(--bichat-color-text-secondary);
134
+
135
+ --bichat-color-input-bg: var(--bichat-color-surface);
136
+ --bichat-color-input-text: var(--bichat-color-text);
137
+ --bichat-color-input-border: var(--bichat-color-border);
138
+ --bichat-color-input-focus-border: var(--bichat-color-accent);
139
+ --bichat-color-input-placeholder: var(--bichat-color-text-muted);
140
+
141
+ /* -------------------------------------------------------------------------
142
+ Typography
143
+ ------------------------------------------------------------------------- */
144
+ --bichat-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
145
+ 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
146
+ sans-serif;
147
+ --bichat-font-family-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo,
148
+ Consolas, 'Liberation Mono', monospace;
149
+
150
+ --bichat-font-size-xs: 0.75rem;
151
+ --bichat-font-size-sm: 0.875rem;
152
+ --bichat-font-size-base: 1rem;
153
+ --bichat-font-size-lg: 1.125rem;
154
+ --bichat-font-size-xl: 1.25rem;
155
+ --bichat-font-size-2xl: 1.5rem;
156
+ --bichat-font-size-3xl: 1.875rem;
157
+
158
+ --bichat-font-weight-normal: 400;
159
+ --bichat-font-weight-medium: 500;
160
+ --bichat-font-weight-semibold: 600;
161
+ --bichat-font-weight-bold: 700;
162
+
163
+ --bichat-line-height-tight: 1.25;
164
+ --bichat-line-height-normal: 1.5;
165
+ --bichat-line-height-relaxed: 1.625;
166
+
167
+ --bichat-letter-spacing-tight: -0.025em;
168
+ --bichat-letter-spacing-normal: 0;
169
+ --bichat-letter-spacing-wide: 0.025em;
170
+
171
+ /* -------------------------------------------------------------------------
172
+ Border Radius
173
+ ------------------------------------------------------------------------- */
174
+ --bichat-radius-none: 0;
175
+ --bichat-radius-sm: 0.125rem;
176
+ --bichat-radius-default: 0.25rem;
177
+ --bichat-radius-md: 0.375rem;
178
+ --bichat-radius-lg: 0.5rem;
179
+ --bichat-radius-xl: 0.75rem;
180
+ --bichat-radius-2xl: 1rem;
181
+ --bichat-radius-3xl: 1.5rem;
182
+ --bichat-radius-full: 9999px;
183
+
184
+ /* Semantic radius aliases */
185
+ --bichat-radius-bubble: var(--bichat-radius-2xl);
186
+ --bichat-radius-bubble-tail: var(--bichat-radius-sm);
187
+ --bichat-radius-button: var(--bichat-radius-lg);
188
+ --bichat-radius-input: var(--bichat-radius-lg);
189
+ --bichat-radius-card: var(--bichat-radius-xl);
190
+ --bichat-radius-modal: var(--bichat-radius-2xl);
191
+
192
+ /* -------------------------------------------------------------------------
193
+ Shadows
194
+ ------------------------------------------------------------------------- */
195
+ --bichat-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
196
+ --bichat-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
197
+ --bichat-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
198
+ --bichat-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
199
+ --bichat-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
200
+ --bichat-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
201
+ --bichat-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
202
+ --bichat-shadow-none: 0 0 #0000;
203
+
204
+ /* Focus ring (WCAG 2.4.7 Focus Visible - high contrast for keyboard users) */
205
+ --bichat-ring-width: 2px;
206
+ --bichat-ring-offset: 2px;
207
+ --bichat-ring-color: var(--bichat-color-primary-500);
208
+ --bichat-focus-ring: 0 0 0 var(--bichat-ring-width) var(--bichat-ring-color);
209
+ --bichat-focus-ring-offset: 0 0 0 var(--bichat-ring-offset) var(--bichat-color-surface);
210
+
211
+ /* -------------------------------------------------------------------------
212
+ Transitions & Animation
213
+ ------------------------------------------------------------------------- */
214
+ --bichat-transition-fast: 100ms;
215
+ --bichat-transition-normal: 150ms;
216
+ --bichat-transition-slow: 200ms;
217
+ --bichat-transition-slower: 300ms;
218
+
219
+ --bichat-ease-default: cubic-bezier(0.4, 0, 0.2, 1);
220
+ --bichat-ease-in: cubic-bezier(0.4, 0, 1, 1);
221
+ --bichat-ease-out: cubic-bezier(0, 0, 0.2, 1);
222
+ --bichat-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
223
+ --bichat-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
224
+
225
+ /* -------------------------------------------------------------------------
226
+ Z-Index Scale
227
+ ------------------------------------------------------------------------- */
228
+ --bichat-z-base: 0;
229
+ --bichat-z-dropdown: 10;
230
+ --bichat-z-sticky: 20;
231
+ --bichat-z-overlay: 30;
232
+ --bichat-z-modal: 40;
233
+ --bichat-z-popover: 50;
234
+ --bichat-z-toast: 60;
235
+ --bichat-z-tooltip: 70;
236
+
237
+ /* -------------------------------------------------------------------------
238
+ Component-Specific Sizes
239
+ ------------------------------------------------------------------------- */
240
+ --bichat-avatar-size-sm: 1.5rem;
241
+ --bichat-avatar-size-md: 2rem;
242
+ --bichat-avatar-size-lg: 2.5rem;
243
+ --bichat-avatar-size-xl: 3rem;
244
+
245
+ --bichat-bubble-max-width: 75%;
246
+ --bichat-bubble-assistant-max-width: 85%;
247
+
248
+ --bichat-input-min-height: 2.5rem;
249
+ --bichat-input-max-height: 12rem;
250
+
251
+ /* Legacy compatibility (keep for backward compat) */
252
+ --bichat-primary: var(--bichat-color-primary-500);
253
+ --bichat-bg: var(--bichat-color-bg);
254
+ --bichat-text: var(--bichat-color-text);
255
+ --bichat-border: var(--bichat-color-border);
256
+ --bichat-bubble-user: var(--bichat-color-user-bubble-bg);
257
+ --bichat-bubble-assistant: var(--bichat-color-assistant-bubble-bg);
23
258
  }
24
259
 
25
- /* Base styles */
260
+ /* =============================================================================
261
+ Dark Mode Overrides
262
+ ============================================================================= */
263
+
264
+ /* Class-based dark mode (for Tailwind .dark class) */
265
+ .dark,
266
+ [data-theme="dark"] {
267
+ --bichat-color-bg: var(--bichat-color-gray-900);
268
+ --bichat-color-bg-subtle: var(--bichat-color-gray-800);
269
+ --bichat-color-bg-muted: var(--bichat-color-gray-700);
270
+
271
+ --bichat-color-surface: var(--bichat-color-gray-800);
272
+ --bichat-color-surface-raised: var(--bichat-color-gray-750, #2d3748);
273
+ --bichat-color-surface-overlay: rgba(31, 41, 55, 0.9);
274
+
275
+ --bichat-color-text: var(--bichat-color-gray-100);
276
+ --bichat-color-text-secondary: var(--bichat-color-gray-300);
277
+ --bichat-color-text-muted: var(--bichat-color-gray-400);
278
+ --bichat-color-text-disabled: var(--bichat-color-gray-500);
279
+ --bichat-color-code-text: var(--bichat-color-gray-200);
280
+ --bichat-color-code-bg: var(--bichat-color-gray-800);
281
+ --bichat-color-text-icon: var(--bichat-color-gray-400);
282
+
283
+ --bichat-color-border: var(--bichat-color-gray-700);
284
+ --bichat-color-border-subtle: var(--bichat-color-gray-800);
285
+ --bichat-color-border-strong: var(--bichat-color-gray-600);
286
+
287
+ --bichat-color-accent-muted: var(--bichat-color-primary-900);
288
+
289
+ /* Chat-specific dark mode */
290
+ --bichat-color-user-bubble-bg: var(--bichat-color-primary-700);
291
+ --bichat-color-assistant-bubble-bg: var(--bichat-color-gray-800);
292
+ --bichat-color-assistant-bubble-border: var(--bichat-color-gray-700);
293
+ --bichat-color-system-bubble-bg: var(--bichat-color-gray-800);
294
+
295
+ --bichat-color-input-bg: var(--bichat-color-gray-800);
296
+ --bichat-color-input-border: var(--bichat-color-gray-700);
297
+
298
+ /* Legacy compatibility */
299
+ --bichat-bg: var(--bichat-color-bg);
300
+ --bichat-text: var(--bichat-color-text);
301
+ --bichat-border: var(--bichat-color-border);
302
+ --bichat-bubble-assistant: var(--bichat-color-assistant-bubble-bg);
303
+
304
+ /* Adjust shadows for dark mode */
305
+ --bichat-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
306
+ --bichat-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
307
+ --bichat-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
308
+ }
309
+
310
+ /* =============================================================================
311
+ Base Styles
312
+ ============================================================================= */
313
+
26
314
  .bichat-session {
27
- background-color: var(--bichat-bg);
28
- color: var(--bichat-text);
29
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
30
- 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
31
- sans-serif;
315
+ background-color: var(--bichat-color-bg);
316
+ color: var(--bichat-color-text);
317
+ font-family: var(--bichat-font-family);
318
+ font-size: var(--bichat-font-size-base);
319
+ line-height: var(--bichat-line-height-normal);
32
320
  -webkit-font-smoothing: antialiased;
33
321
  -moz-osx-font-smoothing: grayscale;
34
322
  }
35
323
 
36
- /* Scrollbar styles */
324
+ /* Buttons and button-like elements: pointer cursor; disabled: not-allowed
325
+ :host is required when styles are injected into the applet shadow root (bi-chat-root) */
326
+ :host button,
327
+ :host [role="button"],
328
+ :host [role="tab"],
329
+ .bichat-session button,
330
+ .bichat-session [role="button"],
331
+ .bichat-session [role="tab"],
332
+ bi-chat-root button,
333
+ bi-chat-root [role="button"],
334
+ bi-chat-root [role="tab"] {
335
+ cursor: pointer;
336
+ }
337
+ :host button:disabled,
338
+ :host [role="button"][aria-disabled="true"],
339
+ .bichat-session button:disabled,
340
+ .bichat-session [role="button"][aria-disabled="true"],
341
+ bi-chat-root button:disabled,
342
+ bi-chat-root [role="button"][aria-disabled="true"] {
343
+ cursor: not-allowed;
344
+ }
345
+
346
+ /* Focus visible: high-contrast focus rings for keyboard navigation (WCAG 2.4.7) */
347
+ .bichat-session button:focus-visible,
348
+ .bichat-session a:focus-visible,
349
+ .bichat-session input:focus-visible,
350
+ .bichat-session textarea:focus-visible,
351
+ .bichat-session [role="button"]:focus-visible,
352
+ .bichat-session [role="menuitem"]:focus-visible,
353
+ .bichat-session [role="tab"]:focus-visible,
354
+ .bichat-session select:focus-visible,
355
+ .bichat-session [tabindex]:not([tabindex="-1"]):focus-visible,
356
+ bi-chat-root button:focus-visible,
357
+ bi-chat-root a:focus-visible,
358
+ bi-chat-root input:focus-visible,
359
+ bi-chat-root textarea:focus-visible,
360
+ bi-chat-root [role="button"]:focus-visible,
361
+ bi-chat-root [role="menuitem"]:focus-visible,
362
+ bi-chat-root [role="tab"]:focus-visible,
363
+ bi-chat-root select:focus-visible,
364
+ bi-chat-root [tabindex]:not([tabindex="-1"]):focus-visible {
365
+ outline: none;
366
+ box-shadow: var(--bichat-focus-ring-offset), var(--bichat-focus-ring);
367
+ border-radius: inherit;
368
+ }
369
+
370
+ .dark .bichat-session button:focus-visible,
371
+ .dark .bichat-session a:focus-visible,
372
+ .dark .bichat-session input:focus-visible,
373
+ .dark .bichat-session textarea:focus-visible,
374
+ .dark .bichat-session [role="button"]:focus-visible,
375
+ .dark .bichat-session [role="menuitem"]:focus-visible,
376
+ .dark .bichat-session [role="tab"]:focus-visible,
377
+ .dark .bichat-session select:focus-visible,
378
+ .dark .bichat-session [tabindex]:not([tabindex="-1"]):focus-visible,
379
+ .dark bi-chat-root button:focus-visible,
380
+ .dark bi-chat-root a:focus-visible,
381
+ .dark bi-chat-root input:focus-visible,
382
+ .dark bi-chat-root textarea:focus-visible,
383
+ .dark bi-chat-root [role="button"]:focus-visible,
384
+ .dark bi-chat-root [role="menuitem"]:focus-visible,
385
+ .dark bi-chat-root [role="tab"]:focus-visible,
386
+ .dark bi-chat-root select:focus-visible,
387
+ .dark bi-chat-root [tabindex]:not([tabindex="-1"]):focus-visible {
388
+ --bichat-focus-ring: 0 0 0 var(--bichat-ring-width) var(--bichat-color-primary-400);
389
+ }
390
+
391
+ /* =============================================================================
392
+ Scrollbar Styles
393
+ ============================================================================= */
394
+
37
395
  .bichat-messages::-webkit-scrollbar {
38
396
  width: 8px;
39
397
  }
@@ -43,16 +401,27 @@
43
401
  }
44
402
 
45
403
  .bichat-messages::-webkit-scrollbar-thumb {
46
- background: #d1d5db;
47
- border-radius: 4px;
404
+ background: var(--bichat-color-gray-300);
405
+ border-radius: var(--bichat-radius-full);
48
406
  }
49
407
 
50
408
  .bichat-messages::-webkit-scrollbar-thumb:hover {
51
- background: #9ca3af;
409
+ background: var(--bichat-color-gray-400);
52
410
  }
53
411
 
54
- /* Animation for streaming cursor */
55
- @keyframes pulse {
412
+ .dark .bichat-messages::-webkit-scrollbar-thumb {
413
+ background: var(--bichat-color-gray-600);
414
+ }
415
+
416
+ .dark .bichat-messages::-webkit-scrollbar-thumb:hover {
417
+ background: var(--bichat-color-gray-500);
418
+ }
419
+
420
+ /* =============================================================================
421
+ Animations
422
+ ============================================================================= */
423
+
424
+ @keyframes bichat-pulse {
56
425
  0%, 100% {
57
426
  opacity: 1;
58
427
  }
@@ -61,13 +430,143 @@
61
430
  }
62
431
  }
63
432
 
433
+ @keyframes bichat-bounce {
434
+ 0%, 100% {
435
+ transform: translateY(0);
436
+ animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
437
+ }
438
+ 50% {
439
+ transform: translateY(-25%);
440
+ animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
441
+ }
442
+ }
443
+
444
+ @keyframes bichat-spin {
445
+ from {
446
+ transform: rotate(0deg);
447
+ }
448
+ to {
449
+ transform: rotate(360deg);
450
+ }
451
+ }
452
+
453
+ @keyframes bichat-fade-in {
454
+ from {
455
+ opacity: 0;
456
+ }
457
+ to {
458
+ opacity: 1;
459
+ }
460
+ }
461
+
462
+ @keyframes bichat-slide-up {
463
+ from {
464
+ opacity: 0;
465
+ transform: translateY(10px);
466
+ }
467
+ to {
468
+ opacity: 1;
469
+ transform: translateY(0);
470
+ }
471
+ }
472
+
64
473
  .animate-pulse {
65
- animation: pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
474
+ animation: bichat-pulse 1s var(--bichat-ease-in-out) infinite;
475
+ }
476
+
477
+ .animate-bounce {
478
+ animation: bichat-bounce 1s infinite;
479
+ }
480
+
481
+ .animate-spin {
482
+ animation: bichat-spin 1s linear infinite;
66
483
  }
67
484
 
68
- /* Prose styles for markdown */
485
+ .animate-fade-in {
486
+ animation: bichat-fade-in var(--bichat-transition-normal) var(--bichat-ease-out);
487
+ }
488
+
489
+ .animate-slide-up {
490
+ animation: bichat-slide-up var(--bichat-transition-slow) var(--bichat-ease-out);
491
+ }
492
+
493
+ /* =============================================================================
494
+ Thinking Shimmer Animation
495
+ ============================================================================= */
496
+
497
+ .bichat-thinking-shimmer {
498
+ -webkit-mask-image: linear-gradient(
499
+ -45deg,
500
+ rgba(0, 0, 0, 1) 20%,
501
+ rgba(0, 0, 0, 1) 40%,
502
+ rgba(0, 0, 0, 0.2) 50%,
503
+ rgba(0, 0, 0, 1) 60%,
504
+ rgba(0, 0, 0, 1) 80%
505
+ );
506
+ mask-image: linear-gradient(
507
+ -45deg,
508
+ rgba(0, 0, 0, 1) 20%,
509
+ rgba(0, 0, 0, 1) 40%,
510
+ rgba(0, 0, 0, 0.2) 50%,
511
+ rgba(0, 0, 0, 1) 60%,
512
+ rgba(0, 0, 0, 1) 80%
513
+ );
514
+ -webkit-mask-size: 300% 100%;
515
+ mask-size: 300% 100%;
516
+ animation: bichat-thinking-shimmer 4.5s linear infinite;
517
+ }
518
+
519
+ .dark .bichat-thinking-shimmer {
520
+ -webkit-mask-image: linear-gradient(
521
+ -45deg,
522
+ rgba(0, 0, 0, 1) 15%,
523
+ rgba(0, 0, 0, 1) 35%,
524
+ rgba(0, 0, 0, 0.3) 50%,
525
+ rgba(0, 0, 0, 1) 65%,
526
+ rgba(0, 0, 0, 1) 85%
527
+ );
528
+ mask-image: linear-gradient(
529
+ -45deg,
530
+ rgba(0, 0, 0, 1) 15%,
531
+ rgba(0, 0, 0, 1) 35%,
532
+ rgba(0, 0, 0, 0.3) 50%,
533
+ rgba(0, 0, 0, 1) 65%,
534
+ rgba(0, 0, 0, 1) 85%
535
+ );
536
+ }
537
+
538
+ @media (prefers-reduced-motion: reduce) {
539
+ .bichat-thinking-shimmer,
540
+ .animate-pulse,
541
+ .animate-bounce,
542
+ .animate-spin,
543
+ .animate-fade-in,
544
+ .animate-slide-up {
545
+ animation: none;
546
+ }
547
+ }
548
+
549
+ @keyframes bichat-thinking-shimmer {
550
+ 0% { -webkit-mask-position: 130% 0; mask-position: 130% 0; }
551
+ 100% { -webkit-mask-position: -30% 0; mask-position: -30% 0; }
552
+ }
553
+
554
+ /* =============================================================================
555
+ Prose / Markdown Styles
556
+ ============================================================================= */
557
+
69
558
  .prose {
70
- color: var(--bichat-text);
559
+ color: var(--bichat-color-text);
560
+ font-size: var(--bichat-font-size-base);
561
+ line-height: var(--bichat-line-height-relaxed);
562
+ }
563
+
564
+ .prose > :first-child {
565
+ margin-top: 0;
566
+ }
567
+
568
+ .prose > :last-child {
569
+ margin-bottom: 0;
71
570
  }
72
571
 
73
572
  .prose h1,
@@ -76,10 +575,32 @@
76
575
  .prose h4,
77
576
  .prose h5,
78
577
  .prose h6 {
79
- color: var(--bichat-text);
80
- font-weight: 600;
578
+ color: var(--bichat-color-text);
579
+ font-weight: var(--bichat-font-weight-semibold);
81
580
  margin-top: 1.5em;
82
581
  margin-bottom: 0.5em;
582
+ line-height: var(--bichat-line-height-tight);
583
+ }
584
+
585
+ .prose h1 {
586
+ font-size: 1.625rem;
587
+ font-weight: var(--bichat-font-weight-bold);
588
+ }
589
+
590
+ .prose h2 {
591
+ font-size: 1.375rem;
592
+ margin-top: 2em;
593
+ }
594
+
595
+ .prose h3 {
596
+ font-size: var(--bichat-font-size-lg);
597
+ font-weight: var(--bichat-font-weight-semibold);
598
+ }
599
+
600
+ .prose h4 { font-size: var(--bichat-font-size-base); }
601
+
602
+ .prose > * + h2 {
603
+ margin-top: 2em;
83
604
  }
84
605
 
85
606
  .prose p {
@@ -87,33 +608,47 @@
87
608
  margin-bottom: 0.75em;
88
609
  }
89
610
 
611
+ .prose strong {
612
+ font-weight: var(--bichat-font-weight-semibold);
613
+ color: var(--bichat-color-text);
614
+ }
615
+
90
616
  .prose code {
91
- background-color: #f3f4f6;
92
- padding: 0.125em 0.25em;
93
- border-radius: 0.25em;
617
+ background-color: var(--bichat-color-code-bg);
618
+ color: var(--bichat-color-code-text);
619
+ padding: 0.2em 0.5em;
620
+ border-radius: var(--bichat-radius-md);
621
+ border: 1px solid var(--bichat-color-border-subtle);
622
+ font-family: var(--bichat-font-family-mono);
94
623
  font-size: 0.875em;
95
624
  }
96
625
 
97
626
  .prose pre {
98
- background-color: #1f2937;
99
- color: #f9fafb;
100
- padding: 1em;
101
- border-radius: 0.5em;
627
+ background-color: var(--bichat-color-code-bg);
628
+ color: var(--bichat-color-gray-100);
629
+ padding: var(--bichat-spacing-4);
630
+ border-radius: var(--bichat-radius-lg);
102
631
  overflow-x: auto;
103
632
  margin-top: 1em;
104
633
  margin-bottom: 1em;
634
+ font-family: var(--bichat-font-family-mono);
635
+ font-size: var(--bichat-font-size-sm);
636
+ line-height: var(--bichat-line-height-relaxed);
105
637
  }
106
638
 
107
639
  .prose pre code {
108
640
  background-color: transparent;
109
641
  padding: 0;
110
642
  color: inherit;
111
- font-size: 0.875em;
643
+ font-size: inherit;
644
+ border-radius: 0;
645
+ border: none;
112
646
  }
113
647
 
114
648
  .prose a {
115
- color: var(--bichat-primary);
649
+ color: var(--bichat-color-accent);
116
650
  text-decoration: none;
651
+ font-weight: var(--bichat-font-weight-medium);
117
652
  }
118
653
 
119
654
  .prose a:hover {
@@ -127,17 +662,37 @@
127
662
  padding-left: 1.5em;
128
663
  }
129
664
 
665
+ .prose ul {
666
+ list-style-type: disc;
667
+ }
668
+
669
+ .prose ol {
670
+ list-style-type: decimal;
671
+ }
672
+
130
673
  .prose li {
131
674
  margin-top: 0.25em;
132
675
  margin-bottom: 0.25em;
133
676
  }
134
677
 
678
+ .prose li > ul,
679
+ .prose li > ol {
680
+ margin-top: 0.25em;
681
+ margin-bottom: 0.25em;
682
+ }
683
+
135
684
  .prose blockquote {
136
- border-left: 4px solid var(--bichat-border);
137
- padding-left: 1em;
685
+ border-left: 4px solid var(--bichat-color-border-strong);
686
+ padding-left: var(--bichat-spacing-4);
138
687
  margin-left: 0;
139
688
  font-style: italic;
140
- color: #6b7280;
689
+ color: var(--bichat-color-text-secondary);
690
+ }
691
+
692
+ .prose hr {
693
+ border: 0;
694
+ border-top: 1px solid var(--bichat-color-border);
695
+ margin: 2em 0;
141
696
  }
142
697
 
143
698
  .prose table {
@@ -145,16 +700,47 @@
145
700
  border-collapse: collapse;
146
701
  margin-top: 1em;
147
702
  margin-bottom: 1em;
703
+ font-size: var(--bichat-font-size-sm);
148
704
  }
149
705
 
150
706
  .prose th,
151
707
  .prose td {
152
- border: 1px solid var(--bichat-border);
153
- padding: 0.5em;
708
+ border: 1px solid var(--bichat-color-border);
709
+ padding: var(--bichat-spacing-2) var(--bichat-spacing-3);
154
710
  text-align: left;
155
711
  }
156
712
 
157
713
  .prose th {
158
- background-color: #f3f4f6;
159
- font-weight: 600;
714
+ background-color: var(--bichat-color-bg-subtle);
715
+ font-weight: var(--bichat-font-weight-semibold);
716
+ }
717
+
718
+ .prose tbody tr:nth-child(even) {
719
+ background-color: var(--bichat-color-bg-subtle);
720
+ }
721
+
722
+ /* =============================================================================
723
+ Focus Styles
724
+ ============================================================================= */
725
+
726
+ .bichat-focus-ring:focus-visible {
727
+ outline: none;
728
+ box-shadow: 0 0 0 var(--bichat-ring-offset) var(--bichat-color-bg),
729
+ 0 0 0 calc(var(--bichat-ring-offset) + var(--bichat-ring-width)) var(--bichat-ring-color);
730
+ }
731
+
732
+ /* =============================================================================
733
+ Utility Classes
734
+ ============================================================================= */
735
+
736
+ .bichat-sr-only {
737
+ position: absolute;
738
+ width: 1px;
739
+ height: 1px;
740
+ padding: 0;
741
+ margin: -1px;
742
+ overflow: hidden;
743
+ clip: rect(0, 0, 0, 0);
744
+ white-space: nowrap;
745
+ border-width: 0;
160
746
  }