django-agent-studio 0.1.0__py3-none-any.whl

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,1401 @@
1
+ /**
2
+ * Agent Frontend - Chat Widget Styles
3
+ * Embeddable chat widget CSS - works standalone without any framework dependencies.
4
+ *
5
+ * CSS Isolation:
6
+ * - All classes prefixed with 'cw-' to avoid conflicts
7
+ * - CSS variables scoped to .cw-container
8
+ * - Uses 'all: initial' to reset inherited styles
9
+ * - High z-index to stay above host page content
10
+ */
11
+
12
+ /* Container - resets all inherited styles and scopes CSS variables */
13
+ .cw-container {
14
+ /* Reset all inherited styles */
15
+ all: initial;
16
+
17
+ /* CSS Variables scoped to widget */
18
+ --cw-primary: #0066cc;
19
+ --cw-bg: #ffffff;
20
+ --cw-bg-muted: #f5f5f5;
21
+ --cw-text: #1a1a1a;
22
+ --cw-text-muted: #666666;
23
+ --cw-border: #e0e0e0;
24
+ --cw-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
25
+ --cw-radius: 12px;
26
+ --cw-radius-sm: 8px;
27
+
28
+ /* Positioning */
29
+ position: fixed;
30
+ z-index: 99999;
31
+
32
+ /* Typography baseline */
33
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
34
+ font-size: 14px;
35
+ line-height: 1.5;
36
+ color: var(--cw-text);
37
+
38
+ /* Ensure text rendering */
39
+ -webkit-font-smoothing: antialiased;
40
+ -moz-osx-font-smoothing: grayscale;
41
+ }
42
+
43
+ /* Ensure all children inherit from container, not host page */
44
+ .cw-container *,
45
+ .cw-container *::before,
46
+ .cw-container *::after {
47
+ box-sizing: border-box;
48
+ }
49
+
50
+ .cw-position-bottom-right {
51
+ bottom: 24px;
52
+ right: 24px;
53
+ }
54
+
55
+ .cw-position-bottom-left {
56
+ bottom: 24px;
57
+ left: 24px;
58
+ }
59
+
60
+ /* Floating Action Button */
61
+ .cw-fab {
62
+ width: 56px;
63
+ height: 56px;
64
+ border-radius: 50%;
65
+ border: none;
66
+ cursor: pointer;
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ box-shadow: var(--cw-shadow);
71
+ transition: transform 0.2s, box-shadow 0.2s;
72
+ color: white;
73
+ }
74
+
75
+ .cw-fab:hover {
76
+ transform: scale(1.05);
77
+ box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
78
+ }
79
+
80
+ .cw-icon {
81
+ width: 24px;
82
+ height: 24px;
83
+ }
84
+
85
+ .cw-icon-sm {
86
+ width: 16px;
87
+ height: 16px;
88
+ }
89
+
90
+ /* Widget container */
91
+ .cw-widget {
92
+ width: 380px;
93
+ height: 500px;
94
+ background: var(--cw-bg);
95
+ border-radius: var(--cw-radius);
96
+ box-shadow: var(--cw-shadow);
97
+ display: flex;
98
+ flex-direction: column;
99
+ overflow: hidden;
100
+ transition: all 0.2s ease;
101
+ }
102
+
103
+ .cw-widget-expanded {
104
+ width: 600px;
105
+ height: 80vh;
106
+ max-height: 800px;
107
+ }
108
+
109
+ /* Header */
110
+ .cw-header {
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: space-between;
114
+ padding: 12px 16px;
115
+ color: white;
116
+ border-radius: var(--cw-radius) var(--cw-radius) 0 0;
117
+ }
118
+
119
+ .cw-title {
120
+ font-weight: 600;
121
+ font-size: 15px;
122
+ }
123
+
124
+ .cw-header-actions {
125
+ display: flex;
126
+ align-items: center;
127
+ gap: 4px;
128
+ }
129
+
130
+ .cw-header-btn {
131
+ background: transparent;
132
+ border: none;
133
+ color: white;
134
+ width: 28px;
135
+ height: 28px;
136
+ border-radius: 6px;
137
+ cursor: pointer;
138
+ display: flex;
139
+ align-items: center;
140
+ justify-content: center;
141
+ transition: background 0.15s;
142
+ font-size: 14px;
143
+ }
144
+
145
+ .cw-header-btn:hover:not(:disabled) {
146
+ background: rgba(255, 255, 255, 0.2);
147
+ }
148
+
149
+ .cw-header-btn:disabled {
150
+ opacity: 0.5;
151
+ cursor: not-allowed;
152
+ }
153
+
154
+ .cw-btn-active {
155
+ background: rgba(255, 255, 255, 0.3);
156
+ }
157
+
158
+ .cw-icon-warning {
159
+ color: #ffd700;
160
+ }
161
+
162
+ .cw-btn-speaking {
163
+ animation: pulse-speaking 1.5s ease-in-out infinite;
164
+ }
165
+
166
+ @keyframes pulse-speaking {
167
+ 0%, 100% {
168
+ background: rgba(255, 255, 255, 0.3);
169
+ }
170
+ 50% {
171
+ background: rgba(255, 255, 255, 0.5);
172
+ }
173
+ }
174
+
175
+ /* Voice Settings */
176
+ .cw-voice-settings {
177
+ background: var(--cw-bg-muted);
178
+ border-bottom: 1px solid var(--cw-border);
179
+ animation: slideDown 0.2s ease-out;
180
+ }
181
+
182
+ @keyframes slideDown {
183
+ from {
184
+ max-height: 0;
185
+ opacity: 0;
186
+ }
187
+ to {
188
+ max-height: 200px;
189
+ opacity: 1;
190
+ }
191
+ }
192
+
193
+ .cw-voice-settings-header {
194
+ display: flex;
195
+ justify-content: space-between;
196
+ align-items: center;
197
+ padding: 8px 16px;
198
+ font-size: 13px;
199
+ font-weight: 600;
200
+ color: var(--cw-text);
201
+ border-bottom: 1px solid var(--cw-border);
202
+ }
203
+
204
+ .cw-voice-settings-close {
205
+ all: initial;
206
+ font-family: inherit;
207
+ background: none;
208
+ border: none;
209
+ color: var(--cw-text-muted);
210
+ cursor: pointer;
211
+ font-size: 16px;
212
+ padding: 4px;
213
+ line-height: 1;
214
+ transition: color 0.15s;
215
+ }
216
+
217
+ .cw-voice-settings-close:hover {
218
+ color: var(--cw-text);
219
+ }
220
+
221
+ .cw-voice-settings-content {
222
+ padding: 12px 16px;
223
+ display: flex;
224
+ flex-direction: column;
225
+ gap: 12px;
226
+ }
227
+
228
+ .cw-voice-setting {
229
+ display: flex;
230
+ flex-direction: column;
231
+ gap: 4px;
232
+ }
233
+
234
+ .cw-voice-setting label {
235
+ font-size: 12px;
236
+ font-weight: 500;
237
+ color: var(--cw-text-muted);
238
+ }
239
+
240
+ .cw-voice-select {
241
+ all: initial;
242
+ font-family: inherit;
243
+ width: 100%;
244
+ padding: 8px 12px;
245
+ border: 1px solid var(--cw-border);
246
+ border-radius: 6px;
247
+ background: var(--cw-bg);
248
+ color: var(--cw-text);
249
+ font-size: 13px;
250
+ cursor: pointer;
251
+ transition: border-color 0.15s;
252
+ }
253
+
254
+ .cw-voice-select:hover {
255
+ border-color: var(--cw-primary);
256
+ }
257
+
258
+ .cw-voice-select:focus {
259
+ outline: none;
260
+ border-color: var(--cw-primary);
261
+ box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
262
+ }
263
+
264
+ /* Status bar */
265
+ .cw-status-bar {
266
+ display: flex;
267
+ gap: 8px;
268
+ justify-content: center;
269
+ padding: 4px 16px;
270
+ background: var(--cw-bg-muted);
271
+ color: var(--cw-text-muted);
272
+ font-size: 12px;
273
+ border-bottom: 1px solid var(--cw-border);
274
+ }
275
+
276
+ /* Messages area */
277
+ .cw-messages {
278
+ flex: 1;
279
+ overflow-y: auto;
280
+ padding: 16px;
281
+ display: flex;
282
+ flex-direction: column;
283
+ gap: 12px;
284
+ }
285
+
286
+ /* Empty state */
287
+ .cw-empty-state {
288
+ flex: 1;
289
+ display: flex;
290
+ flex-direction: column;
291
+ align-items: center;
292
+ justify-content: center;
293
+ text-align: center;
294
+ color: var(--cw-text-muted);
295
+ padding: 24px;
296
+ }
297
+
298
+ .cw-empty-icon {
299
+ width: 48px;
300
+ height: 48px;
301
+ margin-bottom: 16px;
302
+ opacity: 0.5;
303
+ }
304
+
305
+ .cw-empty-state h3 {
306
+ margin: 0 0 8px 0;
307
+ font-size: 16px;
308
+ font-weight: 600;
309
+ color: var(--cw-text);
310
+ }
311
+
312
+ .cw-empty-state p {
313
+ margin: 0;
314
+ font-size: 13px;
315
+ }
316
+
317
+ /* Message rows */
318
+ .cw-message-row {
319
+ display: flex;
320
+ justify-content: flex-start;
321
+ }
322
+
323
+ .cw-message-row-user {
324
+ justify-content: flex-end;
325
+ }
326
+
327
+ /* Messages */
328
+ .cw-message {
329
+ max-width: 80%;
330
+ padding: 10px 14px;
331
+ border-radius: var(--cw-radius-sm);
332
+ background: var(--cw-bg-muted);
333
+ color: var(--cw-text);
334
+ word-wrap: break-word;
335
+ }
336
+
337
+ .cw-message-user {
338
+ background: var(--cw-primary);
339
+ color: white;
340
+ }
341
+
342
+ .cw-message-tool-call {
343
+ background: rgba(59, 130, 246, 0.1);
344
+ color: #1d4ed8;
345
+ border: 1px solid rgba(59, 130, 246, 0.2);
346
+ font-family: monospace;
347
+ font-size: 12px;
348
+ }
349
+
350
+ .cw-message-tool-result {
351
+ background: rgba(34, 197, 94, 0.1);
352
+ color: #15803d;
353
+ border: 1px solid rgba(34, 197, 94, 0.2);
354
+ font-family: monospace;
355
+ font-size: 12px;
356
+ }
357
+
358
+ .cw-message-error {
359
+ background: rgba(239, 68, 68, 0.1);
360
+ color: #dc2626;
361
+ border: 1px solid rgba(239, 68, 68, 0.2);
362
+ }
363
+
364
+ .cw-tool-args {
365
+ margin: 8px 0 0 0;
366
+ padding: 8px;
367
+ background: rgba(0, 0, 0, 0.05);
368
+ border-radius: 4px;
369
+ font-size: 11px;
370
+ overflow-x: auto;
371
+ white-space: pre-wrap;
372
+ }
373
+
374
+ /* Compact inline tool messages */
375
+ .cw-tool-message {
376
+ padding: 6px 12px;
377
+ margin: 4px 16px;
378
+ font-size: 12px;
379
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
380
+ border-radius: 6px;
381
+ }
382
+
383
+ .cw-tool-message.cw-tool-call {
384
+ background: rgba(59, 130, 246, 0.08);
385
+ color: #2563eb;
386
+ border-left: 3px solid #3b82f6;
387
+ }
388
+
389
+ .cw-tool-message.cw-tool-result {
390
+ background: rgba(34, 197, 94, 0.08);
391
+ color: #16a34a;
392
+ border-left: 3px solid #22c55e;
393
+ }
394
+
395
+ .cw-tool-label {
396
+ cursor: pointer;
397
+ display: flex;
398
+ align-items: center;
399
+ gap: 6px;
400
+ }
401
+
402
+ .cw-tool-expand {
403
+ font-size: 10px;
404
+ opacity: 0.6;
405
+ }
406
+
407
+ .cw-tool-details {
408
+ margin: 8px 0 0 0;
409
+ padding: 8px;
410
+ background: rgba(0, 0, 0, 0.04);
411
+ border-radius: 4px;
412
+ font-size: 11px;
413
+ overflow-x: auto;
414
+ white-space: pre-wrap;
415
+ max-height: 200px;
416
+ overflow-y: auto;
417
+ }
418
+
419
+ /* Markdown styles in messages */
420
+ .cw-message a {
421
+ color: inherit;
422
+ text-decoration: underline;
423
+ }
424
+
425
+ .cw-message a:hover {
426
+ text-decoration: none;
427
+ }
428
+
429
+ .cw-message code {
430
+ background: rgba(0, 0, 0, 0.1);
431
+ padding: 2px 4px;
432
+ border-radius: 3px;
433
+ font-family: monospace;
434
+ font-size: 12px;
435
+ }
436
+
437
+ .cw-message strong {
438
+ font-weight: 600;
439
+ }
440
+
441
+ .cw-message ul, .cw-message ol {
442
+ margin: 8px 0;
443
+ padding-left: 20px;
444
+ }
445
+
446
+ .cw-message li {
447
+ margin: 4px 0;
448
+ }
449
+
450
+ /* Typing indicator */
451
+ .cw-typing {
452
+ display: flex;
453
+ align-items: center;
454
+ gap: 8px;
455
+ padding: 10px 14px;
456
+ background: var(--cw-bg-muted);
457
+ border-radius: var(--cw-radius-sm);
458
+ color: var(--cw-text-muted);
459
+ font-size: 13px;
460
+ }
461
+
462
+ /* Spinner */
463
+ .cw-spinner {
464
+ display: inline-block;
465
+ width: 16px;
466
+ height: 16px;
467
+ border: 2px solid currentColor;
468
+ border-right-color: transparent;
469
+ border-radius: 50%;
470
+ animation: cw-spin 0.75s linear infinite;
471
+ }
472
+
473
+ @keyframes cw-spin {
474
+ to { transform: rotate(360deg); }
475
+ }
476
+
477
+ /* Load more messages indicator */
478
+ .cw-load-more {
479
+ display: flex;
480
+ align-items: center;
481
+ justify-content: center;
482
+ gap: 8px;
483
+ padding: 12px 16px;
484
+ margin: 8px 16px;
485
+ background: var(--cw-bg-muted);
486
+ border-radius: var(--cw-radius-sm);
487
+ color: var(--cw-text-muted);
488
+ font-size: 12px;
489
+ cursor: pointer;
490
+ transition: background-color 0.2s ease;
491
+ border: 1px dashed var(--cw-border);
492
+ }
493
+
494
+ .cw-load-more:hover {
495
+ background: var(--cw-border);
496
+ }
497
+
498
+ .cw-load-more .cw-spinner {
499
+ width: 14px;
500
+ height: 14px;
501
+ }
502
+
503
+ /* Error bar */
504
+ .cw-error-bar {
505
+ padding: 8px 16px;
506
+ background: rgba(239, 68, 68, 0.1);
507
+ color: #dc2626;
508
+ font-size: 13px;
509
+ border-top: 1px solid rgba(239, 68, 68, 0.2);
510
+ }
511
+
512
+ /* Input form */
513
+ .cw-input-form {
514
+ display: flex;
515
+ gap: 8px;
516
+ padding: 12px 16px;
517
+ border-top: 1px solid var(--cw-border);
518
+ background: var(--cw-bg);
519
+ }
520
+
521
+ .cw-input {
522
+ flex: 1;
523
+ padding: 10px 14px;
524
+ border: 1px solid var(--cw-border);
525
+ border-radius: var(--cw-radius-sm);
526
+ font-size: 14px;
527
+ outline: none;
528
+ transition: border-color 0.15s;
529
+ resize: none;
530
+ min-height: 40px;
531
+ max-height: 150px;
532
+ line-height: 1.4;
533
+ font-family: inherit;
534
+ }
535
+
536
+ .cw-input:focus {
537
+ border-color: var(--cw-primary);
538
+ }
539
+
540
+ .cw-input:disabled {
541
+ background: var(--cw-bg-muted);
542
+ cursor: not-allowed;
543
+ }
544
+
545
+ .cw-send-btn {
546
+ width: 40px;
547
+ height: 40px;
548
+ border: none;
549
+ border-radius: var(--cw-radius-sm);
550
+ cursor: pointer;
551
+ display: flex;
552
+ align-items: center;
553
+ justify-content: center;
554
+ color: white;
555
+ font-size: 16px;
556
+ transition: background-color 0.15s, opacity 0.15s;
557
+ }
558
+
559
+ .cw-send-btn:hover:not(:disabled) {
560
+ opacity: 0.9;
561
+ }
562
+
563
+ .cw-send-btn:disabled {
564
+ opacity: 0.5;
565
+ cursor: not-allowed;
566
+ }
567
+
568
+ /* Loading state - clickable to cancel */
569
+ .cw-send-btn.cw-send-btn-loading {
570
+ cursor: pointer;
571
+ opacity: 1;
572
+ }
573
+
574
+ .cw-send-btn.cw-send-btn-loading:hover {
575
+ opacity: 1;
576
+ }
577
+
578
+ /* Stop button state on hover */
579
+ .cw-send-btn.cw-send-btn-stop {
580
+ background-color: #dc2626 !important;
581
+ }
582
+
583
+ /* Dropdown */
584
+ .cw-dropdown {
585
+ position: relative;
586
+ }
587
+
588
+ .cw-dropdown-menu {
589
+ position: absolute;
590
+ top: 100%;
591
+ right: 0;
592
+ margin-top: 4px;
593
+ min-width: 200px;
594
+ background: var(--cw-bg);
595
+ border: 1px solid var(--cw-border);
596
+ border-radius: var(--cw-radius-sm);
597
+ box-shadow: var(--cw-shadow);
598
+ z-index: 100;
599
+ overflow: hidden;
600
+ }
601
+
602
+ .cw-dropdown-hidden {
603
+ display: none;
604
+ }
605
+
606
+ .cw-dropdown-label {
607
+ padding: 8px 12px;
608
+ font-size: 12px;
609
+ font-weight: 600;
610
+ color: var(--cw-text-muted);
611
+ text-transform: uppercase;
612
+ letter-spacing: 0.5px;
613
+ }
614
+
615
+ .cw-dropdown-separator {
616
+ height: 1px;
617
+ background: var(--cw-border);
618
+ margin: 4px 0;
619
+ }
620
+
621
+ .cw-dropdown-item {
622
+ display: block;
623
+ width: 100%;
624
+ padding: 10px 12px;
625
+ border: none;
626
+ background: transparent;
627
+ text-align: left;
628
+ font-size: 14px;
629
+ color: var(--cw-text);
630
+ cursor: pointer;
631
+ transition: background 0.15s;
632
+ }
633
+
634
+ .cw-dropdown-item:hover {
635
+ background: var(--cw-bg-muted);
636
+ }
637
+
638
+ .cw-dropdown-item-danger {
639
+ color: #dc2626;
640
+ }
641
+
642
+ .cw-dropdown-item-danger:hover {
643
+ background: rgba(239, 68, 68, 0.1);
644
+ }
645
+
646
+ /* Auto-run controls */
647
+ .cw-autorun-controls {
648
+ padding: 8px 12px;
649
+ display: flex;
650
+ flex-direction: column;
651
+ gap: 8px;
652
+ }
653
+
654
+ .cw-control-label {
655
+ display: flex;
656
+ align-items: center;
657
+ gap: 8px;
658
+ font-size: 13px;
659
+ color: var(--cw-text);
660
+ cursor: pointer;
661
+ padding: 4px;
662
+ border-radius: 4px;
663
+ transition: background 0.15s;
664
+ }
665
+
666
+ .cw-control-label:hover {
667
+ background: var(--cw-bg-muted);
668
+ }
669
+
670
+ .cw-control-label input[type="radio"] {
671
+ margin: 0;
672
+ cursor: pointer;
673
+ }
674
+
675
+ .cw-delay-control {
676
+ padding: 8px 12px;
677
+ }
678
+
679
+ .cw-delay-control input[type="range"] {
680
+ width: 100%;
681
+ margin-top: 4px;
682
+ cursor: pointer;
683
+ }
684
+
685
+ /* Continue button */
686
+ .cw-continue-bar {
687
+ padding: 12px 16px;
688
+ background: var(--cw-bg-muted);
689
+ border-top: 1px solid var(--cw-border);
690
+ display: flex;
691
+ justify-content: center;
692
+ }
693
+
694
+ .cw-continue-btn {
695
+ padding: 10px 20px;
696
+ border: none;
697
+ border-radius: var(--cw-radius-sm);
698
+ background: var(--cw-primary);
699
+ color: white;
700
+ font-size: 14px;
701
+ font-weight: 600;
702
+ cursor: pointer;
703
+ transition: opacity 0.15s;
704
+ display: flex;
705
+ align-items: center;
706
+ gap: 6px;
707
+ }
708
+
709
+ .cw-continue-btn:hover {
710
+ opacity: 0.9;
711
+ }
712
+
713
+ .cw-continue-btn:active {
714
+ opacity: 0.8;
715
+ }
716
+
717
+ /* Responsive */
718
+ @media (max-width: 480px) {
719
+ .cw-widget {
720
+ width: calc(100vw - 32px);
721
+ height: calc(100vh - 100px);
722
+ max-height: none;
723
+ }
724
+
725
+ .cw-widget-expanded {
726
+ width: calc(100vw - 16px);
727
+ height: calc(100vh - 32px);
728
+ }
729
+
730
+ .cw-container {
731
+ bottom: 16px;
732
+ right: 16px;
733
+ left: 16px;
734
+ }
735
+
736
+ .cw-position-bottom-left {
737
+ right: 16px;
738
+ }
739
+ }
740
+
741
+ /* Dark mode support */
742
+ @media (prefers-color-scheme: dark) {
743
+ :root {
744
+ --cw-bg: #1a1a1a;
745
+ --cw-bg-muted: #2a2a2a;
746
+ --cw-text: #f0f0f0;
747
+ --cw-text-muted: #999999;
748
+ --cw-border: #3a3a3a;
749
+ }
750
+
751
+ .cw-message-tool-call {
752
+ color: #93c5fd;
753
+ }
754
+
755
+ .cw-message-tool-result {
756
+ color: #86efac;
757
+ }
758
+
759
+ .cw-message code {
760
+ background: rgba(255, 255, 255, 0.1);
761
+ }
762
+
763
+ .cw-tool-args {
764
+ background: rgba(255, 255, 255, 0.05);
765
+ }
766
+ }
767
+
768
+ /* Enhanced Markdown Styles (for chat-widget-markdown.js) */
769
+ .cw-message pre {
770
+ background: var(--cw-bg-muted);
771
+ border: 1px solid var(--cw-border);
772
+ border-radius: var(--cw-radius-sm);
773
+ padding: 12px;
774
+ overflow-x: auto;
775
+ margin: 8px 0;
776
+ font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
777
+ font-size: 13px;
778
+ line-height: 1.4;
779
+ }
780
+
781
+ .cw-message pre code {
782
+ background: none;
783
+ padding: 0;
784
+ border-radius: 0;
785
+ }
786
+
787
+ .cw-message table {
788
+ border-collapse: collapse;
789
+ width: 100%;
790
+ margin: 8px 0;
791
+ font-size: 13px;
792
+ }
793
+
794
+ .cw-message table th,
795
+ .cw-message table td {
796
+ border: 1px solid var(--cw-border);
797
+ padding: 8px 12px;
798
+ text-align: left;
799
+ }
800
+
801
+ .cw-message table th {
802
+ background: var(--cw-bg-muted);
803
+ font-weight: 600;
804
+ }
805
+
806
+ .cw-message table tr:nth-child(even) {
807
+ background: rgba(0, 0, 0, 0.02);
808
+ }
809
+
810
+ .cw-message blockquote {
811
+ border-left: 3px solid var(--cw-primary);
812
+ padding-left: 12px;
813
+ margin: 8px 0;
814
+ color: var(--cw-text-muted);
815
+ font-style: italic;
816
+ }
817
+
818
+ .cw-message h1,
819
+ .cw-message h2,
820
+ .cw-message h3,
821
+ .cw-message h4,
822
+ .cw-message h5,
823
+ .cw-message h6 {
824
+ margin: 12px 0 8px 0;
825
+ font-weight: 600;
826
+ line-height: 1.3;
827
+ }
828
+
829
+ .cw-message h1 { font-size: 1.5em; }
830
+ .cw-message h2 { font-size: 1.3em; }
831
+ .cw-message h3 { font-size: 1.1em; }
832
+ .cw-message h4 { font-size: 1em; }
833
+
834
+ .cw-message hr {
835
+ border: none;
836
+ border-top: 1px solid var(--cw-border);
837
+ margin: 12px 0;
838
+ }
839
+
840
+ .cw-message ul,
841
+ .cw-message ol {
842
+ margin: 8px 0;
843
+ padding-left: 24px;
844
+ }
845
+
846
+ .cw-message li {
847
+ margin: 4px 0;
848
+ }
849
+
850
+ .cw-message p {
851
+ margin: 8px 0;
852
+ }
853
+
854
+ .cw-message p:first-child {
855
+ margin-top: 0;
856
+ }
857
+
858
+ .cw-message p:last-child {
859
+ margin-bottom: 0;
860
+ }
861
+
862
+ /* Dark mode adjustments for enhanced markdown */
863
+ @media (prefers-color-scheme: dark) {
864
+ .cw-message pre {
865
+ background: rgba(255, 255, 255, 0.05);
866
+ border-color: rgba(255, 255, 255, 0.1);
867
+ }
868
+
869
+ .cw-message table th {
870
+ background: rgba(255, 255, 255, 0.05);
871
+ }
872
+
873
+ .cw-message table tr:nth-child(even) {
874
+ background: rgba(255, 255, 255, 0.02);
875
+ }
876
+
877
+ .cw-message table th,
878
+ .cw-message table td {
879
+ border-color: rgba(255, 255, 255, 0.1);
880
+ }
881
+ }
882
+
883
+ /* ============================================================================
884
+ Embedded Mode Styles
885
+ ============================================================================ */
886
+
887
+ /* Container for embedded widgets */
888
+ .cw-container-embedded {
889
+ all: initial;
890
+ position: relative;
891
+ width: 100%;
892
+ height: 100%;
893
+ display: block;
894
+
895
+ /* Typography baseline */
896
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
897
+ font-size: 14px;
898
+ line-height: 1.5;
899
+ color: var(--cw-text);
900
+
901
+ /* CSS Variables */
902
+ --cw-primary: #0066cc;
903
+ --cw-bg: #ffffff;
904
+ --cw-bg-muted: #f5f5f5;
905
+ --cw-text: #1a1a1a;
906
+ --cw-text-muted: #666666;
907
+ --cw-border: #e0e0e0;
908
+ --cw-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
909
+ --cw-radius: 12px;
910
+ --cw-radius-sm: 8px;
911
+ }
912
+
913
+ .cw-container-embedded *,
914
+ .cw-container-embedded *::before,
915
+ .cw-container-embedded *::after {
916
+ box-sizing: border-box;
917
+ }
918
+
919
+ /* Embedded widget fills its container */
920
+ .cw-widget-embedded {
921
+ position: absolute;
922
+ top: 0;
923
+ left: 0;
924
+ right: 0;
925
+ bottom: 0;
926
+ width: 100% !important;
927
+ height: 100% !important;
928
+ max-height: none !important;
929
+ border-radius: 0;
930
+ box-shadow: none;
931
+ }
932
+
933
+ /* Embedded widget header can have rounded corners if desired */
934
+ .cw-widget-embedded .cw-header {
935
+ border-radius: 0;
936
+ }
937
+
938
+ /* Ensure messages area fills available space */
939
+ .cw-widget-embedded .cw-messages {
940
+ flex: 1;
941
+ min-height: 0;
942
+ }
943
+
944
+ /* ============================================================================
945
+ Conversation Sidebar Styles
946
+ ============================================================================ */
947
+
948
+ /* Hamburger menu button */
949
+ .cw-hamburger {
950
+ margin-right: 8px;
951
+ }
952
+
953
+ .cw-hamburger svg {
954
+ stroke: currentColor;
955
+ }
956
+
957
+ /* Sidebar overlay */
958
+ .cw-sidebar-overlay {
959
+ position: absolute;
960
+ top: 0;
961
+ left: 0;
962
+ right: 0;
963
+ bottom: 0;
964
+ background: rgba(0, 0, 0, 0.3);
965
+ opacity: 0;
966
+ visibility: hidden;
967
+ transition: opacity 0.2s, visibility 0.2s;
968
+ z-index: 10;
969
+ }
970
+
971
+ .cw-sidebar-overlay-visible {
972
+ opacity: 1;
973
+ visibility: visible;
974
+ }
975
+
976
+ /* Sidebar panel */
977
+ .cw-sidebar {
978
+ position: absolute;
979
+ top: 0;
980
+ left: 0;
981
+ bottom: 0;
982
+ width: 280px;
983
+ max-width: 80%;
984
+ background: var(--cw-bg);
985
+ box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
986
+ transform: translateX(-100%);
987
+ transition: transform 0.25s ease;
988
+ z-index: 20;
989
+ display: flex;
990
+ flex-direction: column;
991
+ }
992
+
993
+ .cw-sidebar-open {
994
+ transform: translateX(0);
995
+ }
996
+
997
+ /* Sidebar header */
998
+ .cw-sidebar-header {
999
+ display: flex;
1000
+ align-items: center;
1001
+ justify-content: space-between;
1002
+ padding: 16px;
1003
+ border-bottom: 1px solid var(--cw-border);
1004
+ font-weight: 600;
1005
+ font-size: 15px;
1006
+ color: var(--cw-text);
1007
+ }
1008
+
1009
+ .cw-sidebar-close {
1010
+ all: initial;
1011
+ font-family: inherit;
1012
+ background: none;
1013
+ border: none;
1014
+ color: var(--cw-text-muted);
1015
+ cursor: pointer;
1016
+ font-size: 18px;
1017
+ padding: 4px 8px;
1018
+ line-height: 1;
1019
+ border-radius: 4px;
1020
+ transition: background 0.15s, color 0.15s;
1021
+ }
1022
+
1023
+ .cw-sidebar-close:hover {
1024
+ background: var(--cw-bg-muted);
1025
+ color: var(--cw-text);
1026
+ }
1027
+
1028
+ /* New conversation button */
1029
+ .cw-new-conversation {
1030
+ all: initial;
1031
+ font-family: inherit;
1032
+ display: flex;
1033
+ align-items: center;
1034
+ justify-content: center;
1035
+ gap: 8px;
1036
+ margin: 12px 16px;
1037
+ padding: 10px 16px;
1038
+ background: var(--cw-primary);
1039
+ color: white;
1040
+ border: none;
1041
+ border-radius: var(--cw-radius-sm);
1042
+ font-size: 14px;
1043
+ font-weight: 500;
1044
+ cursor: pointer;
1045
+ transition: opacity 0.15s;
1046
+ }
1047
+
1048
+ .cw-new-conversation:hover {
1049
+ opacity: 0.9;
1050
+ }
1051
+
1052
+ /* Conversation list */
1053
+ .cw-conversation-list {
1054
+ flex: 1;
1055
+ overflow-y: auto;
1056
+ padding: 8px 0;
1057
+ }
1058
+
1059
+ .cw-sidebar-loading,
1060
+ .cw-sidebar-empty {
1061
+ display: flex;
1062
+ align-items: center;
1063
+ justify-content: center;
1064
+ padding: 24px 16px;
1065
+ color: var(--cw-text-muted);
1066
+ font-size: 13px;
1067
+ }
1068
+
1069
+ /* Conversation item */
1070
+ .cw-conversation-item {
1071
+ display: block;
1072
+ padding: 12px 16px;
1073
+ cursor: pointer;
1074
+ border-left: 3px solid transparent;
1075
+ transition: background 0.15s, border-color 0.15s;
1076
+ }
1077
+
1078
+ .cw-conversation-item:hover {
1079
+ background: var(--cw-bg-muted);
1080
+ }
1081
+
1082
+ .cw-conversation-active {
1083
+ background: var(--cw-bg-muted);
1084
+ border-left-color: var(--cw-primary);
1085
+ }
1086
+
1087
+ .cw-conversation-title {
1088
+ font-size: 14px;
1089
+ font-weight: 500;
1090
+ color: var(--cw-text);
1091
+ white-space: nowrap;
1092
+ overflow: hidden;
1093
+ text-overflow: ellipsis;
1094
+ margin-bottom: 4px;
1095
+ }
1096
+
1097
+ .cw-conversation-date {
1098
+ font-size: 12px;
1099
+ color: var(--cw-text-muted);
1100
+ }
1101
+
1102
+ /* Dark mode for sidebar */
1103
+ @media (prefers-color-scheme: dark) {
1104
+ .cw-sidebar {
1105
+ box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
1106
+ }
1107
+
1108
+ .cw-sidebar-overlay {
1109
+ background: rgba(0, 0, 0, 0.5);
1110
+ }
1111
+ }
1112
+
1113
+ /* ============================================================================
1114
+ Model Selector
1115
+ ============================================================================ */
1116
+
1117
+ .cw-model-selector {
1118
+ position: relative;
1119
+ padding: 8px 12px;
1120
+ border-top: 1px solid var(--cw-border);
1121
+ background: var(--cw-bg-muted);
1122
+ }
1123
+
1124
+ .cw-model-btn {
1125
+ display: flex;
1126
+ align-items: center;
1127
+ gap: 8px;
1128
+ width: 100%;
1129
+ padding: 8px 12px;
1130
+ background: var(--cw-bg);
1131
+ border: 1px solid var(--cw-border);
1132
+ border-radius: var(--cw-radius-sm);
1133
+ cursor: pointer;
1134
+ font-size: 13px;
1135
+ color: var(--cw-text);
1136
+ transition: all 0.2s ease;
1137
+ }
1138
+
1139
+ .cw-model-btn:hover {
1140
+ border-color: var(--cw-primary);
1141
+ background: var(--cw-bg);
1142
+ }
1143
+
1144
+ .cw-model-icon {
1145
+ font-size: 16px;
1146
+ }
1147
+
1148
+ .cw-model-name {
1149
+ flex: 1;
1150
+ text-align: left;
1151
+ font-weight: 500;
1152
+ }
1153
+
1154
+ .cw-model-chevron {
1155
+ font-size: 10px;
1156
+ color: var(--cw-text-muted);
1157
+ }
1158
+
1159
+ .cw-model-dropdown {
1160
+ position: absolute;
1161
+ bottom: 100%;
1162
+ left: 12px;
1163
+ right: 12px;
1164
+ margin-bottom: 4px;
1165
+ background: var(--cw-bg);
1166
+ border: 1px solid var(--cw-border);
1167
+ border-radius: var(--cw-radius-sm);
1168
+ box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
1169
+ max-height: 300px;
1170
+ overflow-y: auto;
1171
+ z-index: 10;
1172
+ }
1173
+
1174
+ .cw-model-option {
1175
+ display: flex;
1176
+ flex-direction: column;
1177
+ align-items: flex-start;
1178
+ width: 100%;
1179
+ padding: 10px 12px;
1180
+ background: none;
1181
+ border: none;
1182
+ border-bottom: 1px solid var(--cw-border);
1183
+ cursor: pointer;
1184
+ text-align: left;
1185
+ transition: background 0.15s ease;
1186
+ }
1187
+
1188
+ .cw-model-option:last-child {
1189
+ border-bottom: none;
1190
+ }
1191
+
1192
+ .cw-model-option:hover {
1193
+ background: var(--cw-bg-muted);
1194
+ }
1195
+
1196
+ .cw-model-option-selected {
1197
+ background: rgba(0, 102, 204, 0.1);
1198
+ }
1199
+
1200
+ .cw-model-option-selected:hover {
1201
+ background: rgba(0, 102, 204, 0.15);
1202
+ }
1203
+
1204
+ .cw-model-option-name {
1205
+ font-weight: 500;
1206
+ font-size: 13px;
1207
+ color: var(--cw-text);
1208
+ }
1209
+
1210
+ .cw-model-option-provider {
1211
+ font-size: 11px;
1212
+ color: var(--cw-text-muted);
1213
+ text-transform: capitalize;
1214
+ }
1215
+
1216
+ .cw-model-option-desc {
1217
+ font-size: 11px;
1218
+ color: var(--cw-text-muted);
1219
+ margin-top: 2px;
1220
+ }
1221
+
1222
+ /* ============================================================================
1223
+ Tool Call Cards (Claude-style)
1224
+ ============================================================================ */
1225
+
1226
+ .cw-tool-card {
1227
+ background: var(--cw-bg);
1228
+ border: 1px solid var(--cw-border);
1229
+ border-radius: var(--cw-radius-sm);
1230
+ margin: 8px 0;
1231
+ overflow: hidden;
1232
+ }
1233
+
1234
+ .cw-tool-header {
1235
+ display: flex;
1236
+ align-items: center;
1237
+ gap: 8px;
1238
+ padding: 10px 12px;
1239
+ background: var(--cw-bg-muted);
1240
+ cursor: pointer;
1241
+ user-select: none;
1242
+ transition: background 0.15s ease;
1243
+ }
1244
+
1245
+ .cw-tool-header:hover {
1246
+ background: #e8e8e8;
1247
+ }
1248
+
1249
+ .cw-tool-icon {
1250
+ font-size: 14px;
1251
+ display: flex;
1252
+ align-items: center;
1253
+ }
1254
+
1255
+ .cw-tool-name {
1256
+ flex: 1;
1257
+ font-weight: 500;
1258
+ font-size: 13px;
1259
+ color: var(--cw-text);
1260
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
1261
+ }
1262
+
1263
+ .cw-tool-status {
1264
+ font-size: 11px;
1265
+ padding: 2px 6px;
1266
+ border-radius: 4px;
1267
+ }
1268
+
1269
+ .cw-tool-running {
1270
+ background: #fef3c7;
1271
+ color: #92400e;
1272
+ }
1273
+
1274
+ .cw-tool-complete {
1275
+ background: #d1fae5;
1276
+ color: #065f46;
1277
+ }
1278
+
1279
+ .cw-tool-chevron {
1280
+ font-size: 10px;
1281
+ color: var(--cw-text-muted);
1282
+ transition: transform 0.2s ease;
1283
+ }
1284
+
1285
+ .cw-tool-body {
1286
+ border-top: 1px solid var(--cw-border);
1287
+ padding: 12px;
1288
+ }
1289
+
1290
+ .cw-tool-section {
1291
+ margin-bottom: 12px;
1292
+ }
1293
+
1294
+ .cw-tool-section:last-child {
1295
+ margin-bottom: 0;
1296
+ }
1297
+
1298
+ .cw-tool-section-title {
1299
+ font-size: 11px;
1300
+ font-weight: 600;
1301
+ color: var(--cw-text-muted);
1302
+ text-transform: uppercase;
1303
+ letter-spacing: 0.5px;
1304
+ margin-bottom: 6px;
1305
+ }
1306
+
1307
+ .cw-tool-code {
1308
+ background: #1e1e1e;
1309
+ color: #d4d4d4;
1310
+ padding: 10px 12px;
1311
+ border-radius: 6px;
1312
+ font-size: 12px;
1313
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
1314
+ overflow-x: auto;
1315
+ white-space: pre-wrap;
1316
+ word-break: break-word;
1317
+ margin: 0;
1318
+ max-height: 200px;
1319
+ overflow-y: auto;
1320
+ }
1321
+
1322
+ .cw-spinner-small {
1323
+ display: inline-block;
1324
+ width: 12px;
1325
+ height: 12px;
1326
+ border: 2px solid #e5e7eb;
1327
+ border-top-color: var(--cw-primary);
1328
+ border-radius: 50%;
1329
+ animation: cw-spin 0.8s linear infinite;
1330
+ }
1331
+
1332
+ /* Debug payload viewer */
1333
+ .cw-debug-payload-btn {
1334
+ position: absolute;
1335
+ top: 2px;
1336
+ right: 2px;
1337
+ width: 20px;
1338
+ height: 20px;
1339
+ padding: 0;
1340
+ border: none;
1341
+ background: rgba(0, 0, 0, 0.1);
1342
+ color: #666;
1343
+ font-size: 10px;
1344
+ font-family: monospace;
1345
+ border-radius: 3px;
1346
+ cursor: pointer;
1347
+ opacity: 0.3;
1348
+ transition: opacity 0.15s;
1349
+ }
1350
+
1351
+ .cw-debug-payload-btn:hover {
1352
+ opacity: 1;
1353
+ background: rgba(0, 0, 0, 0.2);
1354
+ }
1355
+
1356
+ .cw-debug-payload {
1357
+ position: absolute;
1358
+ top: 100%;
1359
+ right: 0;
1360
+ z-index: 100;
1361
+ width: 400px;
1362
+ max-width: 90vw;
1363
+ background: #1e1e1e;
1364
+ border: 1px solid #333;
1365
+ border-radius: 6px;
1366
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
1367
+ margin-top: 4px;
1368
+ }
1369
+
1370
+ .cw-debug-payload-close {
1371
+ position: absolute;
1372
+ top: 4px;
1373
+ right: 4px;
1374
+ width: 20px;
1375
+ height: 20px;
1376
+ padding: 0;
1377
+ border: none;
1378
+ background: #333;
1379
+ color: #999;
1380
+ font-size: 14px;
1381
+ line-height: 1;
1382
+ border-radius: 3px;
1383
+ cursor: pointer;
1384
+ }
1385
+
1386
+ .cw-debug-payload-close:hover {
1387
+ background: #444;
1388
+ color: #fff;
1389
+ }
1390
+
1391
+ .cw-debug-payload-content {
1392
+ margin: 0;
1393
+ padding: 12px;
1394
+ font-size: 11px;
1395
+ font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
1396
+ color: #d4d4d4;
1397
+ white-space: pre-wrap;
1398
+ word-break: break-all;
1399
+ max-height: 300px;
1400
+ overflow-y: auto;
1401
+ }