@m6d/cortex-react 1.0.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.
Files changed (37) hide show
  1. package/dist/index.d.ts +70 -0
  2. package/dist/index.js +3 -0
  3. package/dist/styles.css +2652 -0
  4. package/dist/theme.css +69 -0
  5. package/index.ts +17 -0
  6. package/package.json +67 -0
  7. package/src/chat-session.tsx +379 -0
  8. package/src/components/AttachmentQueue.tsx +75 -0
  9. package/src/components/ChatComposer.tsx +211 -0
  10. package/src/components/CopyButton.tsx +73 -0
  11. package/src/components/CortexChatWidget.tsx +538 -0
  12. package/src/components/JsonTree.tsx +111 -0
  13. package/src/components/LlmUsageBreakdown.tsx +42 -0
  14. package/src/components/LlmUsageChips.tsx +37 -0
  15. package/src/components/Message.tsx +81 -0
  16. package/src/components/MessageAbortedFlag.tsx +29 -0
  17. package/src/components/MessageAttachments.tsx +55 -0
  18. package/src/components/MessageList.tsx +102 -0
  19. package/src/components/MessageLlmInspector.tsx +184 -0
  20. package/src/components/MessagePart.tsx +54 -0
  21. package/src/components/MessageReasoningAnimated.tsx +12 -0
  22. package/src/components/MessageReasoningPart.tsx +76 -0
  23. package/src/components/MessageTextPart.tsx +78 -0
  24. package/src/components/MessageTokenUsage.tsx +145 -0
  25. package/src/components/MessageToolCallAnimated.tsx +86 -0
  26. package/src/components/MessageToolCallOutcome.tsx +95 -0
  27. package/src/components/MessageToolCallPart.tsx +95 -0
  28. package/src/components/MessageToolCallStatus.tsx +35 -0
  29. package/src/components/SubtleActivity.tsx +74 -0
  30. package/src/components/ThreadList.tsx +219 -0
  31. package/src/components/ToolAnimation.tsx +22 -0
  32. package/src/components/ToolExecuteCodeAnimated.tsx +8 -0
  33. package/src/components/ToolQueryGraphAnimated.tsx +8 -0
  34. package/src/config.ts +14 -0
  35. package/src/context.ts +48 -0
  36. package/src/cx.ts +4 -0
  37. package/src/format.ts +4 -0
