@sarchauhan/chat 0.0.0-stage → 0.0.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.
package/dist/chat.css ADDED
@@ -0,0 +1,959 @@
1
+ @import "./theme/tokens.css";
2
+ @import "./theme/typography.css";
3
+
4
+ .chat-root {
5
+ position: relative;
6
+ display: flex;
7
+ min-height: 0;
8
+ flex-direction: column;
9
+ overflow: hidden;
10
+ border: 0;
11
+ border-radius: var(--chat-radius-lg);
12
+ background: var(--chat-bg);
13
+ color: var(--chat-fg);
14
+ font-family: var(--chat-font-sans);
15
+ font-size: var(--chat-body-size);
16
+ line-height: var(--chat-body-leading);
17
+ font-weight: var(--chat-body-weight);
18
+ letter-spacing: var(--chat-body-tracking);
19
+ isolation: isolate;
20
+ }
21
+
22
+ .chat-root * {
23
+ box-sizing: border-box;
24
+ }
25
+
26
+ .chat-toolbar {
27
+ position: absolute;
28
+ top: var(--chat-space-3);
29
+ right: var(--chat-space-3);
30
+ z-index: 2;
31
+ display: flex;
32
+ align-items: center;
33
+ gap: var(--chat-space-2);
34
+ }
35
+
36
+ .chat-theme-toggle {
37
+ display: inline-flex;
38
+ height: 2rem;
39
+ width: 2rem;
40
+ align-items: center;
41
+ justify-content: center;
42
+ border: 0;
43
+ border-radius: var(--chat-radius-sm);
44
+ background: transparent;
45
+ color: var(--chat-fg-muted);
46
+ cursor: pointer;
47
+ transition:
48
+ background-color var(--chat-transition),
49
+ color var(--chat-transition);
50
+ }
51
+
52
+ .chat-theme-toggle:hover {
53
+ background: var(--chat-control-hover);
54
+ color: var(--chat-fg);
55
+ }
56
+
57
+ .chat-theme-toggle:focus-visible {
58
+ box-shadow: 0 0 0 2px color-mix(in oklab, var(--chat-ring) 35%, transparent);
59
+ }
60
+
61
+ .chat-messages {
62
+ position: relative;
63
+ min-height: 0;
64
+ flex: 1 1 auto;
65
+ overflow-y: auto;
66
+ overflow-x: hidden;
67
+ padding: var(--chat-space-8) var(--chat-space-4) calc(var(--chat-composer-space) + var(--chat-space-6));
68
+ }
69
+
70
+ .chat-messages-inner {
71
+ width: min(100%, var(--chat-column));
72
+ margin: 0 auto;
73
+ display: flex;
74
+ flex-direction: column;
75
+ gap: var(--chat-space-6);
76
+ }
77
+
78
+ .chat-empty,
79
+ .chat-loading {
80
+ display: flex;
81
+ min-height: 50%;
82
+ align-items: center;
83
+ justify-content: center;
84
+ }
85
+
86
+ .chat-loading {
87
+ gap: var(--chat-space-2);
88
+ color: var(--chat-fg-muted);
89
+ font-size: var(--chat-text);
90
+ text-align: center;
91
+ }
92
+
93
+ .chat-loading-inline {
94
+ min-height: 0;
95
+ justify-content: flex-start;
96
+ font-size: var(--chat-text-sm);
97
+ }
98
+
99
+ .chat-loading-mark {
100
+ display: inline-flex;
101
+ width: 1rem;
102
+ height: 1rem;
103
+ align-items: center;
104
+ justify-content: center;
105
+ color: var(--chat-fg-muted);
106
+ }
107
+
108
+ .chat-loading-label {
109
+ color: var(--chat-fg);
110
+ font-weight: var(--chat-weight-medium);
111
+ letter-spacing: var(--chat-tracking-normal);
112
+ }
113
+
114
+ .chat-loading-timer {
115
+ color: var(--chat-fg-subtle);
116
+ font-family: var(--chat-font-mono);
117
+ font-size: var(--chat-caption-size);
118
+ font-variant-numeric: tabular-nums;
119
+ }
120
+
121
+
122
+ .chat-visually-hidden {
123
+ position: absolute;
124
+ width: 1px;
125
+ height: 1px;
126
+ padding: 0;
127
+ overflow: hidden;
128
+ clip: rect(0, 0, 0, 0);
129
+ white-space: nowrap;
130
+ border: 0;
131
+ }
132
+
133
+ .chat-text-skeleton {
134
+ display: flex;
135
+ width: min(100%, 18rem);
136
+ flex-direction: column;
137
+ gap: var(--chat-space-1_5);
138
+ padding: var(--chat-space-1) 0;
139
+ }
140
+
141
+ .chat-skeleton-bar {
142
+ display: block;
143
+ height: 0.375rem;
144
+ width: 100%;
145
+ border-radius: var(--chat-radius-pill);
146
+ background: color-mix(in oklab, var(--chat-fg-muted) 14%, var(--chat-bg));
147
+ }
148
+
149
+ .chat-skeleton-bar-short {
150
+ width: 58%;
151
+ }
152
+
153
+ .chat-widget-action-skeleton {
154
+ display: flex;
155
+ flex-wrap: wrap;
156
+ gap: var(--chat-space-2);
157
+ margin-top: var(--chat-space-2);
158
+ }
159
+
160
+ button[data-slot="button"][data-skeleton="true"] {
161
+ min-width: 5.5rem;
162
+ border-color: transparent;
163
+ background: color-mix(in oklab, var(--chat-fg-muted) 14%, var(--chat-bg));
164
+ color: transparent;
165
+ box-shadow: none;
166
+ cursor: default;
167
+ opacity: 1;
168
+ }
169
+
170
+ button[data-slot="button"][data-skeleton="true"]:nth-child(2) {
171
+ min-width: 4.25rem;
172
+ }
173
+
174
+ .chat-widget[data-pending="true"] button:not([data-skeleton="true"]),
175
+ .chat-widget[data-pending="true"] footer {
176
+ display: none;
177
+ }
178
+
179
+ .chat-response-status {
180
+ padding: var(--chat-space-1) 0;
181
+ color: var(--chat-fg-muted);
182
+ font-size: var(--chat-caption-size);
183
+ line-height: var(--chat-caption-leading);
184
+ font-weight: var(--chat-caption-weight);
185
+ letter-spacing: var(--chat-tracking-normal);
186
+ opacity: 0.72;
187
+ }
188
+
189
+ .chat-empty-title {
190
+ margin: 0 0 var(--chat-space-2);
191
+ color: var(--chat-fg);
192
+ font-size: var(--chat-heading-1-size);
193
+ font-weight: var(--chat-heading-1-weight);
194
+ letter-spacing: var(--chat-heading-1-tracking);
195
+ line-height: var(--chat-heading-1-leading);
196
+ }
197
+
198
+ .chat-empty-copy {
199
+ margin: 0;
200
+ max-width: 22rem;
201
+ color: var(--chat-fg-muted);
202
+ font-size: var(--chat-body-size);
203
+ line-height: var(--chat-body-leading);
204
+ letter-spacing: var(--chat-body-tracking);
205
+ }
206
+
207
+ .chat-composer {
208
+ position: absolute;
209
+ right: 0;
210
+ bottom: 0;
211
+ left: 0;
212
+ z-index: 1;
213
+ padding: var(--chat-composer-fade) var(--chat-space-4) var(--chat-space-4);
214
+ pointer-events: none;
215
+ background: linear-gradient(
216
+ to bottom,
217
+ transparent 0,
218
+ color-mix(in oklab, var(--chat-bg) 72%, transparent) 35%,
219
+ var(--chat-bg) 68%,
220
+ var(--chat-bg) 100%
221
+ );
222
+ }
223
+
224
+ .chat-composer > * {
225
+ pointer-events: auto;
226
+ }
227
+
228
+ .chat-composer-shell {
229
+ width: min(100%, var(--chat-column));
230
+ margin: 0 auto;
231
+ display: flex;
232
+ flex-direction: column;
233
+ gap: var(--chat-space-2);
234
+ border: 1px solid transparent;
235
+ border-radius: var(--chat-radius-lg);
236
+ background: var(--chat-composer-bg);
237
+ box-shadow: var(--chat-composer-shadow);
238
+ padding: var(--chat-space-3);
239
+ }
240
+
241
+ .chat-composer-shell.t-input.is-error {
242
+ border-color: color-mix(in oklab, var(--chat-danger) 55%, var(--chat-border));
243
+ }
244
+
245
+ .chat-composer-shell[data-variant="small"] {
246
+ min-height: 3.25rem;
247
+ height: auto;
248
+ display: grid;
249
+ grid-template-columns: minmax(0, 1fr) auto;
250
+ align-items: center;
251
+ gap: var(--chat-space-2);
252
+ border-radius: var(--chat-radius-pill);
253
+ padding: var(--chat-space-1) var(--chat-space-1_5) var(--chat-space-1) var(--chat-space-4);
254
+ }
255
+
256
+ .chat-composer-shell[data-variant="small"] .chat-references {
257
+ grid-column: 1 / -1;
258
+ }
259
+
260
+ .chat-composer-shell[data-variant="small"] .chat-composer-input {
261
+ grid-column: 1;
262
+ min-width: 0;
263
+ display: flex;
264
+ align-items: center;
265
+ }
266
+
267
+ .chat-composer-shell[data-variant="small"] .chat-composer-input textarea {
268
+ min-height: 2.625rem;
269
+ max-height: 8rem;
270
+ overflow-y: hidden;
271
+ overflow-x: hidden;
272
+ padding: var(--chat-space-2) var(--chat-space-1_5);
273
+ line-height: var(--chat-leading-snug);
274
+ white-space: pre-wrap;
275
+ overflow-wrap: anywhere;
276
+ word-break: break-word;
277
+ align-self: center;
278
+ }
279
+
280
+ .chat-composer-shell[data-variant="small"] .chat-composer-row {
281
+ grid-column: 2;
282
+ }
283
+
284
+ .chat-composer-shell[data-variant="small"] .chat-composer-row {
285
+ min-width: 0;
286
+ align-items: center;
287
+ gap: var(--chat-space-2);
288
+ padding: 0;
289
+ }
290
+
291
+ .chat-composer-shell[data-variant="small"] .chat-model-trigger {
292
+ min-width: 0;
293
+ min-height: 2.5rem;
294
+ max-width: 8rem;
295
+ padding: var(--chat-space-1_5) var(--chat-space-2);
296
+ font-size: var(--chat-text-sm);
297
+ }
298
+
299
+ .chat-composer-shell[data-variant="small"] .chat-send {
300
+ height: 2.5rem;
301
+ width: 2.5rem;
302
+ background: #2f6fed;
303
+ color: #ffffff;
304
+ }
305
+
306
+ .chat-composer-shell[data-expanded="false"]:not([data-collapsed="circle"]) {
307
+ min-height: 3.25rem;
308
+ height: auto;
309
+ display: flex;
310
+ flex-direction: row;
311
+ align-items: center;
312
+ gap: var(--chat-space-1);
313
+ border-radius: var(--chat-radius-pill);
314
+ padding: var(--chat-space-1) var(--chat-space-1_5) var(--chat-space-1) var(--chat-space-2);
315
+ }
316
+
317
+ .chat-composer-shell[data-expanded="false"]:not([data-collapsed="circle"]) .chat-composer-input {
318
+ order: 2;
319
+ flex: 1 1 auto;
320
+ min-width: 0;
321
+ }
322
+
323
+ .chat-composer-shell[data-expanded="false"]:not([data-collapsed="circle"]) .chat-composer-input textarea {
324
+ min-height: 2.5rem;
325
+ padding: var(--chat-space-2) var(--chat-space-2);
326
+ }
327
+
328
+ .chat-composer-shell[data-expanded="false"]:not([data-collapsed="circle"]) .chat-composer-row,
329
+ .chat-composer-shell[data-expanded="false"]:not([data-collapsed="circle"]) .chat-composer-tools {
330
+ display: contents;
331
+ }
332
+
333
+ .chat-composer-shell[data-expanded="false"]:not([data-collapsed="circle"]) .chat-attach {
334
+ order: 1;
335
+ }
336
+
337
+ .chat-composer-shell[data-expanded="false"]:not([data-collapsed="circle"]) .chat-send {
338
+ order: 3;
339
+ }
340
+
341
+ .chat-composer-shell[data-expanded="false"]:not([data-collapsed="circle"]) .chat-composer-tools > div {
342
+ display: none;
343
+ }
344
+
345
+ .chat-composer-shell[data-expanded="false"][data-collapsed="circle"] {
346
+ position: relative;
347
+ display: grid;
348
+ place-items: center;
349
+ width: 3.25rem;
350
+ height: 3.25rem;
351
+ min-height: 3.25rem;
352
+ margin-inline: auto;
353
+ gap: 0;
354
+ padding: 0;
355
+ border-radius: var(--chat-radius-pill);
356
+ overflow: hidden;
357
+ cursor: pointer;
358
+ }
359
+
360
+ .chat-composer-shell[data-expanded="false"][data-collapsed="circle"] .chat-attachments,
361
+ .chat-composer-shell[data-expanded="false"][data-collapsed="circle"] .chat-references,
362
+ .chat-composer-shell[data-expanded="false"][data-collapsed="circle"] .chat-composer-row {
363
+ display: none;
364
+ }
365
+
366
+ .chat-composer-shell[data-expanded="false"][data-collapsed="circle"] .chat-composer-input {
367
+ position: absolute;
368
+ inset: 0;
369
+ z-index: 1;
370
+ }
371
+
372
+ .chat-composer-shell[data-expanded="false"][data-collapsed="circle"] .chat-composer-input textarea {
373
+ height: 100%;
374
+ min-height: 0;
375
+ padding: 0;
376
+ color: transparent;
377
+ caret-color: transparent;
378
+ cursor: pointer;
379
+ }
380
+
381
+ .chat-composer-shell[data-expanded="false"][data-collapsed="circle"] .chat-composer-input textarea::placeholder {
382
+ color: transparent;
383
+ }
384
+
385
+ .chat-composer-collapsed-icon {
386
+ position: absolute;
387
+ z-index: 0;
388
+ color: var(--chat-fg-muted);
389
+ pointer-events: none;
390
+ }
391
+
392
+ .chat-composer-row {
393
+ display: flex;
394
+ align-items: flex-end;
395
+ justify-content: space-between;
396
+ gap: var(--chat-space-3);
397
+ padding: 0 var(--chat-space-1);
398
+ }
399
+
400
+ .chat-composer-tools {
401
+ display: flex;
402
+ min-width: 0;
403
+ align-items: center;
404
+ gap: var(--chat-space-2);
405
+ }
406
+
407
+ .chat-attach {
408
+ display: inline-flex;
409
+ height: 2.25rem;
410
+ width: 2.25rem;
411
+ flex: 0 0 auto;
412
+ align-items: center;
413
+ justify-content: center;
414
+ border: 0;
415
+ border-radius: var(--chat-radius-pill);
416
+ background: transparent;
417
+ color: var(--chat-fg-muted);
418
+ cursor: pointer;
419
+ }
420
+
421
+ .chat-attach:hover:not(:disabled) {
422
+ background: var(--chat-control-bg);
423
+ color: var(--chat-fg);
424
+ }
425
+
426
+ .chat-attach:focus-visible {
427
+ box-shadow: 0 0 0 2px color-mix(in oklab, var(--chat-ring) 40%, transparent);
428
+ }
429
+
430
+ .chat-attach:disabled {
431
+ cursor: not-allowed;
432
+ opacity: 0.45;
433
+ }
434
+
435
+ .chat-attach-input {
436
+ position: absolute;
437
+ width: 1px;
438
+ height: 1px;
439
+ overflow: hidden;
440
+ clip: rect(0 0 0 0);
441
+ white-space: nowrap;
442
+ }
443
+
444
+ .chat-attachments {
445
+ display: flex;
446
+ flex-wrap: wrap;
447
+ gap: var(--chat-space-2);
448
+ padding: var(--chat-space-1) var(--chat-space-1) 0;
449
+ }
450
+
451
+ .chat-attachment {
452
+ position: relative;
453
+ display: inline-flex;
454
+ max-width: 100%;
455
+ align-items: center;
456
+ }
457
+
458
+ .chat-attachment-image img {
459
+ display: block;
460
+ width: 3.25rem;
461
+ height: 3.25rem;
462
+ object-fit: cover;
463
+ border-radius: var(--chat-radius-md);
464
+ background: var(--chat-control-bg);
465
+ }
466
+
467
+ .chat-attachment-file {
468
+ gap: var(--chat-space-1_5);
469
+ border-radius: var(--chat-radius-sm);
470
+ background: var(--chat-control-bg);
471
+ color: var(--chat-fg-muted);
472
+ padding: var(--chat-space-1) var(--chat-space-1) var(--chat-space-1) var(--chat-space-2);
473
+ font-size: var(--chat-fs-14);
474
+ line-height: var(--chat-leading-snug);
475
+ }
476
+
477
+ .chat-attachment-name {
478
+ max-width: 12rem;
479
+ overflow: hidden;
480
+ text-overflow: ellipsis;
481
+ white-space: nowrap;
482
+ }
483
+
484
+ .chat-attachment-remove {
485
+ display: inline-flex;
486
+ height: 1.25rem;
487
+ width: 1.25rem;
488
+ flex: 0 0 auto;
489
+ align-items: center;
490
+ justify-content: center;
491
+ border: 0;
492
+ border-radius: var(--chat-radius-pill);
493
+ background: transparent;
494
+ color: var(--chat-fg-subtle);
495
+ cursor: pointer;
496
+ }
497
+
498
+ .chat-attachment-image .chat-attachment-remove {
499
+ position: absolute;
500
+ top: 0.15rem;
501
+ right: 0.15rem;
502
+ background: var(--chat-bg);
503
+ }
504
+
505
+ .chat-attachment-remove:hover {
506
+ background: var(--chat-control-hover);
507
+ color: var(--chat-fg);
508
+ }
509
+
510
+ .chat-composer-input {
511
+ display: flex;
512
+ justify-content: center;
513
+ width: 100%;
514
+ }
515
+
516
+ .chat-composer-input textarea {
517
+ min-height: 2.75rem;
518
+ max-height: min(40vh, 20rem);
519
+ width: 100%;
520
+ resize: none;
521
+ border: 0;
522
+ border-radius: var(--chat-radius-md);
523
+ background: transparent;
524
+ color: var(--chat-fg);
525
+ font-family: var(--chat-font-sans);
526
+ font-size: var(--chat-body-size);
527
+ font-weight: var(--chat-body-weight);
528
+ line-height: var(--chat-leading-normal);
529
+ letter-spacing: var(--chat-body-tracking);
530
+ outline: none;
531
+ padding: var(--chat-space-3) var(--chat-space-3_5);
532
+ white-space: pre-wrap;
533
+ overflow-wrap: anywhere;
534
+ word-break: break-word;
535
+ overflow-y: hidden;
536
+ overflow-x: hidden;
537
+ scrollbar-width: thin;
538
+ }
539
+
540
+ .chat-composer-input textarea::placeholder {
541
+ color: var(--chat-fg-subtle);
542
+ }
543
+
544
+ .chat-composer-input textarea:disabled {
545
+ cursor: not-allowed;
546
+ opacity: 0.55;
547
+ }
548
+
549
+ .chat-send {
550
+ display: inline-flex;
551
+ height: 2.25rem;
552
+ width: 2.25rem;
553
+ flex: 0 0 auto;
554
+ align-items: center;
555
+ justify-content: center;
556
+ border: 0;
557
+ border-radius: var(--chat-radius-pill);
558
+ background: var(--chat-primary);
559
+ color: var(--chat-primary-fg);
560
+ cursor: pointer;
561
+ transition:
562
+ opacity var(--chat-transition),
563
+ background-color var(--chat-transition);
564
+ }
565
+
566
+ .chat-send:hover:not(:disabled) {
567
+ opacity: 0.88;
568
+ }
569
+
570
+ .chat-send:focus-visible {
571
+ box-shadow: 0 0 0 2px color-mix(in oklab, var(--chat-ring) 40%, transparent);
572
+ }
573
+
574
+ .chat-send:disabled {
575
+ cursor: not-allowed;
576
+ opacity: 0.35;
577
+ }
578
+
579
+ .chat-send[data-state="stop"] {
580
+ background: var(--chat-fg-muted);
581
+ color: var(--chat-bg);
582
+ }
583
+
584
+ .chat-model-trigger {
585
+ display: inline-flex;
586
+ min-height: 2.125rem;
587
+ min-width: 11rem;
588
+ align-items: center;
589
+ justify-content: space-between;
590
+ gap: var(--chat-space-2);
591
+ border: 0;
592
+ border-radius: var(--chat-radius-pill);
593
+ background: transparent;
594
+ color: var(--chat-fg-muted);
595
+ cursor: pointer;
596
+ font-size: var(--chat-fs-13);
597
+ line-height: var(--chat-leading-tight);
598
+ font-weight: var(--chat-weight-regular);
599
+ letter-spacing: var(--chat-tracking-normal);
600
+ padding: var(--chat-space-1_5) var(--chat-space-3) var(--chat-space-1_5) var(--chat-space-3_5);
601
+ white-space: nowrap;
602
+ transition:
603
+ background-color var(--chat-transition),
604
+ color var(--chat-transition),
605
+ box-shadow var(--chat-transition);
606
+ }
607
+
608
+ .chat-model-trigger:hover:not(:disabled) {
609
+ background: var(--chat-control-bg);
610
+ color: var(--chat-fg);
611
+ }
612
+
613
+ .chat-model-trigger:focus-visible {
614
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--chat-ring) 30%, transparent);
615
+ }
616
+
617
+ .chat-model-trigger:disabled {
618
+ cursor: not-allowed;
619
+ opacity: 0.5;
620
+ }
621
+
622
+ .chat-message {
623
+ width: 100%;
624
+ }
625
+
626
+ .chat-message-user {
627
+ display: flex;
628
+ justify-content: flex-end;
629
+ }
630
+
631
+ .chat-message-user-inner {
632
+ display: flex;
633
+ max-width: min(85%, 36rem);
634
+ flex-direction: column;
635
+ align-items: flex-end;
636
+ gap: var(--chat-space-2);
637
+ }
638
+
639
+ .chat-message-user-inner.is-editing {
640
+ width: min(85%, 36rem);
641
+ }
642
+
643
+ .chat-message-bubble {
644
+ width: 100%;
645
+ border-radius: var(--chat-radius-lg);
646
+ background: var(--chat-user-bg);
647
+ color: var(--chat-user-fg);
648
+ padding: var(--chat-space-2_5) var(--chat-space-4);
649
+ }
650
+
651
+ .chat-message-user-inner.is-editing .chat-message-bubble {
652
+ padding: var(--chat-space-2) var(--chat-space-2_5);
653
+ }
654
+
655
+ .chat-message-assistant {
656
+ display: flex;
657
+ width: 100%;
658
+ justify-content: flex-start;
659
+ color: var(--chat-assistant-fg);
660
+ }
661
+
662
+ .chat-message-assistant-inner {
663
+ width: 100%;
664
+ max-width: 100%;
665
+ overflow: hidden;
666
+ padding-top: var(--chat-space-05);
667
+ }
668
+
669
+ .chat-message-feedback {
670
+ display: flex;
671
+ align-items: center;
672
+ gap: var(--chat-space-1_5);
673
+ margin-top: var(--chat-space-2);
674
+ }
675
+
676
+ .chat-message-usage {
677
+ margin: var(--chat-space-3) 0 0;
678
+ color: var(--chat-fg-muted);
679
+ font-size: var(--chat-caption-size);
680
+ font-weight: var(--chat-caption-weight);
681
+ font-variant-numeric: tabular-nums;
682
+ letter-spacing: var(--chat-tracking-normal);
683
+ line-height: var(--chat-caption-leading);
684
+ }
685
+
686
+ .chat-feedback-button {
687
+ display: inline-flex;
688
+ align-items: center;
689
+ justify-content: center;
690
+ width: 1.75rem;
691
+ height: 1.75rem;
692
+ padding: 0;
693
+ border: 0;
694
+ border-radius: var(--chat-radius-sm);
695
+ background: transparent;
696
+ color: var(--chat-fg-subtle);
697
+ cursor: pointer;
698
+ transition:
699
+ color var(--chat-transition),
700
+ background-color var(--chat-transition);
701
+ }
702
+
703
+ .chat-feedback-button:hover:not(:disabled),
704
+ .chat-feedback-button.is-selected {
705
+ background: var(--chat-control-bg);
706
+ color: var(--chat-fg);
707
+ }
708
+
709
+ .chat-feedback-button:disabled {
710
+ cursor: not-allowed;
711
+ opacity: 0.35;
712
+ }
713
+
714
+ .chat-message-actions {
715
+ display: flex;
716
+ align-items: center;
717
+ gap: var(--chat-space-2);
718
+ }
719
+
720
+ .chat-text-button {
721
+ display: inline-flex;
722
+ align-items: center;
723
+ justify-content: center;
724
+ border: 0;
725
+ border-radius: var(--chat-radius-pill);
726
+ background: transparent;
727
+ color: var(--chat-fg-muted);
728
+ cursor: pointer;
729
+ font-size: var(--chat-caption-size);
730
+ font-weight: var(--chat-weight-medium);
731
+ letter-spacing: var(--chat-tracking-normal);
732
+ line-height: var(--chat-leading-none);
733
+ padding: var(--chat-space-2) var(--chat-space-2);
734
+ transition:
735
+ color var(--chat-transition),
736
+ background-color var(--chat-transition);
737
+ }
738
+
739
+ .chat-text-button:hover:not(:disabled) {
740
+ background: var(--chat-control-bg);
741
+ color: var(--chat-fg);
742
+ }
743
+
744
+ .chat-text-button-done {
745
+ color: var(--chat-fg);
746
+ }
747
+
748
+ .chat-text-button:disabled {
749
+ cursor: not-allowed;
750
+ opacity: 0.4;
751
+ }
752
+
753
+ .chat-icon-button {
754
+ display: inline-flex;
755
+ height: 1.75rem;
756
+ width: 1.75rem;
757
+ align-items: center;
758
+ justify-content: center;
759
+ border: 0;
760
+ border-radius: var(--chat-radius-pill);
761
+ background: transparent;
762
+ color: var(--chat-fg-subtle);
763
+ cursor: pointer;
764
+ padding: 3px 4px;
765
+ opacity: 0;
766
+ transition:
767
+ opacity var(--chat-transition),
768
+ color var(--chat-transition),
769
+ background-color var(--chat-transition);
770
+ }
771
+
772
+ .chat-message-user-inner:hover .chat-icon-button,
773
+ .chat-icon-button:focus-visible {
774
+ opacity: 1;
775
+ }
776
+
777
+ .chat-icon-button:hover {
778
+ background: var(--chat-control-bg);
779
+ color: var(--chat-fg);
780
+ }
781
+
782
+ .chat-icon-button:disabled {
783
+ cursor: not-allowed;
784
+ opacity: 0.35;
785
+ }
786
+
787
+ .chat-edit-area {
788
+ display: block;
789
+ box-sizing: border-box;
790
+ min-height: 7rem;
791
+ width: 100%;
792
+ resize: none;
793
+ border: 0;
794
+ border-radius: calc(var(--chat-radius-lg) - 0.35rem);
795
+ background: transparent;
796
+ color: inherit;
797
+ font-family: var(--chat-font-sans);
798
+ font-size: var(--chat-body-size);
799
+ font-weight: var(--chat-body-weight);
800
+ line-height: var(--chat-body-leading);
801
+ letter-spacing: var(--chat-body-tracking);
802
+ outline: none;
803
+ padding: var(--chat-space-1) var(--chat-space-1_5);
804
+ }
805
+
806
+ .chat-edit-area:focus-visible {
807
+ box-shadow: none;
808
+ }
809
+
810
+ .chat-reference-action {
811
+ position: absolute;
812
+ z-index: 50;
813
+ display: inline-flex;
814
+ align-items: center;
815
+ justify-content: center;
816
+ height: 2rem;
817
+ padding: 0 var(--chat-space-2_5);
818
+ transform: translate(-50%, calc(-100% - 0.75rem));
819
+ border: 1px solid var(--chat-border);
820
+ border-radius: var(--chat-radius-sm);
821
+ background: var(--chat-bg-elevated);
822
+ color: var(--chat-fg);
823
+ cursor: pointer;
824
+ font-family: var(--chat-font-mono);
825
+ font-size: var(--chat-caption-size);
826
+ font-weight: var(--chat-weight-medium);
827
+ letter-spacing: var(--chat-tracking-normal);
828
+ line-height: var(--chat-leading-none);
829
+ box-shadow: var(--chat-composer-shadow);
830
+ pointer-events: auto;
831
+ user-select: none;
832
+ touch-action: manipulation;
833
+ transition: none;
834
+ white-space: nowrap;
835
+ }
836
+
837
+ .chat-reference-action:hover {
838
+ cursor: pointer;
839
+ opacity: 0.92;
840
+ }
841
+
842
+ .chat-references {
843
+ display: flex;
844
+ flex-wrap: wrap;
845
+ gap: var(--chat-space-1_5);
846
+ padding: var(--chat-space-05) var(--chat-space-1_5) var(--chat-space-05);
847
+ }
848
+
849
+ .chat-reference {
850
+ display: inline-flex;
851
+ max-width: 100%;
852
+ align-items: center;
853
+ gap: var(--chat-space-1_5);
854
+ border: 0;
855
+ border-radius: var(--chat-radius-sm);
856
+ background: var(--chat-control-bg);
857
+ color: var(--chat-fg-muted);
858
+ padding: var(--chat-space-1) var(--chat-space-1) var(--chat-space-1) var(--chat-space-2);
859
+ font-size: var(--chat-fs-14);
860
+ line-height: var(--chat-leading-snug);
861
+ font-weight: var(--chat-weight-regular);
862
+ letter-spacing: var(--chat-tracking-normal);
863
+ }
864
+
865
+ .chat-reference .chat-reference-label {
866
+ display: none;
867
+ }
868
+
869
+ .chat-user-reference-item .chat-reference-label {
870
+ margin-bottom: var(--chat-space-05);
871
+ color: var(--chat-fg-subtle);
872
+ font-size: var(--chat-label-size);
873
+ font-weight: var(--chat-label-weight);
874
+ letter-spacing: var(--chat-label-tracking);
875
+ line-height: var(--chat-label-leading);
876
+ text-transform: uppercase;
877
+ }
878
+
879
+ .chat-reference .chat-reference-text {
880
+ min-width: 0;
881
+ overflow: hidden;
882
+ color: var(--chat-fg-muted);
883
+ text-overflow: ellipsis;
884
+ white-space: nowrap;
885
+ max-width: 14rem;
886
+ }
887
+
888
+ .chat-user-reference-item .chat-reference-text {
889
+ color: var(--chat-fg);
890
+ white-space: normal;
891
+ }
892
+
893
+ .chat-reference .chat-icon-button {
894
+ height: 1.35rem;
895
+ width: 1.35rem;
896
+ flex: 0 0 auto;
897
+ opacity: 0.7;
898
+ color: var(--chat-fg-subtle);
899
+ }
900
+
901
+ .chat-reference .chat-icon-button:hover {
902
+ opacity: 1;
903
+ background: var(--chat-control-hover);
904
+ color: var(--chat-fg);
905
+ }
906
+
907
+ .chat-user-reference {
908
+ margin-bottom: var(--chat-space-3);
909
+ display: flex;
910
+ flex-direction: column;
911
+ gap: var(--chat-space-2);
912
+ }
913
+
914
+ .chat-user-reference-item {
915
+ padding: 0 0 var(--chat-space-2);
916
+ text-align: left;
917
+ font-size: var(--chat-fs-14);
918
+ line-height: var(--chat-leading-normal);
919
+ font-weight: var(--chat-weight-regular);
920
+ letter-spacing: var(--chat-tracking-normal);
921
+ color: var(--chat-fg-muted);
922
+ }
923
+
924
+ .chat-message-content {
925
+ display: flex;
926
+ flex-direction: column;
927
+ gap: var(--chat-space-5);
928
+ color: inherit;
929
+ font-size: var(--chat-body-size);
930
+ line-height: var(--chat-body-leading);
931
+ font-weight: var(--chat-body-weight);
932
+ letter-spacing: var(--chat-body-tracking);
933
+ }
934
+
935
+ @media (prefers-reduced-motion: reduce) {
936
+ .chat-root *,
937
+ .chat-root *::before,
938
+ .chat-root *::after {
939
+ animation-duration: 0.01ms !important;
940
+ animation-iteration-count: 1 !important;
941
+ transition-duration: 0.01ms !important;
942
+ }
943
+ }
944
+
945
+ @media (max-width: 640px) {
946
+ .chat-messages {
947
+ padding-left: var(--chat-space-3);
948
+ padding-right: var(--chat-space-3);
949
+ }
950
+
951
+ .chat-composer {
952
+ padding-left: var(--chat-space-3);
953
+ padding-right: var(--chat-space-3);
954
+ }
955
+
956
+ .chat-message-user-inner {
957
+ max-width: 92%;
958
+ }
959
+ }