@@ -0,0 +1,2652 @@
1
+ @charset "UTF-8";
2
+ :root {
3
+ --cortex-color-surface: light-dark(#ffffff, #0a0a0a);
4
+ --cortex-color-surface-subtle: light-dark(#f8fafc, #141414);
5
+ --cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);
6
+ --cortex-color-border: light-dark(#e2e8f0, #2e2e2e);
7
+ --cortex-color-border-strong: light-dark(#cbd5e1, #444444);
8
+ --cortex-color-text-heading: light-dark(#1e293b, #fafafa);
9
+ --cortex-color-text-strong: light-dark(#334155, #e5e5e5);
10
+ --cortex-color-text: light-dark(#475569, #d4d4d4);
11
+ --cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);
12
+ --cortex-color-text-muted: light-dark(#94a3b8, #737373);
13
+ --cortex-color-primary: light-dark(#1e293b, #fafafa);
14
+ --cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);
15
+ --cortex-color-accent: light-dark(#4f46e5, #818cf8);
16
+ --cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);
17
+ --cortex-color-link: light-dark(#2563eb, #60a5fa);
18
+ --cortex-color-hover: light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.06));
19
+ --cortex-color-user-surface: var(--cortex-color-surface-subtle);
20
+ --cortex-color-user-border: var(--cortex-color-border);
21
+ --cortex-color-success: light-dark(#059669, #34d399);
22
+ --cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);
23
+ --cortex-color-success-border: light-dark(#d1fae5, #065f46);
24
+ --cortex-color-danger: light-dark(#dc2626, #f87171);
25
+ --cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);
26
+ --cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);
27
+ --cortex-radius: 0.5rem;
28
+ --cortex-font-mono: var(
29
+ --default-mono-font-family,
30
+ ui-monospace,
31
+ SFMono-Regular,
32
+ Menlo,
33
+ Monaco,
34
+ Consolas,
35
+ monospace
36
+ );
37
+ --cortex-font-size: 0.8125rem;
38
+ }
39
+
40
+ .cortex-widget {
41
+ color-scheme: light;
42
+ }
43
+ .cortex-widget[data-cortex-theme=dark] {
44
+ color-scheme: dark;
45
+ }
46
+ .cortex-widget[data-cortex-theme=system] {
47
+ color-scheme: light dark;
48
+ }
49
+
50
+ @layer cortex-preflight {
51
+ :where(.cortex-widget),
52
+ :where(.cortex-widget) *,
53
+ :where(.cortex-widget) ::before,
54
+ :where(.cortex-widget) ::after {
55
+ box-sizing: border-box;
56
+ margin: 0;
57
+ padding: 0;
58
+ border: 0 solid;
59
+ }
60
+ :where(.cortex-widget) {
61
+ tab-size: 4;
62
+ }
63
+ :where(.cortex-widget) hr {
64
+ height: 0;
65
+ color: inherit;
66
+ border-top-width: 1px;
67
+ }
68
+ :where(.cortex-widget) :is(h1, h2, h3, h4, h5, h6) {
69
+ font-size: inherit;
70
+ font-weight: inherit;
71
+ }
72
+ :where(.cortex-widget) a {
73
+ color: inherit;
74
+ text-decoration: inherit;
75
+ }
76
+ :where(.cortex-widget) :is(b, strong) {
77
+ font-weight: bolder;
78
+ }
79
+ :where(.cortex-widget) :is(code, kbd, samp, pre) {
80
+ font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
81
+ font-feature-settings: var(--default-mono-font-feature-settings, normal);
82
+ font-variation-settings: var(--default-mono-font-variation-settings, normal);
83
+ font-size: 1em;
84
+ }
85
+ :where(.cortex-widget) small {
86
+ font-size: 80%;
87
+ }
88
+ :where(.cortex-widget) :is(sub, sup) {
89
+ font-size: 75%;
90
+ line-height: 0;
91
+ position: relative;
92
+ vertical-align: baseline;
93
+ }
94
+ :where(.cortex-widget) sub {
95
+ bottom: -0.25em;
96
+ }
97
+ :where(.cortex-widget) sup {
98
+ top: -0.5em;
99
+ }
100
+ :where(.cortex-widget) table {
101
+ text-indent: 0;
102
+ border-color: inherit;
103
+ border-collapse: collapse;
104
+ }
105
+ :where(.cortex-widget) :is(ol, ul, menu) {
106
+ list-style: none;
107
+ }
108
+ :where(.cortex-widget) :is(img, svg, video, canvas, audio, iframe, embed, object) {
109
+ display: block;
110
+ vertical-align: middle;
111
+ }
112
+ :where(.cortex-widget) :is(img, video) {
113
+ max-width: 100%;
114
+ height: auto;
115
+ }
116
+ :where(.cortex-widget) :is(button, input, select, optgroup, textarea) {
117
+ font: inherit;
118
+ font-feature-settings: inherit;
119
+ font-variation-settings: inherit;
120
+ letter-spacing: inherit;
121
+ color: inherit;
122
+ border-radius: 0;
123
+ background-color: transparent;
124
+ opacity: 1;
125
+ }
126
+ :where(.cortex-widget) ::placeholder {
127
+ opacity: 1;
128
+ color: color-mix(in oklab, currentcolor 50%, transparent);
129
+ }
130
+ :where(.cortex-widget) textarea {
131
+ resize: vertical;
132
+ }
133
+ }
134
+ .cortex-widget .hljs {
135
+ color: light-dark(#24292e, #c9d1d9);
136
+ background: transparent;
137
+ }
138
+ .cortex-widget .hljs-doctag,
139
+ .cortex-widget .hljs-keyword,
140
+ .cortex-widget .hljs-meta .hljs-keyword,
141
+ .cortex-widget .hljs-template-tag,
142
+ .cortex-widget .hljs-template-variable,
143
+ .cortex-widget .hljs-type,
144
+ .cortex-widget .hljs-variable.language_ {
145
+ color: light-dark(#d73a49, #ff7b72);
146
+ }
147
+ .cortex-widget .hljs-title,
148
+ .cortex-widget .hljs-title.class_,
149
+ .cortex-widget .hljs-title.class_.inherited__,
150
+ .cortex-widget .hljs-title.function_ {
151
+ color: light-dark(#6f42c1, #d2a8ff);
152
+ }
153
+ .cortex-widget .hljs-attr,
154
+ .cortex-widget .hljs-attribute,
155
+ .cortex-widget .hljs-literal,
156
+ .cortex-widget .hljs-meta,
157
+ .cortex-widget .hljs-number,
158
+ .cortex-widget .hljs-operator,
159
+ .cortex-widget .hljs-selector-attr,
160
+ .cortex-widget .hljs-selector-class,
161
+ .cortex-widget .hljs-selector-id,
162
+ .cortex-widget .hljs-variable {
163
+ color: light-dark(#005cc5, #79c0ff);
164
+ }
165
+ .cortex-widget .hljs-meta .hljs-string,
166
+ .cortex-widget .hljs-regexp,
167
+ .cortex-widget .hljs-string {
168
+ color: light-dark(#032f62, #a5d6ff);
169
+ }
170
+ .cortex-widget .hljs-built_in,
171
+ .cortex-widget .hljs-symbol {
172
+ color: light-dark(#e36209, #ffa657);
173
+ }
174
+ .cortex-widget .hljs-code,
175
+ .cortex-widget .hljs-comment,
176
+ .cortex-widget .hljs-formula {
177
+ color: light-dark(#6a737d, #8b949e);
178
+ }
179
+ .cortex-widget .hljs-name,
180
+ .cortex-widget .hljs-quote,
181
+ .cortex-widget .hljs-selector-pseudo,
182
+ .cortex-widget .hljs-selector-tag {
183
+ color: light-dark(#22863a, #7ee787);
184
+ }
185
+ .cortex-widget .hljs-subst {
186
+ color: light-dark(#24292e, #c9d1d9);
187
+ }
188
+ .cortex-widget .hljs-section {
189
+ color: light-dark(#005cc5, #1f6feb);
190
+ font-weight: bold;
191
+ }
192
+ .cortex-widget .hljs-bullet {
193
+ color: light-dark(#735c0f, #f2cc60);
194
+ }
195
+ .cortex-widget .hljs-emphasis {
196
+ font-style: italic;
197
+ }
198
+ .cortex-widget .hljs-strong {
199
+ font-weight: bold;
200
+ }
201
+ .cortex-widget .hljs-addition {
202
+ color: light-dark(#22863a, #aff5b4);
203
+ background-color: light-dark(#f0fff4, #033a16);
204
+ }
205
+ .cortex-widget .hljs-deletion {
206
+ color: light-dark(#b31d28, #ffdcd7);
207
+ background-color: light-dark(#ffeef0, #67060c);
208
+ }
209
+
210
+ .cortex-widget {
211
+ display: block;
212
+ }
213
+
214
+ .cortex-widget__container {
215
+ width: 100%;
216
+ height: 100%;
217
+ position: relative;
218
+ overflow: hidden;
219
+ }
220
+
221
+ .cortex-widget__screen {
222
+ position: absolute;
223
+ inset: 0;
224
+ display: flex;
225
+ flex-direction: column;
226
+ transition: transform 0.3s ease-out;
227
+ }
228
+
229
+ .cortex-widget__screen--active {
230
+ transform: translateX(0);
231
+ }
232
+
233
+ .cortex-widget__screen--left {
234
+ transform: translateX(-100%);
235
+ }
236
+ [dir=rtl] .cortex-widget__screen--left {
237
+ transform: translateX(100%);
238
+ }
239
+
240
+ .cortex-widget__screen--right {
241
+ transform: translateX(100%);
242
+ }
243
+ [dir=rtl] .cortex-widget__screen--right {
244
+ transform: translateX(-100%);
245
+ }
246
+
247
+ @keyframes cortex-skeleton-shimmer {
248
+ 0% {
249
+ background-position: -200% 0;
250
+ }
251
+ 100% {
252
+ background-position: 200% 0;
253
+ }
254
+ }
255
+ .cortex-skeleton {
256
+ background: linear-gradient(90deg, var(--cortex-color-border) 0%, var(--cortex-color-surface-muted) 40%, var(--cortex-color-border) 80%);
257
+ background-size: 200% 100%;
258
+ animation: cortex-skeleton-shimmer 1.8s ease-in-out infinite;
259
+ border-radius: 6px;
260
+ }
261
+
262
+ .cortex-widget__chat-header {
263
+ flex-shrink: 0;
264
+ height: 3rem;
265
+ padding: 0 1rem;
266
+ display: flex;
267
+ align-items: center;
268
+ gap: 0.75rem;
269
+ border-bottom: 1px solid var(--cortex-color-border);
270
+ background: var(--cortex-color-surface);
271
+ }
272
+
273
+ .cortex-widget__back-btn {
274
+ flex-shrink: 0;
275
+ width: 2rem;
276
+ height: 2rem;
277
+ border-radius: calc(var(--cortex-radius) * 0.75);
278
+ display: flex;
279
+ align-items: center;
280
+ justify-content: center;
281
+ background: transparent;
282
+ border: 0;
283
+ cursor: pointer;
284
+ transition: color 0.15s, background-color 0.15s;
285
+ color: var(--cortex-color-text-muted);
286
+ }
287
+ .cortex-widget__back-btn:hover {
288
+ color: var(--cortex-color-text);
289
+ background: var(--cortex-color-surface-muted);
290
+ }
291
+
292
+ [dir=rtl] .cortex-widget__back-icon {
293
+ transform: rotate(180deg);
294
+ }
295
+
296
+ .cortex-widget__chat-title-wrap {
297
+ min-width: 0;
298
+ flex: 1;
299
+ }
300
+
301
+ .cortex-widget__chat-title {
302
+ font-family: var(--cortex-font-display, inherit);
303
+ font-size: var(--cortex-font-size);
304
+ font-weight: 500;
305
+ color: var(--cortex-color-text-strong);
306
+ overflow: hidden;
307
+ text-overflow: ellipsis;
308
+ white-space: nowrap;
309
+ margin: 0;
310
+ }
311
+
312
+ .cortex-widget__debug-btn {
313
+ flex-shrink: 0;
314
+ font-size: 0.6875rem;
315
+ font-weight: 500;
316
+ padding: 0.25rem 0.625rem;
317
+ border-radius: calc(var(--cortex-radius) * 0.75);
318
+ border: 0;
319
+ cursor: pointer;
320
+ transition: background-color 0.15s;
321
+ }
322
+ .cortex-widget__debug-btn--on {
323
+ background: light-dark(#fef3c7, #78350f);
324
+ color: light-dark(#d97706, #fbbf24);
325
+ }
326
+ .cortex-widget__debug-btn--on:hover {
327
+ background: light-dark(#fde68a, #92400e);
328
+ }
329
+ .cortex-widget__debug-btn--off {
330
+ background: var(--cortex-color-surface-muted);
331
+ color: var(--cortex-color-text-muted);
332
+ }
333
+ .cortex-widget__debug-btn--off:hover {
334
+ background: var(--cortex-color-border);
335
+ }
336
+
337
+ .cortex-widget__messages-skeleton {
338
+ flex: 1;
339
+ overflow: hidden;
340
+ padding: 1rem;
341
+ display: flex;
342
+ flex-direction: column;
343
+ gap: 0.5rem;
344
+ }
345
+
346
+ .cortex-widget__msg-skel {
347
+ width: 100%;
348
+ display: flex;
349
+ flex-direction: column;
350
+ }
351
+ .cortex-widget__msg-skel--user {
352
+ align-items: flex-end;
353
+ }
354
+ .cortex-widget__msg-skel--assistant {
355
+ align-items: flex-start;
356
+ }
357
+
358
+ .cortex-widget__msg-skel-bubble {
359
+ max-width: 80%;
360
+ padding: 1rem;
361
+ border-radius: calc(var(--cortex-radius) * 2);
362
+ border: 1px solid var(--cortex-color-border);
363
+ display: flex;
364
+ flex-direction: column;
365
+ gap: 0.5rem;
366
+ }
367
+ .cortex-widget__msg-skel-bubble--user {
368
+ background: var(--cortex-color-surface-subtle);
369
+ border-bottom-right-radius: 0;
370
+ }
371
+ .cortex-widget__msg-skel-bubble--assistant {
372
+ background: var(--cortex-color-surface-muted);
373
+ border-bottom-left-radius: 0;
374
+ }
375
+
376
+ .cortex-widget__msg-skel-line {
377
+ height: 0.75rem;
378
+ }
379
+
380
+ .cortex-widget__messages {
381
+ flex: 1;
382
+ overflow: hidden;
383
+ }
384
+
385
+ @keyframes cortex-working-slide-in {
386
+ from {
387
+ opacity: 0;
388
+ transform: translateY(6px);
389
+ }
390
+ to {
391
+ opacity: 1;
392
+ transform: translateY(0);
393
+ }
394
+ }
395
+ @keyframes cortex-dot-wave {
396
+ 0%, 60%, 100% {
397
+ transform: translateY(0) scale(1);
398
+ opacity: 0.45;
399
+ }
400
+ 30% {
401
+ transform: translateY(-5px) scale(1.2);
402
+ opacity: 1;
403
+ }
404
+ }
405
+ @keyframes cortex-working-shimmer {
406
+ 0% {
407
+ background-position: -200% center;
408
+ }
409
+ 100% {
410
+ background-position: 200% center;
411
+ }
412
+ }
413
+ .cortex-widget__working {
414
+ flex-shrink: 0;
415
+ padding: 0.5rem 1rem;
416
+ display: flex;
417
+ align-items: center;
418
+ gap: 0.5rem;
419
+ animation: cortex-working-slide-in 0.25s ease-out both;
420
+ }
421
+
422
+ .cortex-widget__working-dots {
423
+ display: flex;
424
+ align-items: center;
425
+ gap: 4px;
426
+ }
427
+
428
+ .cortex-working-dot {
429
+ display: block;
430
+ width: 6px;
431
+ height: 6px;
432
+ border-radius: 9999px;
433
+ background: var(--cortex-color-success);
434
+ animation: cortex-dot-wave 1.4s ease-in-out infinite;
435
+ }
436
+ .cortex-working-dot:nth-child(2) {
437
+ animation-delay: 0.15s;
438
+ }
439
+ .cortex-working-dot:nth-child(3) {
440
+ animation-delay: 0.3s;
441
+ }
442
+
443
+ .cortex-widget__working-text {
444
+ font-size: 0.75rem;
445
+ font-weight: 500;
446
+ letter-spacing: 0.01em;
447
+ color: var(--cortex-color-success);
448
+ }
449
+
450
+ cortex-chat-composer {
451
+ display: contents;
452
+ }
453
+
454
+ .cortex-widget__input-area {
455
+ flex-shrink: 0;
456
+ padding: 0.75rem;
457
+ background: var(--cortex-color-surface);
458
+ border-top: 1px solid var(--cortex-color-border);
459
+ }
460
+
461
+ .cortex-widget__input-box {
462
+ display: flex;
463
+ align-items: flex-end;
464
+ gap: 0.5rem;
465
+ border-radius: calc(var(--cortex-radius) * 1.5);
466
+ border: 1px solid var(--cortex-color-border);
467
+ padding: 0.375rem;
468
+ transition: border-color 0.15s, background-color 0.15s;
469
+ }
470
+ .cortex-widget__input-box--disabled {
471
+ background: var(--cortex-color-surface-muted);
472
+ }
473
+ .cortex-widget__input-box--enabled {
474
+ background: color-mix(in oklab, var(--cortex-color-surface-subtle) 45%, var(--cortex-color-surface));
475
+ }
476
+ .cortex-widget__input-box--enabled:focus-within {
477
+ border-color: var(--cortex-color-border-strong);
478
+ background: var(--cortex-color-surface);
479
+ }
480
+ .cortex-widget__input-box--dragging {
481
+ border-color: var(--cortex-color-text-heading);
482
+ border-style: dashed;
483
+ background: var(--cortex-color-surface-muted);
484
+ }
485
+
486
+ .cortex-widget__textarea {
487
+ flex: 1;
488
+ background: transparent;
489
+ resize: none;
490
+ border: 0;
491
+ outline: none;
492
+ font-size: var(--cortex-font-size);
493
+ padding: 0.375rem 0.5rem;
494
+ min-height: 28px;
495
+ max-height: 120px;
496
+ line-height: 1.375;
497
+ color: var(--cortex-color-text-strong);
498
+ }
499
+ .cortex-widget__textarea::placeholder {
500
+ color: var(--cortex-color-text-muted);
501
+ }
502
+ .cortex-widget__textarea--disabled {
503
+ color: var(--cortex-color-text-muted);
504
+ cursor: not-allowed;
505
+ }
506
+ .cortex-widget__textarea:disabled {
507
+ cursor: not-allowed;
508
+ border: 0;
509
+ }
510
+
511
+ .cortex-widget__input-actions {
512
+ flex-shrink: 0;
513
+ display: flex;
514
+ align-items: center;
515
+ gap: 0.375rem;
516
+ }
517
+
518
+ @keyframes cortex-stop-pulse-ring {
519
+ 0% {
520
+ opacity: 0.45;
521
+ transform: scale(1);
522
+ }
523
+ 50% {
524
+ opacity: 0.15;
525
+ transform: scale(1.12);
526
+ }
527
+ 100% {
528
+ opacity: 0.45;
529
+ transform: scale(1);
530
+ }
531
+ }
532
+ @keyframes cortex-stop-fade-in {
533
+ from {
534
+ opacity: 0;
535
+ transform: scale(0.7);
536
+ }
537
+ to {
538
+ opacity: 1;
539
+ transform: scale(1);
540
+ }
541
+ }
542
+ .cortex-stop-btn {
543
+ flex-shrink: 0;
544
+ width: 2rem;
545
+ height: 2rem;
546
+ border-radius: var(--cortex-radius);
547
+ display: flex;
548
+ align-items: center;
549
+ justify-content: center;
550
+ cursor: pointer;
551
+ position: relative;
552
+ background: var(--cortex-color-danger);
553
+ color: white;
554
+ border: 0;
555
+ animation: cortex-stop-fade-in 0.2s ease-out both;
556
+ transition: background 0.15s ease;
557
+ }
558
+ .cortex-stop-btn:hover {
559
+ background: color-mix(in oklab, var(--cortex-color-danger) 85%, black);
560
+ }
561
+ .cortex-stop-btn:active {
562
+ transform: scale(0.92);
563
+ }
564
+
565
+ .cortex-stop-btn__ring {
566
+ position: absolute;
567
+ inset: 0;
568
+ border-radius: var(--cortex-radius);
569
+ background: var(--cortex-color-danger);
570
+ animation: cortex-stop-pulse-ring 2s ease-in-out infinite;
571
+ pointer-events: none;
572
+ }
573
+
574
+ .cortex-stop-btn__icon {
575
+ position: relative;
576
+ z-index: 1;
577
+ }
578
+
579
+ .cortex-widget__attach-btn {
580
+ flex-shrink: 0;
581
+ width: 2rem;
582
+ height: 2rem;
583
+ border-radius: var(--cortex-radius);
584
+ display: flex;
585
+ align-items: center;
586
+ justify-content: center;
587
+ background: transparent;
588
+ border: 0;
589
+ cursor: pointer;
590
+ transition: color 0.15s, background-color 0.15s;
591
+ color: var(--cortex-color-text-muted);
592
+ }
593
+ .cortex-widget__attach-btn:hover {
594
+ color: var(--cortex-color-text);
595
+ background: var(--cortex-color-hover);
596
+ }
597
+
598
+ .cortex-widget__file-input {
599
+ display: none;
600
+ }
601
+
602
+ .cortex-widget__send-btn {
603
+ flex-shrink: 0;
604
+ width: 2rem;
605
+ height: 2rem;
606
+ border-radius: var(--cortex-radius);
607
+ display: flex;
608
+ align-items: center;
609
+ justify-content: center;
610
+ border: 0;
611
+ transition: background-color 0.15s;
612
+ cursor: default;
613
+ }
614
+ .cortex-widget__send-btn--empty {
615
+ background: var(--cortex-color-border);
616
+ color: var(--cortex-color-text-muted);
617
+ }
618
+ .cortex-widget__send-btn--ready {
619
+ background: var(--cortex-color-primary);
620
+ color: var(--cortex-color-primary-foreground);
621
+ cursor: pointer;
622
+ }
623
+ .cortex-widget__send-btn--ready:hover {
624
+ background: color-mix(in oklab, var(--cortex-color-primary) 85%, var(--cortex-color-primary-foreground));
625
+ }
626
+
627
+ [dir=rtl] .cortex-widget__send-icon {
628
+ transform: rotate(180deg);
629
+ }
630
+
631
+ .cortex-widget__container--full {
632
+ display: flex;
633
+ flex-direction: row;
634
+ }
635
+ .cortex-widget__container--full > .cortex-widget__screen {
636
+ position: relative;
637
+ inset: auto;
638
+ transition: none;
639
+ }
640
+ .cortex-widget__container--full > .cortex-widget__screen.cortex-widget__screen--active, .cortex-widget__container--full > .cortex-widget__screen.cortex-widget__screen--left, .cortex-widget__container--full > .cortex-widget__screen.cortex-widget__screen--right {
641
+ transform: none;
642
+ }
643
+ .cortex-widget__container--full > .cortex-widget__screen:first-child {
644
+ width: 280px;
645
+ min-width: 280px;
646
+ flex-shrink: 0;
647
+ border-right: 1px solid var(--cortex-color-border);
648
+ background: var(--cortex-color-surface-subtle);
649
+ }
650
+ [dir=rtl] .cortex-widget__container--full > .cortex-widget__screen:first-child {
651
+ border-right: 0;
652
+ border-left: 1px solid var(--cortex-color-border);
653
+ }
654
+ .cortex-widget__container--full > .cortex-widget__screen:nth-child(2) {
655
+ flex: 1;
656
+ min-width: 0;
657
+ }
658
+ .cortex-widget__container--full .cortex-widget__back-btn {
659
+ display: none;
660
+ }
661
+ .cortex-widget__container--full .cortex-widget__chat-title {
662
+ font-size: 0.875rem;
663
+ }
664
+ .cortex-widget__container--full .cortex-widget__chat-header {
665
+ background: var(--cortex-color-surface);
666
+ }
667
+ .cortex-widget__container--full .cortex-message-list {
668
+ padding: 1.5rem 2rem;
669
+ }
670
+ .cortex-widget__container--full .cortex-widget__messages-skeleton {
671
+ padding: 1.5rem 2rem;
672
+ }
673
+ .cortex-widget__container--full .cortex-widget__input-area {
674
+ padding: 0.75rem 2rem 1.25rem;
675
+ }
676
+ .cortex-widget__container--full .cortex-widget__working {
677
+ padding: 0.5rem 2rem;
678
+ }
679
+ @media (max-width: 768px) {
680
+ .cortex-widget__container--full > .cortex-widget__screen:first-child {
681
+ position: fixed;
682
+ inset: 0;
683
+ width: 280px;
684
+ min-width: 280px;
685
+ z-index: 110;
686
+ transform: translateX(-100%);
687
+ transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
688
+ }
689
+ [dir=rtl] .cortex-widget__container--full > .cortex-widget__screen:first-child {
690
+ transform: translateX(100%);
691
+ border-left: 1px solid var(--cortex-color-border);
692
+ border-right: 0;
693
+ }
694
+ .cortex-widget__container--full > .cortex-widget__screen:nth-child(2) {
695
+ flex: 1;
696
+ min-width: 0;
697
+ }
698
+ .cortex-widget__container--full .cortex-widget__sidebar-toggle-btn {
699
+ flex-shrink: 0;
700
+ width: 2rem;
701
+ height: 2rem;
702
+ border-radius: calc(var(--cortex-radius) * 0.75);
703
+ display: flex;
704
+ align-items: center;
705
+ justify-content: center;
706
+ background: transparent;
707
+ border: 0;
708
+ cursor: pointer;
709
+ transition: color 0.15s, background-color 0.15s;
710
+ color: var(--cortex-color-text-secondary);
711
+ }
712
+ .cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:hover {
713
+ color: var(--cortex-color-text-strong);
714
+ background: var(--cortex-color-surface-muted);
715
+ }
716
+ .cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:active {
717
+ background: var(--cortex-color-border);
718
+ }
719
+ .cortex-widget__container--full .cortex-message-list {
720
+ padding: 1rem;
721
+ }
722
+ .cortex-widget__container--full .cortex-widget__messages-skeleton {
723
+ padding: 1rem;
724
+ }
725
+ .cortex-widget__container--full .cortex-widget__input-area {
726
+ padding: 0.75rem;
727
+ }
728
+ .cortex-widget__container--full .cortex-widget__working {
729
+ padding: 0.5rem 1rem;
730
+ }
731
+ }
732
+
733
+ @media (max-width: 768px) {
734
+ .cortex-widget__container--full.cortex-widget__container--sidebar-open > .cortex-widget__screen:first-child {
735
+ transform: translateX(0);
736
+ }
737
+ .cortex-widget__container--full.cortex-widget__container--sidebar-open .cortex-widget__sidebar-backdrop {
738
+ display: block;
739
+ position: fixed;
740
+ inset: 0;
741
+ z-index: 100;
742
+ background: rgba(15, 23, 42, 0.35);
743
+ backdrop-filter: blur(2px);
744
+ animation: cortex-sidebar-backdrop-in 0.2s ease-out both;
745
+ }
746
+ }
747
+
748
+ @keyframes cortex-sidebar-backdrop-in {
749
+ from {
750
+ opacity: 0;
751
+ }
752
+ to {
753
+ opacity: 1;
754
+ }
755
+ }
756
+ .cortex-widget__threads-header {
757
+ flex-shrink: 0;
758
+ padding: 1.25rem 1.25rem 1rem;
759
+ display: flex;
760
+ align-items: center;
761
+ justify-content: space-between;
762
+ }
763
+
764
+ .cortex-widget__threads-title {
765
+ font-family: var(--cortex-font-display, inherit);
766
+ font-size: 0.9375rem;
767
+ font-weight: 600;
768
+ color: var(--cortex-color-text-heading);
769
+ letter-spacing: -0.01em;
770
+ margin: 0;
771
+ }
772
+
773
+ .cortex-widget__threads-count {
774
+ font-size: 0.6875rem;
775
+ color: var(--cortex-color-text-muted);
776
+ margin-top: 0.125rem;
777
+ margin-bottom: 0;
778
+ }
779
+
780
+ .cortex-widget__new-chat-btn {
781
+ display: inline-flex;
782
+ align-items: center;
783
+ gap: 0.375rem;
784
+ font-size: 0.75rem;
785
+ font-weight: 500;
786
+ color: var(--cortex-color-primary-foreground);
787
+ background: var(--cortex-color-primary);
788
+ padding: 0.375rem 0.75rem;
789
+ border-radius: calc(var(--cortex-radius) * 0.75);
790
+ border: 0;
791
+ cursor: pointer;
792
+ transition: background-color 0.15s;
793
+ }
794
+ .cortex-widget__new-chat-btn:hover {
795
+ background: color-mix(in oklab, var(--cortex-color-primary) 85%, var(--cortex-color-primary-foreground));
796
+ }
797
+ .cortex-widget__new-chat-btn:active {
798
+ background: var(--cortex-color-primary);
799
+ }
800
+ .cortex-widget__new-chat-btn--empty-state {
801
+ margin-top: 0.75rem;
802
+ }
803
+
804
+ .cortex-widget__threads-list {
805
+ flex: 1;
806
+ overflow-y: auto;
807
+ padding: 0 0.75rem 0.75rem;
808
+ }
809
+
810
+ .cortex-widget__thread-skeleton {
811
+ display: flex;
812
+ align-items: center;
813
+ gap: 0.75rem;
814
+ padding: 0.75rem;
815
+ margin-bottom: 0.375rem;
816
+ border-radius: var(--cortex-radius);
817
+ border: 1px solid var(--cortex-color-border);
818
+ background: var(--cortex-color-surface);
819
+ }
820
+
821
+ .cortex-widget__thread-skeleton-icon {
822
+ flex-shrink: 0;
823
+ width: 2rem;
824
+ height: 2rem;
825
+ }
826
+
827
+ .cortex-widget__thread-skeleton-lines {
828
+ flex: 1;
829
+ display: flex;
830
+ flex-direction: column;
831
+ gap: 0.375rem;
832
+ }
833
+
834
+ .cortex-widget__thread-skeleton-line {
835
+ height: 0.875rem;
836
+ }
837
+
838
+ .cortex-widget__thread-item {
839
+ width: 100%;
840
+ text-align: start;
841
+ padding: 0.75rem;
842
+ border-radius: var(--cortex-radius);
843
+ display: flex;
844
+ align-items: center;
845
+ gap: 0.75rem;
846
+ transition: background-color 0.15s, border-color 0.15s;
847
+ cursor: pointer;
848
+ margin-bottom: 0.375rem;
849
+ border: 1px solid var(--cortex-color-border);
850
+ background: var(--cortex-color-surface);
851
+ color: var(--cortex-color-text);
852
+ }
853
+ .cortex-widget__thread-item:hover {
854
+ background: var(--cortex-color-surface-muted);
855
+ border-color: var(--cortex-color-border-strong);
856
+ }
857
+ .cortex-widget__thread-item:active {
858
+ background: color-mix(in oklab, var(--cortex-color-surface-muted) 50%, var(--cortex-color-border));
859
+ }
860
+ .cortex-widget__thread-item--active {
861
+ background: color-mix(in oklab, var(--cortex-color-surface-muted) 50%, var(--cortex-color-border));
862
+ border-color: var(--cortex-color-border-strong);
863
+ color: var(--cortex-color-text-heading);
864
+ }
865
+ .cortex-widget__thread-item--active:hover {
866
+ background: var(--cortex-color-border);
867
+ }
868
+ .cortex-widget__thread-item--active:active {
869
+ background: color-mix(in oklab, var(--cortex-color-border) 50%, var(--cortex-color-border-strong));
870
+ }
871
+
872
+ .cortex-widget__thread-icon {
873
+ flex-shrink: 0;
874
+ width: 2rem;
875
+ height: 2rem;
876
+ border-radius: calc(var(--cortex-radius) * 0.75);
877
+ display: flex;
878
+ align-items: center;
879
+ justify-content: center;
880
+ font-size: 0.6875rem;
881
+ font-weight: 600;
882
+ background: var(--cortex-color-accent-surface);
883
+ color: var(--cortex-color-accent);
884
+ }
885
+ [dir=rtl] .cortex-widget__thread-icon {
886
+ transform: scaleX(-1);
887
+ }
888
+ .cortex-widget__thread-icon--active {
889
+ background: color-mix(in oklab, var(--cortex-color-accent-surface) 85%, var(--cortex-color-accent));
890
+ }
891
+
892
+ .cortex-widget__thread-info {
893
+ min-width: 0;
894
+ flex: 1;
895
+ }
896
+
897
+ .cortex-widget__thread-title-row {
898
+ display: flex;
899
+ align-items: center;
900
+ gap: 0.5rem;
901
+ min-width: 0;
902
+ }
903
+
904
+ .cortex-widget__thread-title {
905
+ font-size: var(--cortex-font-size);
906
+ font-weight: 500;
907
+ overflow: hidden;
908
+ text-overflow: ellipsis;
909
+ white-space: nowrap;
910
+ line-height: 1.25;
911
+ margin: 0;
912
+ color: var(--cortex-color-text-strong);
913
+ }
914
+ .cortex-widget__thread-title--active {
915
+ color: var(--cortex-color-text-heading);
916
+ font-weight: 600;
917
+ }
918
+
919
+ .cortex-widget__thread-time {
920
+ font-size: 0.6875rem;
921
+ color: var(--cortex-color-text-muted);
922
+ margin-top: 0.125rem;
923
+ margin-bottom: 0;
924
+ overflow: hidden;
925
+ text-overflow: ellipsis;
926
+ white-space: nowrap;
927
+ }
928
+
929
+ .cortex-widget__thread-running {
930
+ flex-shrink: 0;
931
+ display: inline-flex;
932
+ align-items: center;
933
+ gap: 0.3125rem;
934
+ padding: 0.2rem 0.45rem;
935
+ border-radius: 999px;
936
+ background: var(--cortex-color-success-surface);
937
+ color: var(--cortex-color-success);
938
+ font-size: 0.625rem;
939
+ font-weight: 700;
940
+ letter-spacing: 0.02em;
941
+ text-transform: uppercase;
942
+ }
943
+
944
+ .cortex-widget__thread-running-dot {
945
+ width: 0.375rem;
946
+ height: 0.375rem;
947
+ border-radius: 999px;
948
+ background: currentColor;
949
+ box-shadow: 0 0 0.45rem currentColor;
950
+ animation: cortex-thread-running-pulse 1.4s ease-in-out infinite;
951
+ }
952
+
953
+ @keyframes cortex-thread-running-pulse {
954
+ 0%, 100% {
955
+ opacity: 0.45;
956
+ transform: scale(0.9);
957
+ }
958
+ 50% {
959
+ opacity: 1;
960
+ transform: scale(1);
961
+ }
962
+ }
963
+ .cortex-widget__thread-delete {
964
+ flex-shrink: 0;
965
+ opacity: 0;
966
+ width: 1.75rem;
967
+ height: 1.75rem;
968
+ border-radius: calc(var(--cortex-radius) * 0.75);
969
+ display: flex;
970
+ align-items: center;
971
+ justify-content: center;
972
+ cursor: pointer;
973
+ transition: opacity 0.15s;
974
+ background: transparent;
975
+ border: 0;
976
+ color: var(--cortex-color-text-muted);
977
+ }
978
+ .cortex-widget__thread-item:hover > .cortex-widget__thread-delete {
979
+ opacity: 1;
980
+ }
981
+ .cortex-widget__thread-delete:hover {
982
+ background: var(--cortex-color-border);
983
+ }
984
+ .cortex-widget__thread-delete--active {
985
+ color: var(--cortex-color-text-secondary);
986
+ }
987
+ .cortex-widget__thread-delete--active:hover {
988
+ color: var(--cortex-color-text);
989
+ }
990
+
991
+ .cortex-widget__thread-arrow {
992
+ flex-shrink: 0;
993
+ transition: color 0.15s;
994
+ color: var(--cortex-color-border-strong);
995
+ }
996
+ [dir=rtl] .cortex-widget__thread-arrow {
997
+ transform: rotate(180deg);
998
+ }
999
+ .cortex-widget__thread-item:hover > .cortex-widget__thread-arrow {
1000
+ color: var(--cortex-color-text-muted);
1001
+ }
1002
+ .cortex-widget__thread-arrow--active {
1003
+ color: var(--cortex-color-text-muted);
1004
+ }
1005
+ .cortex-widget__thread-item:hover > .cortex-widget__thread-arrow--active {
1006
+ color: var(--cortex-color-text-secondary);
1007
+ }
1008
+
1009
+ .cortex-widget__threads-empty {
1010
+ display: flex;
1011
+ flex-direction: column;
1012
+ align-items: center;
1013
+ justify-content: center;
1014
+ padding: 4rem 0;
1015
+ text-align: center;
1016
+ }
1017
+
1018
+ .cortex-widget__threads-empty-icon {
1019
+ width: 2.5rem;
1020
+ height: 2.5rem;
1021
+ border-radius: var(--cortex-radius);
1022
+ background: var(--cortex-color-accent-surface);
1023
+ display: flex;
1024
+ align-items: center;
1025
+ justify-content: center;
1026
+ margin-bottom: 0.75rem;
1027
+ }
1028
+
1029
+ .cortex-widget__threads-empty-svg {
1030
+ color: var(--cortex-color-accent);
1031
+ }
1032
+
1033
+ .cortex-widget__threads-empty-title {
1034
+ font-family: var(--cortex-font-display, inherit);
1035
+ font-size: var(--cortex-font-size);
1036
+ color: var(--cortex-color-text-muted);
1037
+ font-weight: 500;
1038
+ margin: 0;
1039
+ }
1040
+
1041
+ .cortex-widget__threads-empty-subtitle {
1042
+ font-size: 0.6875rem;
1043
+ color: var(--cortex-color-text-muted);
1044
+ margin-top: 0.25rem;
1045
+ margin-bottom: 0;
1046
+ }
1047
+
1048
+ .cortex-widget__sidebar-toggle-btn {
1049
+ display: none;
1050
+ }
1051
+
1052
+ .cortex-widget__sidebar-backdrop {
1053
+ display: none;
1054
+ }
1055
+
1056
+ .cortex-message-list {
1057
+ height: 100%;
1058
+ overflow-y: auto;
1059
+ width: 100%;
1060
+ display: flex;
1061
+ flex-direction: column;
1062
+ gap: 0.5rem;
1063
+ padding: 1rem;
1064
+ }
1065
+
1066
+ .cortex-message:empty {
1067
+ display: none;
1068
+ }
1069
+
1070
+ .cortex-message-parts {
1071
+ width: 100%;
1072
+ display: flex;
1073
+ flex-direction: column;
1074
+ gap: 0.5rem;
1075
+ }
1076
+
1077
+ .cortex-message-debug-zone {
1078
+ display: flex;
1079
+ flex-direction: column;
1080
+ gap: 0.25rem;
1081
+ padding-top: 0.375rem;
1082
+ margin-top: 0.125rem;
1083
+ border-top: 1px dashed var(--cortex-color-border);
1084
+ }
1085
+
1086
+ .cortex-message-part {
1087
+ display: block;
1088
+ }
1089
+ .cortex-message-part:empty {
1090
+ display: none;
1091
+ }
1092
+
1093
+ .cortex-message-part--animated {
1094
+ animation: cortex-part-fade-in-up 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
1095
+ }
1096
+
1097
+ @keyframes cortex-part-fade-in-up {
1098
+ from {
1099
+ opacity: 0;
1100
+ transform: translateY(30px);
1101
+ }
1102
+ to {
1103
+ opacity: 1;
1104
+ transform: translateY(0);
1105
+ }
1106
+ }
1107
+ .cortex-unhandled-type {
1108
+ text-align: center;
1109
+ font-size: 0.75rem;
1110
+ color: var(--cortex-color-text-muted);
1111
+ }
1112
+
1113
+ .cortex-text-part {
1114
+ width: 100%;
1115
+ display: flex;
1116
+ flex-direction: column;
1117
+ }
1118
+ .cortex-text-part--assistant {
1119
+ align-items: flex-start;
1120
+ }
1121
+ .cortex-text-part--user {
1122
+ align-items: flex-end;
1123
+ }
1124
+ [dir=rtl] .cortex-text-part--assistant {
1125
+ align-items: flex-start;
1126
+ }
1127
+ [dir=rtl] .cortex-text-part--user {
1128
+ align-items: flex-end;
1129
+ }
1130
+
1131
+ .cortex-text-bubble {
1132
+ max-width: 80%;
1133
+ font-size: var(--cortex-font-size);
1134
+ line-height: 1.625;
1135
+ padding: 1rem;
1136
+ border-radius: calc(var(--cortex-radius) * 2);
1137
+ border: 1px solid var(--cortex-color-border);
1138
+ color: var(--cortex-color-text-strong);
1139
+ }
1140
+ .cortex-text-bubble--assistant {
1141
+ background: var(--cortex-color-surface-muted);
1142
+ border-bottom-left-radius: 0;
1143
+ }
1144
+ [dir=rtl] .cortex-text-bubble--assistant {
1145
+ border-bottom-left-radius: calc(var(--cortex-radius) * 2);
1146
+ border-bottom-right-radius: 0;
1147
+ }
1148
+ .cortex-text-bubble--user {
1149
+ background: var(--cortex-color-user-surface);
1150
+ border-color: var(--cortex-color-user-border);
1151
+ border-bottom-right-radius: 0;
1152
+ }
1153
+ [dir=rtl] .cortex-text-bubble--user {
1154
+ border-bottom-right-radius: calc(var(--cortex-radius) * 2);
1155
+ border-bottom-left-radius: 0;
1156
+ }
1157
+ .cortex-text-bubble h1,
1158
+ .cortex-text-bubble h2,
1159
+ .cortex-text-bubble h3,
1160
+ .cortex-text-bubble h4,
1161
+ .cortex-text-bubble h5,
1162
+ .cortex-text-bubble h6 {
1163
+ margin-top: 1.25em;
1164
+ margin-bottom: 0.5em;
1165
+ font-weight: 600;
1166
+ line-height: 1.3;
1167
+ color: var(--cortex-color-text-heading);
1168
+ }
1169
+ .cortex-text-bubble h1:first-child,
1170
+ .cortex-text-bubble h2:first-child,
1171
+ .cortex-text-bubble h3:first-child,
1172
+ .cortex-text-bubble h4:first-child,
1173
+ .cortex-text-bubble h5:first-child,
1174
+ .cortex-text-bubble h6:first-child {
1175
+ margin-top: 0;
1176
+ }
1177
+ .cortex-text-bubble h1 {
1178
+ font-size: 1.25em;
1179
+ }
1180
+ .cortex-text-bubble h2 {
1181
+ font-size: 1.125em;
1182
+ }
1183
+ .cortex-text-bubble h3 {
1184
+ font-size: 1em;
1185
+ }
1186
+ .cortex-text-bubble p {
1187
+ margin-top: 0.75em;
1188
+ margin-bottom: 0.75em;
1189
+ }
1190
+ .cortex-text-bubble p:first-child {
1191
+ margin-top: 0;
1192
+ }
1193
+ .cortex-text-bubble p:last-child {
1194
+ margin-bottom: 0;
1195
+ }
1196
+ .cortex-text-bubble ul,
1197
+ .cortex-text-bubble ol {
1198
+ margin-top: 0.75em;
1199
+ margin-bottom: 0.75em;
1200
+ padding-inline-start: 1.5em;
1201
+ }
1202
+ .cortex-text-bubble ul {
1203
+ list-style-type: disc;
1204
+ }
1205
+ .cortex-text-bubble ol {
1206
+ list-style-type: decimal;
1207
+ }
1208
+ .cortex-text-bubble li {
1209
+ margin-top: 0.25em;
1210
+ margin-bottom: 0.25em;
1211
+ }
1212
+ .cortex-text-bubble code {
1213
+ font-family: var(--cortex-font-mono);
1214
+ font-size: 0.875em;
1215
+ background: var(--cortex-color-border);
1216
+ padding: 0.125em 0.375em;
1217
+ border-radius: calc(var(--cortex-radius) * 0.5);
1218
+ }
1219
+ .cortex-text-bubble pre {
1220
+ margin-top: 0.75em;
1221
+ margin-bottom: 0.75em;
1222
+ padding: 0.75em 1em;
1223
+ background: var(--cortex-color-text-heading);
1224
+ border-radius: var(--cortex-radius);
1225
+ overflow-x: auto;
1226
+ font-size: 0.8125em;
1227
+ line-height: 1.6;
1228
+ }
1229
+ .cortex-text-bubble pre code {
1230
+ background: transparent;
1231
+ padding: 0;
1232
+ color: var(--cortex-color-border);
1233
+ }
1234
+ .cortex-text-bubble blockquote {
1235
+ margin-top: 0.75em;
1236
+ margin-bottom: 0.75em;
1237
+ padding-inline-start: 1em;
1238
+ border-inline-start: 3px solid var(--cortex-color-border-strong);
1239
+ color: var(--cortex-color-text-secondary);
1240
+ font-style: italic;
1241
+ }
1242
+ .cortex-text-bubble a {
1243
+ color: var(--cortex-color-link);
1244
+ text-decoration: underline;
1245
+ }
1246
+ .cortex-text-bubble a:hover {
1247
+ color: color-mix(in oklab, var(--cortex-color-link) 80%, var(--cortex-color-text-heading));
1248
+ }
1249
+ .cortex-text-bubble table {
1250
+ width: 100%;
1251
+ border-collapse: collapse;
1252
+ margin-top: 0.75em;
1253
+ margin-bottom: 0.75em;
1254
+ font-size: 0.875em;
1255
+ }
1256
+ .cortex-text-bubble th,
1257
+ .cortex-text-bubble td {
1258
+ border: 1px solid var(--cortex-color-border);
1259
+ padding: 0.375em 0.75em;
1260
+ text-align: start;
1261
+ }
1262
+ .cortex-text-bubble th {
1263
+ background: var(--cortex-color-surface-subtle);
1264
+ font-weight: 600;
1265
+ }
1266
+ .cortex-text-bubble hr {
1267
+ margin-top: 1.5em;
1268
+ margin-bottom: 1.5em;
1269
+ border: none;
1270
+ border-top: 1px solid var(--cortex-color-border);
1271
+ }
1272
+ .cortex-text-bubble img {
1273
+ max-width: 100%;
1274
+ height: auto;
1275
+ border-radius: calc(var(--cortex-radius) * 0.75);
1276
+ }
1277
+
1278
+ .cortex-reasoning-details {
1279
+ width: 100%;
1280
+ border-radius: var(--cortex-radius);
1281
+ border: 1px solid var(--cortex-color-border);
1282
+ background: var(--cortex-color-surface-subtle);
1283
+ overflow: hidden;
1284
+ }
1285
+
1286
+ .cortex-reasoning-details__summary {
1287
+ list-style: none;
1288
+ cursor: pointer;
1289
+ user-select: none;
1290
+ padding: 0.75rem 1rem;
1291
+ display: flex;
1292
+ align-items: center;
1293
+ gap: 0.75rem;
1294
+ }
1295
+ .cortex-reasoning-details__summary::-webkit-details-marker {
1296
+ display: none;
1297
+ }
1298
+
1299
+ .cortex-reasoning-details__header {
1300
+ display: flex;
1301
+ align-items: center;
1302
+ gap: 0.5rem;
1303
+ min-width: 0;
1304
+ flex: 1;
1305
+ }
1306
+
1307
+ .cortex-reasoning-details__icon {
1308
+ display: inline-flex;
1309
+ height: 1.5rem;
1310
+ width: 1.5rem;
1311
+ align-items: center;
1312
+ justify-content: center;
1313
+ border-radius: calc(var(--cortex-radius) * 0.5);
1314
+ background: var(--cortex-color-accent-surface);
1315
+ color: var(--cortex-color-accent);
1316
+ }
1317
+
1318
+ .cortex-reasoning-details__title-group {
1319
+ min-width: 0;
1320
+ }
1321
+
1322
+ .cortex-reasoning-details__title-row {
1323
+ display: flex;
1324
+ align-items: center;
1325
+ gap: 0.5rem;
1326
+ }
1327
+
1328
+ .cortex-reasoning-details__title {
1329
+ font-weight: 500;
1330
+ color: var(--cortex-color-text-strong);
1331
+ font-size: 0.875rem;
1332
+ }
1333
+
1334
+ .cortex-reasoning-details__badge {
1335
+ display: inline-flex;
1336
+ align-items: center;
1337
+ border-radius: calc(var(--cortex-radius) * 0.5);
1338
+ padding: 0.125rem 0.375rem;
1339
+ font-size: 0.6875rem;
1340
+ font-weight: 500;
1341
+ }
1342
+ .cortex-reasoning-details__badge--streaming {
1343
+ background: light-dark(#fef3c7, #78350f);
1344
+ color: light-dark(#b45309, #fcd34d);
1345
+ }
1346
+ .cortex-reasoning-details__badge--done {
1347
+ background: var(--cortex-color-success-border);
1348
+ color: var(--cortex-color-success);
1349
+ }
1350
+
1351
+ .cortex-reasoning-details__chevron {
1352
+ margin-inline-start: auto;
1353
+ display: inline-flex;
1354
+ height: 1.5rem;
1355
+ width: 1.5rem;
1356
+ align-items: center;
1357
+ justify-content: center;
1358
+ border-radius: calc(var(--cortex-radius) * 0.5);
1359
+ color: var(--cortex-color-text-muted);
1360
+ transition: transform 0.2s;
1361
+ }
1362
+ details[open] > summary > .cortex-reasoning-details__chevron {
1363
+ transform: rotate(180deg);
1364
+ }
1365
+
1366
+ .cortex-reasoning-details__body {
1367
+ padding: 0 1rem 1rem;
1368
+ }
1369
+
1370
+ .cortex-reasoning-details__content {
1371
+ margin-top: 0.25rem;
1372
+ border-radius: calc(var(--cortex-radius) * 0.5);
1373
+ background: var(--cortex-color-surface);
1374
+ border: 1px solid var(--cortex-color-border);
1375
+ padding: 0.75rem;
1376
+ }
1377
+
1378
+ .cortex-reasoning-details__pre {
1379
+ margin: 0;
1380
+ white-space: pre-wrap;
1381
+ overflow-wrap: break-word;
1382
+ font-family: var(--cortex-font-mono);
1383
+ font-size: 0.75rem;
1384
+ line-height: 1.625;
1385
+ color: var(--cortex-color-text-strong);
1386
+ }
1387
+
1388
+ @keyframes cortex-aborted-fade-in {
1389
+ from {
1390
+ opacity: 0;
1391
+ transform: translateY(4px);
1392
+ }
1393
+ to {
1394
+ opacity: 1;
1395
+ transform: translateY(0);
1396
+ }
1397
+ }
1398
+ .cortex-aborted-flag {
1399
+ display: flex;
1400
+ align-items: center;
1401
+ gap: 0.625rem;
1402
+ padding: 0.25rem 0;
1403
+ animation: cortex-aborted-fade-in 0.3s ease-out both;
1404
+ user-select: none;
1405
+ }
1406
+
1407
+ .cortex-aborted-flag__line {
1408
+ flex: 1;
1409
+ height: 1px;
1410
+ background: repeating-linear-gradient(90deg, #e2a36f 0px, #e2a36f 4px, transparent 4px, transparent 8px);
1411
+ opacity: 0.5;
1412
+ }
1413
+
1414
+ .cortex-aborted-flag__label {
1415
+ display: inline-flex;
1416
+ align-items: center;
1417
+ gap: 0.3125rem;
1418
+ font-family: var(--cortex-font-mono);
1419
+ font-size: 0.625rem;
1420
+ font-weight: 600;
1421
+ letter-spacing: 0.06em;
1422
+ text-transform: uppercase;
1423
+ color: light-dark(#c2824a, #e2a36f);
1424
+ }
1425
+
1426
+ .cortex-aborted-flag__icon {
1427
+ color: light-dark(#c2824a, #e2a36f);
1428
+ flex-shrink: 0;
1429
+ }
1430
+
1431
+ .cortex-message-attachments {
1432
+ display: flex;
1433
+ flex-wrap: wrap;
1434
+ justify-content: flex-end;
1435
+ gap: 0.375rem;
1436
+ }
1437
+
1438
+ .cortex-message-attachment {
1439
+ display: inline-flex;
1440
+ align-items: center;
1441
+ gap: 0.375rem;
1442
+ max-width: 14rem;
1443
+ padding: 0.25rem 0.5rem;
1444
+ border: 1px solid var(--cortex-color-border);
1445
+ border-radius: var(--cortex-radius);
1446
+ background: var(--cortex-color-surface-subtle);
1447
+ font-size: 0.75rem;
1448
+ color: var(--cortex-color-text-strong);
1449
+ cursor: pointer;
1450
+ transition: background 0.15s;
1451
+ }
1452
+ .cortex-message-attachment:hover {
1453
+ background: var(--cortex-color-surface-muted);
1454
+ }
1455
+
1456
+ .cortex-message-attachment__name {
1457
+ overflow: hidden;
1458
+ text-overflow: ellipsis;
1459
+ white-space: nowrap;
1460
+ }
1461
+
1462
+ .cortex-message-attachment__icon,
1463
+ .cortex-message-attachment__dl-icon {
1464
+ flex-shrink: 0;
1465
+ width: 0.875rem;
1466
+ height: 0.875rem;
1467
+ color: var(--cortex-color-text-muted);
1468
+ }
1469
+
1470
+ /* ─── Debug Tool Call Card ─────────────────────────────────────────── */
1471
+ .dbg-tool {
1472
+ --_accent: var(--cortex-color-border-strong);
1473
+ position: relative;
1474
+ width: 100%;
1475
+ border-radius: 10px;
1476
+ background: var(--cortex-color-surface-subtle);
1477
+ overflow: hidden;
1478
+ /* Colored left accent bar */
1479
+ }
1480
+ .dbg-tool::before {
1481
+ content: "";
1482
+ position: absolute;
1483
+ inset-block: 0;
1484
+ inset-inline-start: 0;
1485
+ width: 3px;
1486
+ background: var(--_accent);
1487
+ z-index: 1;
1488
+ transition: background 200ms;
1489
+ }
1490
+ .dbg-tool {
1491
+ /* State accent colors */
1492
+ }
1493
+ .dbg-tool[data-state=complete] {
1494
+ --_accent: var(--cortex-color-success);
1495
+ }
1496
+ .dbg-tool[data-state=error] {
1497
+ --_accent: var(--cortex-color-danger);
1498
+ }
1499
+ .dbg-tool[data-state=awaiting-input], .dbg-tool[data-state=input-streaming], .dbg-tool[data-state=input-complete] {
1500
+ --_accent: light-dark(#d97706, #fbbf24);
1501
+ }
1502
+ .dbg-tool[data-state=approval-requested], .dbg-tool[data-state=approval-responded] {
1503
+ --_accent: light-dark(#7c3aed, #a78bfa);
1504
+ }
1505
+
1506
+ /* ─── Summary / Header ─────────────────────────────────────────────── */
1507
+ .dbg-tool__summary {
1508
+ list-style: none;
1509
+ cursor: pointer;
1510
+ user-select: none;
1511
+ padding: 0.625rem 0.875rem 0.625rem 1.125rem;
1512
+ }
1513
+ .dbg-tool__summary::-webkit-details-marker {
1514
+ display: none;
1515
+ }
1516
+
1517
+ .dbg-tool__header {
1518
+ display: flex;
1519
+ align-items: flex-start;
1520
+ gap: 0.75rem;
1521
+ }
1522
+
1523
+ .dbg-tool__meta {
1524
+ flex: 1;
1525
+ min-width: 0;
1526
+ }
1527
+
1528
+ .dbg-tool__title-row {
1529
+ display: flex;
1530
+ align-items: center;
1531
+ gap: 0.5rem;
1532
+ min-width: 0;
1533
+ }
1534
+
1535
+ .dbg-tool__name {
1536
+ font-weight: 600;
1537
+ font-size: 0.8125rem;
1538
+ color: var(--cortex-color-text-heading);
1539
+ overflow: hidden;
1540
+ text-overflow: ellipsis;
1541
+ white-space: nowrap;
1542
+ letter-spacing: -0.01em;
1543
+ }
1544
+
1545
+ .dbg-tool__id-row {
1546
+ margin-top: 2px;
1547
+ font-size: 0.625rem;
1548
+ color: var(--cortex-color-text-muted);
1549
+ font-family: ui-monospace, "SF Mono", "Cascadia Code", monospace;
1550
+ word-break: break-all;
1551
+ }
1552
+
1553
+ /* ─── Status & Chevron ─────────────────────────────────────────────── */
1554
+ .dbg-tool__actions {
1555
+ display: flex;
1556
+ align-items: center;
1557
+ gap: 0.375rem;
1558
+ flex-shrink: 0;
1559
+ }
1560
+
1561
+ .dbg-tool__state {
1562
+ display: inline-flex;
1563
+ align-items: center;
1564
+ gap: 5px;
1565
+ font-size: 0.6875rem;
1566
+ font-weight: 500;
1567
+ padding: 2px 8px;
1568
+ border-radius: 4px;
1569
+ white-space: nowrap;
1570
+ font-family: system-ui, -apple-system, sans-serif;
1571
+ }
1572
+ .dbg-tool__state--success {
1573
+ color: var(--cortex-color-success);
1574
+ background: var(--cortex-color-success-surface);
1575
+ }
1576
+ .dbg-tool__state--error {
1577
+ color: var(--cortex-color-danger);
1578
+ background: light-dark(#fef2f2, #450a0a);
1579
+ }
1580
+ .dbg-tool__state--approval {
1581
+ color: light-dark(#7c3aed, #a78bfa);
1582
+ background: light-dark(#f5f3ff, #2e1065);
1583
+ }
1584
+ .dbg-tool__state--pending {
1585
+ color: light-dark(#b45309, #fcd34d);
1586
+ background: light-dark(#fffbeb, #451a03);
1587
+ }
1588
+
1589
+ .dbg-tool__pulse {
1590
+ width: 6px;
1591
+ height: 6px;
1592
+ border-radius: 50%;
1593
+ background: light-dark(#d97706, #fbbf24);
1594
+ animation: dbg-pulse 2s ease-in-out infinite;
1595
+ }
1596
+ .dbg-tool__pulse--violet {
1597
+ background: #8b5cf6;
1598
+ }
1599
+
1600
+ @keyframes dbg-pulse {
1601
+ 0%, 100% {
1602
+ opacity: 1;
1603
+ }
1604
+ 50% {
1605
+ opacity: 0.3;
1606
+ }
1607
+ }
1608
+ .dbg-tool__chevron {
1609
+ display: inline-flex;
1610
+ align-items: center;
1611
+ justify-content: center;
1612
+ width: 1.5rem;
1613
+ height: 1.5rem;
1614
+ border-radius: 4px;
1615
+ color: var(--cortex-color-text-muted);
1616
+ transition: transform 200ms;
1617
+ }
1618
+ details[open] > summary .dbg-tool__chevron {
1619
+ transform: rotate(180deg);
1620
+ }
1621
+
1622
+ /* ─── Body ─────────────────────────────────────────────────────────── */
1623
+ .dbg-tool__body {
1624
+ padding: 0 0.875rem 0.75rem 1.125rem;
1625
+ }
1626
+
1627
+ /* ─── Sections (flat, divided by thin rules) ───────────────────────── */
1628
+ .dbg-tool__section:not(:first-child) {
1629
+ border-top: 1px solid var(--cortex-color-border);
1630
+ padding-top: 0.625rem;
1631
+ margin-top: 0.625rem;
1632
+ }
1633
+
1634
+ .dbg-tool__section-bar {
1635
+ display: flex;
1636
+ align-items: center;
1637
+ gap: 0.375rem;
1638
+ margin-bottom: 0.375rem;
1639
+ }
1640
+
1641
+ .dbg-tool__section-label {
1642
+ font-size: 0.625rem;
1643
+ font-weight: 600;
1644
+ text-transform: uppercase;
1645
+ letter-spacing: 0.06em;
1646
+ color: var(--cortex-color-text-muted);
1647
+ font-family: system-ui, -apple-system, sans-serif;
1648
+ }
1649
+ .dbg-tool__section-label--success {
1650
+ color: var(--cortex-color-success);
1651
+ }
1652
+ .dbg-tool__section-label--error {
1653
+ color: var(--cortex-color-danger);
1654
+ }
1655
+ .dbg-tool__section-label--approval {
1656
+ color: light-dark(#7c3aed, #a78bfa);
1657
+ }
1658
+
1659
+ .dbg-tool__section-lang {
1660
+ font-size: 0.5625rem;
1661
+ color: var(--cortex-color-border-strong);
1662
+ font-family: ui-monospace, "SF Mono", monospace;
1663
+ text-transform: lowercase;
1664
+ }
1665
+
1666
+ /* ─── Content containers ───────────────────────────────────────────── */
1667
+ .dbg-tool__pre {
1668
+ margin: 0;
1669
+ max-height: 20rem;
1670
+ overflow: auto;
1671
+ padding: 0.625rem 0.75rem;
1672
+ border-radius: 6px;
1673
+ background: var(--cortex-color-surface);
1674
+ font-size: 0.75rem;
1675
+ line-height: 1.3rem;
1676
+ font-family: ui-monospace, "SF Mono", "Cascadia Code", monospace;
1677
+ white-space: pre;
1678
+ overflow-wrap: break-word;
1679
+ }
1680
+
1681
+ .dbg-tool__tree {
1682
+ max-height: 16rem;
1683
+ overflow: auto;
1684
+ padding: 0.625rem 0.75rem;
1685
+ border-radius: 6px;
1686
+ background: var(--cortex-color-surface);
1687
+ }
1688
+
1689
+ .dbg-tool__error-pre {
1690
+ margin: 0;
1691
+ max-height: 16rem;
1692
+ overflow: auto;
1693
+ padding: 0.625rem 0.75rem;
1694
+ border-radius: 6px;
1695
+ background: light-dark(#fef2f2, #450a0a);
1696
+ color: light-dark(#991b1b, #fca5a5);
1697
+ font-size: 0.75rem;
1698
+ line-height: 1.3rem;
1699
+ font-family: ui-monospace, "SF Mono", "Cascadia Code", monospace;
1700
+ white-space: pre-wrap;
1701
+ word-break: break-word;
1702
+ }
1703
+
1704
+ .dbg-tool__message {
1705
+ padding: 0.5rem 0.75rem;
1706
+ font-size: 0.75rem;
1707
+ color: var(--cortex-color-text-secondary);
1708
+ border-radius: 6px;
1709
+ background: var(--cortex-color-surface);
1710
+ }
1711
+ .dbg-tool__message--approval {
1712
+ color: light-dark(#5b21b6, #c4b5fd);
1713
+ background: light-dark(#faf5ff, #3b0764);
1714
+ }
1715
+
1716
+ /* ─── Section variants ─────────────────────────────────────────────── */
1717
+ .dbg-tool__section--success .dbg-tool__tree {
1718
+ background: light-dark(#f0fdf4, #052e16);
1719
+ }
1720
+
1721
+ .dbg-tool__section--error .dbg-tool__tree {
1722
+ background: light-dark(#fef2f2, #450a0a);
1723
+ }
1724
+
1725
+ .cortex-tool-call-animated {
1726
+ display: block;
1727
+ }
1728
+
1729
+ .cortex-tool-pill {
1730
+ display: inline-flex;
1731
+ align-items: center;
1732
+ gap: 0.375rem;
1733
+ padding: 0.25rem 0;
1734
+ max-width: 100%;
1735
+ }
1736
+
1737
+ .cortex-tool-pill__icon {
1738
+ position: relative;
1739
+ width: 0.75rem;
1740
+ height: 0.75rem;
1741
+ display: flex;
1742
+ align-items: center;
1743
+ justify-content: center;
1744
+ flex-shrink: 0;
1745
+ }
1746
+
1747
+ .cortex-tool-pill__spinner {
1748
+ position: absolute;
1749
+ width: 0.625rem;
1750
+ height: 0.625rem;
1751
+ border: 1.5px solid var(--cortex-color-border-strong);
1752
+ border-top-color: var(--cortex-color-text-muted);
1753
+ border-radius: 9999px;
1754
+ opacity: 0;
1755
+ transition: opacity 0.2s;
1756
+ }
1757
+ .cortex-tool-pill__spinner--visible {
1758
+ opacity: 1;
1759
+ animation: cortex-tool-spin 0.8s linear infinite;
1760
+ }
1761
+
1762
+ @keyframes cortex-tool-spin {
1763
+ to {
1764
+ transform: rotate(360deg);
1765
+ }
1766
+ }
1767
+ .cortex-tool-pill__svg {
1768
+ position: absolute;
1769
+ width: 0.75rem;
1770
+ height: 0.75rem;
1771
+ opacity: 0;
1772
+ transform: scale(0.6);
1773
+ transition: opacity 0.2s, transform 0.2s;
1774
+ }
1775
+ .cortex-tool-pill__svg--visible {
1776
+ opacity: 1;
1777
+ transform: scale(1);
1778
+ }
1779
+ .cortex-tool-pill__svg--check {
1780
+ color: var(--cortex-color-success);
1781
+ }
1782
+ .cortex-tool-pill__svg--error {
1783
+ color: var(--cortex-color-danger);
1784
+ }
1785
+
1786
+ .cortex-tool-pill__title {
1787
+ font-size: 0.75rem;
1788
+ color: var(--cortex-color-text-muted);
1789
+ white-space: nowrap;
1790
+ overflow: hidden;
1791
+ text-overflow: ellipsis;
1792
+ transition: color 0.3s;
1793
+ }
1794
+ .cortex-tool-pill__title--error {
1795
+ color: var(--cortex-color-danger);
1796
+ }
1797
+
1798
+ .cortex-reasoning-animated {
1799
+ display: block;
1800
+ }
1801
+
1802
+ .cortex-subtle-activity {
1803
+ display: flex;
1804
+ align-items: center;
1805
+ gap: 0.375rem;
1806
+ padding: 0.25rem 0;
1807
+ width: fit-content;
1808
+ }
1809
+
1810
+ .cortex-subtle-activity__dots {
1811
+ display: flex;
1812
+ align-items: center;
1813
+ gap: 3px;
1814
+ }
1815
+
1816
+ .cortex-subtle-activity__dot {
1817
+ width: 3px;
1818
+ height: 3px;
1819
+ border-radius: 9999px;
1820
+ background: var(--cortex-color-accent);
1821
+ animation: cortex-subtle-dot-pulse 1.4s ease-in-out infinite;
1822
+ }
1823
+ .cortex-subtle-activity__dot--d1 {
1824
+ animation-delay: 200ms;
1825
+ }
1826
+ .cortex-subtle-activity__dot--d2 {
1827
+ animation-delay: 400ms;
1828
+ }
1829
+
1830
+ @keyframes cortex-subtle-dot-pulse {
1831
+ 0%, 100% {
1832
+ opacity: 0.3;
1833
+ transform: scale(0.8);
1834
+ }
1835
+ 40% {
1836
+ opacity: 1;
1837
+ transform: scale(1.3);
1838
+ }
1839
+ }
1840
+ .cortex-subtle-activity__label-mask {
1841
+ overflow: hidden;
1842
+ position: relative;
1843
+ height: 1.1em;
1844
+ }
1845
+
1846
+ .cortex-subtle-activity__label {
1847
+ display: block;
1848
+ font-size: 0.75rem;
1849
+ color: var(--cortex-color-text-muted);
1850
+ white-space: nowrap;
1851
+ line-height: 1.1em;
1852
+ }
1853
+
1854
+ .cortex-subtle-activity__label--idle,
1855
+ .cortex-subtle-activity__label--entering {
1856
+ opacity: 1;
1857
+ transform: translateY(0);
1858
+ transition: opacity 0.3s ease, transform 0.3s ease;
1859
+ }
1860
+
1861
+ .cortex-subtle-activity__label--exiting {
1862
+ opacity: 0;
1863
+ transform: translateY(-6px);
1864
+ transition: opacity 0.3s ease, transform 0.3s ease;
1865
+ }
1866
+
1867
+ .cortex-subtle-activity__label--enter-start {
1868
+ opacity: 0;
1869
+ transform: translateY(6px);
1870
+ transition: none;
1871
+ }
1872
+
1873
+ .cortex-attachment-queue {
1874
+ display: flex;
1875
+ flex-wrap: wrap;
1876
+ gap: 0.375rem;
1877
+ margin-bottom: 0.5rem;
1878
+ }
1879
+
1880
+ .cortex-attachment-chip {
1881
+ display: inline-flex;
1882
+ align-items: center;
1883
+ gap: 0.375rem;
1884
+ max-width: 14rem;
1885
+ padding-block: 0.25rem;
1886
+ padding-inline: 0.5rem 0.375rem;
1887
+ border: 1px solid var(--cortex-color-border);
1888
+ border-radius: var(--cortex-radius);
1889
+ background: var(--cortex-color-surface-subtle);
1890
+ font-size: 0.75rem;
1891
+ color: var(--cortex-color-text-strong);
1892
+ }
1893
+ .cortex-attachment-chip--error {
1894
+ border-color: var(--cortex-color-danger-border);
1895
+ background: var(--cortex-color-danger-surface);
1896
+ color: var(--cortex-color-danger);
1897
+ }
1898
+
1899
+ .cortex-attachment-chip__icon,
1900
+ .cortex-attachment-chip__spinner {
1901
+ flex-shrink: 0;
1902
+ width: 0.875rem;
1903
+ height: 0.875rem;
1904
+ color: var(--cortex-color-text-muted);
1905
+ }
1906
+
1907
+ .cortex-attachment-chip__spinner {
1908
+ animation: cortex-attachment-spin 0.8s linear infinite;
1909
+ }
1910
+
1911
+ .cortex-attachment-chip__spinner-track {
1912
+ opacity: 0.25;
1913
+ }
1914
+
1915
+ @keyframes cortex-attachment-spin {
1916
+ to {
1917
+ transform: rotate(360deg);
1918
+ }
1919
+ }
1920
+ .cortex-attachment-chip__name {
1921
+ overflow: hidden;
1922
+ text-overflow: ellipsis;
1923
+ white-space: nowrap;
1924
+ }
1925
+
1926
+ .cortex-attachment-chip__remove {
1927
+ flex-shrink: 0;
1928
+ display: flex;
1929
+ align-items: center;
1930
+ justify-content: center;
1931
+ width: 1rem;
1932
+ height: 1rem;
1933
+ padding: 0;
1934
+ border: 0;
1935
+ border-radius: 3px;
1936
+ background: transparent;
1937
+ color: currentColor;
1938
+ opacity: 0.6;
1939
+ cursor: pointer;
1940
+ }
1941
+ .cortex-attachment-chip__remove:hover {
1942
+ opacity: 1;
1943
+ background: var(--cortex-color-hover);
1944
+ }
1945
+ .cortex-attachment-chip__remove svg {
1946
+ width: 0.75rem;
1947
+ height: 0.75rem;
1948
+ }
1949
+
1950
+ /* ─── Token Usage Component ────────────────────────────────────────── */
1951
+ .cortex-token-usage {
1952
+ direction: ltr;
1953
+ display: flex;
1954
+ flex-direction: column;
1955
+ margin-top: 0.375rem;
1956
+ font-family: var(--cortex-font-mono);
1957
+ font-size: 0.6875rem;
1958
+ line-height: 1.4;
1959
+ color: var(--cortex-color-text-muted);
1960
+ user-select: none;
1961
+ }
1962
+
1963
+ /* ─── Summary row ──────────────────────────────────────────────────── */
1964
+ html[dir=rtl] .cortex-token-usage__summary {
1965
+ align-self: end;
1966
+ }
1967
+ html[dir=ltr] .cortex-token-usage__summary {
1968
+ align-self: start;
1969
+ }
1970
+ .cortex-token-usage__summary {
1971
+ display: inline-flex;
1972
+ align-items: center;
1973
+ gap: 0.625rem;
1974
+ padding: 0.3125rem 0.625rem;
1975
+ border: 1px solid transparent;
1976
+ border-radius: 6px;
1977
+ background: transparent;
1978
+ cursor: pointer;
1979
+ transition: background 150ms ease, border-color 150ms ease;
1980
+ font: inherit;
1981
+ color: inherit;
1982
+ letter-spacing: 0.01em;
1983
+ }
1984
+ .cortex-token-usage__summary:hover {
1985
+ background: var(--cortex-color-surface-subtle);
1986
+ border-color: var(--cortex-color-border);
1987
+ }
1988
+
1989
+ .cortex-token-usage__total-number {
1990
+ font-weight: 600;
1991
+ font-variant-numeric: tabular-nums;
1992
+ color: var(--cortex-color-text-secondary);
1993
+ }
1994
+
1995
+ .cortex-token-usage__total-label {
1996
+ margin-inline-start: 3px;
1997
+ color: var(--cortex-color-text-muted);
1998
+ font-weight: 400;
1999
+ letter-spacing: 0.03em;
2000
+ }
2001
+
2002
+ .cortex-token-usage__model {
2003
+ color: var(--cortex-color-border-strong);
2004
+ font-weight: 400;
2005
+ font-size: 0.5625rem;
2006
+ letter-spacing: 0.02em;
2007
+ }
2008
+
2009
+ /* ─── Inline pills ─────────────────────────────────────────────────── */
2010
+ .cortex-token-usage__pills {
2011
+ display: inline-flex;
2012
+ align-items: center;
2013
+ gap: 0.5rem;
2014
+ }
2015
+
2016
+ .cortex-token-usage__pill {
2017
+ display: inline-flex;
2018
+ align-items: center;
2019
+ gap: 4px;
2020
+ font-variant-numeric: tabular-nums;
2021
+ color: var(--cortex-color-text-muted);
2022
+ }
2023
+
2024
+ .cortex-token-usage__dot {
2025
+ width: 6px;
2026
+ height: 6px;
2027
+ border-radius: 50%;
2028
+ flex-shrink: 0;
2029
+ }
2030
+ .cortex-token-usage__dot--input {
2031
+ background: light-dark(#ea580c, #fb923c);
2032
+ box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.1);
2033
+ }
2034
+ .cortex-token-usage__dot--output {
2035
+ background: light-dark(#4f46e5, #818cf8);
2036
+ box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
2037
+ }
2038
+
2039
+ /* ─── Cache badge (summary) ────────────────────────────────────────── */
2040
+ .cortex-token-usage__cache-badge {
2041
+ font-size: 0.5625rem;
2042
+ font-weight: 600;
2043
+ color: var(--cortex-color-success);
2044
+ background: var(--cortex-color-success-surface);
2045
+ padding: 1px 6px;
2046
+ border-radius: 3px;
2047
+ font-family: system-ui, -apple-system, sans-serif;
2048
+ }
2049
+
2050
+ /* ─── Chevron ──────────────────────────────────────────────────────── */
2051
+ .cortex-token-usage__chevron {
2052
+ color: var(--cortex-color-border-strong);
2053
+ transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
2054
+ flex-shrink: 0;
2055
+ }
2056
+
2057
+ .cortex-token-usage--expanded .cortex-token-usage__chevron {
2058
+ transform: rotate(180deg);
2059
+ }
2060
+
2061
+ /* ─── Expandable detail panel ──────────────────────────────────────── */
2062
+ .cortex-token-usage__details {
2063
+ display: grid;
2064
+ grid-template-rows: 0fr;
2065
+ transition: grid-template-rows 250ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease, margin 200ms ease;
2066
+ opacity: 0;
2067
+ margin-top: 0;
2068
+ }
2069
+
2070
+ .cortex-token-usage__details-inner {
2071
+ overflow: hidden;
2072
+ }
2073
+
2074
+ .cortex-token-usage--expanded .cortex-token-usage__details {
2075
+ grid-template-rows: 1fr;
2076
+ opacity: 1;
2077
+ margin-top: 0.375rem;
2078
+ }
2079
+
2080
+ /* ─── Two-column layout ────────────────────────────────────────────── */
2081
+ .cortex-token-usage__columns {
2082
+ display: grid;
2083
+ grid-template-columns: 1fr 1fr;
2084
+ gap: 1px;
2085
+ background: var(--cortex-color-border);
2086
+ border-radius: 8px;
2087
+ overflow: hidden;
2088
+ }
2089
+
2090
+ .cortex-token-usage__col {
2091
+ background: var(--cortex-color-surface-subtle);
2092
+ padding: 0.5rem 0.625rem;
2093
+ }
2094
+
2095
+ .cortex-token-usage__col-header {
2096
+ display: flex;
2097
+ align-items: center;
2098
+ gap: 0.375rem;
2099
+ margin-bottom: 0.375rem;
2100
+ }
2101
+
2102
+ .cortex-token-usage__col-label {
2103
+ font-weight: 600;
2104
+ font-size: 0.5625rem;
2105
+ text-transform: uppercase;
2106
+ letter-spacing: 0.06em;
2107
+ color: var(--cortex-color-text-secondary);
2108
+ font-family: system-ui, -apple-system, sans-serif;
2109
+ }
2110
+
2111
+ .cortex-token-usage__col-total {
2112
+ margin-inline-start: auto;
2113
+ font-weight: 700;
2114
+ font-variant-numeric: tabular-nums;
2115
+ color: var(--cortex-color-text-secondary);
2116
+ }
2117
+
2118
+ /* ─── Data rows ────────────────────────────────────────────────────── */
2119
+ .cortex-token-usage__rows {
2120
+ display: flex;
2121
+ flex-direction: column;
2122
+ gap: 1px;
2123
+ }
2124
+
2125
+ .cortex-token-usage__row {
2126
+ display: flex;
2127
+ align-items: baseline;
2128
+ justify-content: space-between;
2129
+ padding: 2px 0;
2130
+ padding-inline-start: calc(6px + 0.375rem);
2131
+ }
2132
+
2133
+ .cortex-token-usage__row-label {
2134
+ color: var(--cortex-color-text-muted);
2135
+ font-size: 0.625rem;
2136
+ }
2137
+
2138
+ .cortex-token-usage__row-value {
2139
+ font-variant-numeric: tabular-nums;
2140
+ color: var(--cortex-color-text-secondary);
2141
+ font-weight: 500;
2142
+ }
2143
+
2144
+ /* ─── Cache ratio bar ──────────────────────────────────────────────── */
2145
+ .cortex-token-usage__cache-bar-row {
2146
+ display: flex;
2147
+ align-items: center;
2148
+ gap: 0.5rem;
2149
+ margin-top: 0.5rem;
2150
+ padding-inline-start: calc(6px + 0.375rem);
2151
+ }
2152
+
2153
+ .cortex-token-usage__cache-bar {
2154
+ flex: 1;
2155
+ height: 3px;
2156
+ border-radius: 2px;
2157
+ background: var(--cortex-color-border);
2158
+ overflow: hidden;
2159
+ }
2160
+
2161
+ .cortex-token-usage__cache-fill {
2162
+ height: 100%;
2163
+ border-radius: 2px;
2164
+ background: linear-gradient(90deg, #10b981, var(--cortex-color-success));
2165
+ transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
2166
+ }
2167
+
2168
+ .cortex-token-usage__cache-label {
2169
+ font-size: 0.5625rem;
2170
+ font-weight: 600;
2171
+ color: var(--cortex-color-success);
2172
+ white-space: nowrap;
2173
+ font-family: system-ui, -apple-system, sans-serif;
2174
+ }
2175
+
2176
+ /* ─── LLM Inspector ────────────────────────────────────────────────── */
2177
+ .cortex-llm-inspector {
2178
+ direction: ltr;
2179
+ display: flex;
2180
+ flex-direction: column;
2181
+ margin-top: 0.375rem;
2182
+ font-family: var(--cortex-font-mono);
2183
+ font-size: 0.6875rem;
2184
+ line-height: 1.4;
2185
+ color: var(--cortex-color-text-muted);
2186
+ user-select: none;
2187
+ }
2188
+
2189
+ /* ─── Trigger button ───────────────────────────────────────────────── */
2190
+ html[dir=rtl] .cortex-llm-inspector__trigger {
2191
+ align-self: end;
2192
+ }
2193
+ html[dir=ltr] .cortex-llm-inspector__trigger {
2194
+ align-self: start;
2195
+ }
2196
+ .cortex-llm-inspector__trigger {
2197
+ display: inline-flex;
2198
+ align-items: center;
2199
+ gap: 0.5rem;
2200
+ padding: 0.3125rem 0.625rem;
2201
+ border: 1px solid transparent;
2202
+ border-radius: 6px;
2203
+ background: transparent;
2204
+ cursor: pointer;
2205
+ transition: background 150ms ease, border-color 150ms ease;
2206
+ font: inherit;
2207
+ color: inherit;
2208
+ letter-spacing: 0.01em;
2209
+ }
2210
+ .cortex-llm-inspector__trigger:hover {
2211
+ background: var(--cortex-color-surface-subtle);
2212
+ border-color: var(--cortex-color-border);
2213
+ }
2214
+
2215
+ .cortex-llm-inspector__icon {
2216
+ color: var(--cortex-color-text-muted);
2217
+ flex-shrink: 0;
2218
+ }
2219
+
2220
+ .cortex-llm-inspector__loading {
2221
+ color: var(--cortex-color-border-strong);
2222
+ font-style: italic;
2223
+ }
2224
+
2225
+ .cortex-llm-inspector__badge {
2226
+ display: inline-flex;
2227
+ align-items: center;
2228
+ justify-content: center;
2229
+ min-width: 1.25rem;
2230
+ height: 1.25rem;
2231
+ padding: 0 0.35rem;
2232
+ border-radius: 9999px;
2233
+ background: var(--cortex-color-border);
2234
+ color: var(--cortex-color-text-secondary);
2235
+ font-size: 0.5625rem;
2236
+ font-weight: 700;
2237
+ }
2238
+
2239
+ .cortex-llm-inspector__chevron {
2240
+ color: var(--cortex-color-border-strong);
2241
+ transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
2242
+ flex-shrink: 0;
2243
+ }
2244
+
2245
+ .cortex-llm-inspector--open .cortex-llm-inspector__chevron {
2246
+ transform: rotate(180deg);
2247
+ }
2248
+
2249
+ /* ─── Expandable panel wrapper ─────────────────────────────────────── */
2250
+ .cortex-llm-inspector__panel-wrapper {
2251
+ display: grid;
2252
+ grid-template-rows: 0fr;
2253
+ transition: grid-template-rows 250ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease, margin 200ms ease;
2254
+ opacity: 0;
2255
+ margin-top: 0;
2256
+ }
2257
+
2258
+ .cortex-llm-inspector__panel-inner {
2259
+ overflow: hidden;
2260
+ }
2261
+
2262
+ .cortex-llm-inspector--open .cortex-llm-inspector__panel-wrapper {
2263
+ grid-template-rows: 1fr;
2264
+ opacity: 1;
2265
+ margin-top: 0.375rem;
2266
+ }
2267
+
2268
+ /* ─── Panel ────────────────────────────────────────────────────────── */
2269
+ .cortex-llm-inspector__panel {
2270
+ display: flex;
2271
+ flex-direction: column;
2272
+ gap: 0.375rem;
2273
+ }
2274
+
2275
+ .cortex-llm-inspector__empty {
2276
+ padding: 0.625rem;
2277
+ color: var(--cortex-color-text-muted);
2278
+ font-style: italic;
2279
+ }
2280
+
2281
+ /* ─── Step card ────────────────────────────────────────────────────── */
2282
+ .cortex-llm-inspector__step {
2283
+ border-radius: 8px;
2284
+ background: var(--cortex-color-surface-subtle);
2285
+ overflow: hidden;
2286
+ transition: box-shadow 200ms ease;
2287
+ }
2288
+ .cortex-llm-inspector__step--expanded {
2289
+ box-shadow: 0 0 0 1px var(--cortex-color-border);
2290
+ }
2291
+
2292
+ .cortex-llm-inspector__step-header {
2293
+ display: flex;
2294
+ align-items: center;
2295
+ gap: 0.5rem;
2296
+ width: 100%;
2297
+ padding: 0.5rem 0.625rem;
2298
+ border: none;
2299
+ background: transparent;
2300
+ cursor: pointer;
2301
+ font: inherit;
2302
+ color: inherit;
2303
+ text-align: start;
2304
+ transition: background 150ms ease;
2305
+ }
2306
+ .cortex-llm-inspector__step-header:hover {
2307
+ background: rgba(0, 0, 0, 0.02);
2308
+ }
2309
+
2310
+ .cortex-llm-inspector__step-label {
2311
+ font-weight: 600;
2312
+ color: var(--cortex-color-text-secondary);
2313
+ white-space: nowrap;
2314
+ font-family: system-ui, -apple-system, sans-serif;
2315
+ }
2316
+
2317
+ .cortex-llm-inspector__step-metrics {
2318
+ display: inline-flex;
2319
+ align-items: center;
2320
+ gap: 0.625rem;
2321
+ margin-inline-start: auto;
2322
+ font-variant-numeric: tabular-nums;
2323
+ }
2324
+
2325
+ .cortex-llm-inspector__metric {
2326
+ display: inline-flex;
2327
+ align-items: center;
2328
+ gap: 3px;
2329
+ }
2330
+
2331
+ .cortex-llm-inspector__dot {
2332
+ width: 5px;
2333
+ height: 5px;
2334
+ border-radius: 50%;
2335
+ flex-shrink: 0;
2336
+ }
2337
+ .cortex-llm-inspector__dot--input {
2338
+ background: light-dark(#ea580c, #fb923c);
2339
+ box-shadow: 0 0 0 1.5px rgba(234, 88, 12, 0.12);
2340
+ }
2341
+ .cortex-llm-inspector__dot--output {
2342
+ background: light-dark(#4f46e5, #818cf8);
2343
+ box-shadow: 0 0 0 1.5px rgba(79, 70, 229, 0.12);
2344
+ }
2345
+
2346
+ .cortex-llm-inspector__cache-pct {
2347
+ font-size: 0.5625rem;
2348
+ font-weight: 600;
2349
+ color: var(--cortex-color-success);
2350
+ background: var(--cortex-color-success-surface);
2351
+ padding: 1px 5px;
2352
+ border-radius: 3px;
2353
+ font-family: system-ui, -apple-system, sans-serif;
2354
+ }
2355
+
2356
+ .cortex-llm-inspector__step-chevron {
2357
+ color: var(--cortex-color-border-strong);
2358
+ transition: transform 200ms ease;
2359
+ flex-shrink: 0;
2360
+ }
2361
+
2362
+ .cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-chevron {
2363
+ transform: rotate(180deg);
2364
+ }
2365
+
2366
+ /* ─── Step body (expandable) ───────────────────────────────────────── */
2367
+ .cortex-llm-inspector__step-body-wrapper {
2368
+ display: grid;
2369
+ grid-template-rows: 0fr;
2370
+ transition: grid-template-rows 250ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease;
2371
+ opacity: 0;
2372
+ }
2373
+
2374
+ .cortex-llm-inspector__step-body-inner {
2375
+ overflow: hidden;
2376
+ }
2377
+
2378
+ .cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-body-wrapper {
2379
+ grid-template-rows: 1fr;
2380
+ opacity: 1;
2381
+ }
2382
+
2383
+ .cortex-llm-inspector__step-body {
2384
+ padding: 0 0.625rem 0.625rem;
2385
+ display: flex;
2386
+ flex-direction: column;
2387
+ gap: 0.5rem;
2388
+ }
2389
+
2390
+ /* ─── Usage rows (compact, replaces 4x2 grid) ─────────────────────── */
2391
+ .cortex-llm-inspector__usage-rows {
2392
+ display: flex;
2393
+ flex-direction: column;
2394
+ border-radius: 6px;
2395
+ overflow: hidden;
2396
+ background: var(--cortex-color-border);
2397
+ gap: 1px;
2398
+ }
2399
+
2400
+ .cortex-llm-inspector__usage-row {
2401
+ display: flex;
2402
+ align-items: baseline;
2403
+ gap: 0.5rem;
2404
+ padding: 0.375rem 0.625rem;
2405
+ background: var(--cortex-color-surface);
2406
+ flex-wrap: wrap;
2407
+ }
2408
+
2409
+ .cortex-llm-inspector__usage-row--total {
2410
+ background: light-dark(#fafbfc, #141414);
2411
+ }
2412
+
2413
+ .cortex-llm-inspector__usage-lbl {
2414
+ font-size: 0.5625rem;
2415
+ text-transform: uppercase;
2416
+ letter-spacing: 0.05em;
2417
+ color: var(--cortex-color-text-muted);
2418
+ font-weight: 600;
2419
+ width: 3.25rem;
2420
+ flex-shrink: 0;
2421
+ font-family: system-ui, -apple-system, sans-serif;
2422
+ }
2423
+
2424
+ .cortex-llm-inspector__usage-val {
2425
+ font-variant-numeric: tabular-nums;
2426
+ font-weight: 600;
2427
+ color: var(--cortex-color-text-secondary);
2428
+ min-width: 3rem;
2429
+ }
2430
+
2431
+ .cortex-llm-inspector__usage-row--total .cortex-llm-inspector__usage-val {
2432
+ font-weight: 700;
2433
+ color: var(--cortex-color-text-heading);
2434
+ }
2435
+
2436
+ .cortex-llm-inspector__usage-detail {
2437
+ color: var(--cortex-color-border-strong);
2438
+ font-size: 0.5625rem;
2439
+ margin-inline-start: auto;
2440
+ }
2441
+
2442
+ /* ─── Tabs (underline style) ───────────────────────────────────────── */
2443
+ .cortex-llm-inspector__tabs {
2444
+ display: flex;
2445
+ gap: 0;
2446
+ border-bottom: 1px solid var(--cortex-color-border);
2447
+ }
2448
+
2449
+ .cortex-llm-inspector__tab {
2450
+ padding: 0.375rem 0.75rem;
2451
+ border: none;
2452
+ background: transparent;
2453
+ cursor: pointer;
2454
+ font: inherit;
2455
+ color: var(--cortex-color-text-muted);
2456
+ font-weight: 500;
2457
+ position: relative;
2458
+ transition: color 150ms ease;
2459
+ font-family: system-ui, -apple-system, sans-serif;
2460
+ }
2461
+ .cortex-llm-inspector__tab:hover {
2462
+ color: var(--cortex-color-text-secondary);
2463
+ }
2464
+ .cortex-llm-inspector__tab--active {
2465
+ color: var(--cortex-color-text-heading);
2466
+ font-weight: 600;
2467
+ }
2468
+ .cortex-llm-inspector__tab--active::after {
2469
+ content: "";
2470
+ position: absolute;
2471
+ inset-inline: 0;
2472
+ bottom: -1px;
2473
+ height: 2px;
2474
+ background: var(--cortex-color-text-heading);
2475
+ border-radius: 1px 1px 0 0;
2476
+ }
2477
+
2478
+ /* ─── JSON pane ────────────────────────────────────────────────────── */
2479
+ .cortex-llm-inspector__json-pane {
2480
+ position: relative;
2481
+ max-height: 24rem;
2482
+ overflow: auto;
2483
+ padding: 0.625rem;
2484
+ background: var(--cortex-color-surface);
2485
+ border-radius: 6px;
2486
+ }
2487
+
2488
+ .cortex-llm-inspector__json-copy {
2489
+ position: sticky;
2490
+ top: 0;
2491
+ float: inline-end;
2492
+ z-index: 1;
2493
+ }
2494
+
2495
+ .cortex-json-tree {
2496
+ display: block;
2497
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
2498
+ font-size: 0.75rem;
2499
+ line-height: 1.25rem;
2500
+ user-select: text;
2501
+ white-space: pre-wrap;
2502
+ word-break: break-word;
2503
+ }
2504
+
2505
+ .jt-indent {
2506
+ padding-inline-start: 1.25em;
2507
+ border-inline-start: 1px solid var(--cortex-color-border);
2508
+ margin-inline-start: 0.3em;
2509
+ }
2510
+
2511
+ .jt-line {
2512
+ position: relative;
2513
+ }
2514
+
2515
+ .jt-toggle {
2516
+ cursor: pointer;
2517
+ user-select: none;
2518
+ }
2519
+ .jt-toggle:hover .jt-arrow {
2520
+ color: var(--cortex-color-text);
2521
+ }
2522
+
2523
+ .jt-arrow {
2524
+ display: inline-block;
2525
+ width: 1em;
2526
+ text-align: center;
2527
+ color: var(--cortex-color-text-muted);
2528
+ font-size: 0.525rem;
2529
+ transition: transform 0.15s ease;
2530
+ vertical-align: middle;
2531
+ }
2532
+ .jt-arrow--collapsed {
2533
+ transform: rotate(-90deg);
2534
+ }
2535
+
2536
+ .jt-bracket {
2537
+ color: var(--cortex-color-text-secondary);
2538
+ }
2539
+
2540
+ .jt-key {
2541
+ color: light-dark(#6366f1, #818cf8);
2542
+ }
2543
+
2544
+ .jt-colon {
2545
+ color: var(--cortex-color-text-secondary);
2546
+ }
2547
+
2548
+ .jt-comma {
2549
+ color: var(--cortex-color-text-muted);
2550
+ }
2551
+
2552
+ .jt-string {
2553
+ color: var(--cortex-color-success);
2554
+ }
2555
+
2556
+ .jt-number {
2557
+ color: light-dark(#2563eb, #60a5fa);
2558
+ }
2559
+
2560
+ .jt-boolean {
2561
+ color: light-dark(#d97706, #fbbf24);
2562
+ }
2563
+
2564
+ .jt-null {
2565
+ color: var(--cortex-color-text-muted);
2566
+ font-style: italic;
2567
+ }
2568
+
2569
+ .jt-collapsed-hint {
2570
+ display: inline-block;
2571
+ padding: 0 0.4em;
2572
+ margin: 0 0.15em;
2573
+ font-size: 0.625rem;
2574
+ line-height: 1.5;
2575
+ color: var(--cortex-color-text-muted);
2576
+ background: var(--cortex-color-surface-subtle);
2577
+ border: 1px solid var(--cortex-color-border);
2578
+ border-radius: 3px;
2579
+ font-style: italic;
2580
+ cursor: pointer;
2581
+ user-select: none;
2582
+ vertical-align: middle;
2583
+ }
2584
+ .jt-collapsed-hint:hover {
2585
+ color: var(--cortex-color-text-secondary);
2586
+ border-color: var(--cortex-color-border-strong);
2587
+ background: var(--cortex-color-surface-muted);
2588
+ }
2589
+
2590
+ .cortex-copy-btn {
2591
+ display: inline-flex;
2592
+ align-items: center;
2593
+ }
2594
+
2595
+ .cortex-copy-btn__button {
2596
+ display: inline-flex;
2597
+ align-items: center;
2598
+ justify-content: center;
2599
+ width: 1.375rem;
2600
+ height: 1.375rem;
2601
+ padding: 0;
2602
+ border: none;
2603
+ border-radius: 3px;
2604
+ background: transparent;
2605
+ color: var(--cortex-color-text-muted);
2606
+ cursor: pointer;
2607
+ opacity: 0;
2608
+ transition: opacity 150ms ease, color 150ms ease, background 150ms ease;
2609
+ }
2610
+ :hover > cortex-copy-button .cortex-copy-btn__button, :hover > .cortex-copy-btn .cortex-copy-btn__button, .cortex-copy-btn__button:hover, .cortex-copy-btn__button:focus-visible {
2611
+ opacity: 1;
2612
+ }
2613
+ .cortex-copy-btn__button:hover {
2614
+ background: var(--cortex-color-hover);
2615
+ color: var(--cortex-color-text);
2616
+ }
2617
+ .cortex-copy-btn__button--copied {
2618
+ opacity: 1;
2619
+ color: var(--cortex-color-success);
2620
+ pointer-events: none;
2621
+ }
2622
+ .cortex-copy-btn__button--copied:hover {
2623
+ color: var(--cortex-color-success);
2624
+ background: transparent;
2625
+ }
2626
+
2627
+ .cortex-copy-btn__icon {
2628
+ flex-shrink: 0;
2629
+ }
2630
+ .cortex-copy-btn__icon--check {
2631
+ animation: cortex-copy-pop 250ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
2632
+ }
2633
+
2634
+ @keyframes cortex-copy-pop {
2635
+ 0% {
2636
+ transform: scale(0.6);
2637
+ opacity: 0;
2638
+ }
2639
+ 100% {
2640
+ transform: scale(1);
2641
+ opacity: 1;
2642
+ }
2643
+ }
2644
+ @media (prefers-reduced-motion: reduce) {
2645
+ .cortex-widget *,
2646
+ .cortex-widget *::before,
2647
+ .cortex-widget *::after {
2648
+ animation-duration: 0.01ms !important;
2649
+ animation-iteration-count: 1 !important;
2650
+ transition-duration: 0.01ms !important;
2651
+ }
2652
+ }