@smart-cloud/ai-kit-ui 1.0.2 → 1.1.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.
@@ -1,32 +1,193 @@
1
+ /* ==========================================================================
2
+ WP Suite AI Kit UI – Customizable Design Tokens (v2.1)
3
+ - External customization via --ai-kit-* variables
4
+ - Unified launcher + chat positioning (single source of truth via variables)
5
+ - Default squared corners everywhere (radius = 0), optional launcher override
6
+ - Mantine Button radius override supported via --button-radius
7
+ ========================================================================== */
8
+
1
9
  :host {
2
- --ai-kit-border-width: 1px;
10
+ /* ---------------------------
11
+ 0) Core typography & rhythm
12
+ --------------------------- */
13
+ --ai-kit-font-family:
14
+ Archivo, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
15
+ Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
16
+
17
+ /* Base font sizes */
18
+ --ai-kit-font-size: 14px;
19
+ --ai-kit-font-size-sm: 0.85rem;
20
+ --ai-kit-font-size-xs: 0.78rem;
21
+ --ai-kit-font-size-title: 0.9rem;
22
+
23
+ --ai-kit-line-height: 1.4;
24
+
25
+ /* Spacing scale */
26
+ --ai-kit-space-1: 4px;
27
+ --ai-kit-space-2: 8px;
28
+ --ai-kit-space-3: 12px;
29
+ --ai-kit-space-4: 16px;
30
+ --ai-kit-space-5: 20px;
31
+
32
+ /* Back-compat aliases */
33
+ --ai-kit-spacing-sm: var(--ai-kit-space-2);
34
+ --ai-kit-spacing-md: var(--ai-kit-space-3);
35
+ --ai-kit-spacing-lg: var(--ai-kit-space-4);
36
+
37
+ /* Radius
38
+ IMPORTANT: default squared corners everywhere */
39
+ --ai-kit-radius: 0px;
40
+ --ai-kit-radius-sm: 8px;
41
+ --ai-kit-radius-pill: 999px;
42
+ --ai-kit-radius-round: 50%;
3
43
 
4
- --ai-kit-border-color: var(
44
+ /* Launcher can override independently */
45
+ --ai-kit-launcher-radius: var(--ai-kit-radius-sm);
46
+
47
+ /* Useful “bridge” vars */
48
+ --ai-kit-button-padding-x: var(--button-padding-x, 12px);
49
+ --ai-kit-input-padding-x: var(--input-padding-x, 12px);
50
+
51
+ /* ---------------------------
52
+ 1) Semantic color tokens
53
+ --------------------------- */
54
+ --ai-kit-color-text: var(--mantine-color-text, #222);
55
+ --ai-kit-color-text-muted: rgba(0, 0, 0, 0.6);
56
+ --ai-kit-color-border: var(
5
57
  --mantine-color-default-border,
6
58
  rgba(0, 0, 0, 0.12)
7
59
  );
8
- --ai-kit-text-color: var(
9
- --mantine-color-text,
10
- var(--mantine-color-default-color)
11
- );
60
+ --ai-kit-color-border-muted: rgba(0, 0, 0, 0.18);
61
+
62
+ --ai-kit-color-surface: var(--mantine-color-body, #fff);
63
+ --ai-kit-color-surface-2: rgba(235, 235, 235, 0.15);
64
+ --ai-kit-color-surface-3: rgba(0, 0, 0, 0.03);
65
+
66
+ --ai-kit-color-danger: #c92a2a;
67
+ --ai-kit-color-warning: #f59e0b;
68
+ --ai-kit-color-success: #22c55e;
69
+
70
+ /* Brand / primary */
71
+ --ai-kit-color-primary: #228be6;
72
+ --ai-kit-color-primary-hover: #1971c2;
73
+ --ai-kit-color-primary-contrast: #fff;
12
74
 
13
- --ai-kit-background-color: var(--mantine-color-body);
14
- --ai-kit-options-background-color: rgba(235, 235, 235, 0.15);
75
+ /* Back-compat aliases (existing names) */
76
+ --ai-kit-text-color: var(--ai-kit-color-text);
77
+ --ai-kit-background-color: var(--ai-kit-color-surface);
78
+ --ai-kit-options-background-color: var(--ai-kit-color-surface-2);
79
+
80
+ --ai-kit-color-text-light: var(--ai-kit-color-text-muted);
81
+ --ai-kit-color-border-light: rgba(0, 0, 0, 0.1);
82
+ --ai-kit-color-background: var(--ai-kit-color-surface);
83
+ --ai-kit-color-background-light: var(--ai-kit-color-surface-3);
84
+ --ai-kit-color-background-lighter: rgba(0, 0, 0, 0.04);
85
+ --ai-kit-color-background-input: rgba(0, 0, 0, 0.06);
86
+
87
+ /* ---------------------------
88
+ 2) Shadows
89
+ --------------------------- */
90
+ --ai-kit-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
91
+ --ai-kit-shadow-sm-hover: 0 6px 16px rgba(0, 0, 0, 0.2);
92
+
93
+ /* ---------------------------
94
+ 3) Feature border animation tokens
95
+ --------------------------- */
96
+ --ai-kit-border-width: 1px;
97
+ --ai-kit-border-color: var(--ai-kit-color-border);
15
98
 
16
- --ai-kit-border-radius: var(--paper-radius);
17
99
  --ai-kit-border-thickness: 2px;
18
100
  --ai-kit-border-speed: 1400ms;
19
101
  --ai-kit-border-angle: 0deg;
102
+
103
+ --ai-kit-border-gradient: conic-gradient(
104
+ from var(--ai-kit-border-angle, 0deg) at 50% 50%,
105
+ #00c2ff,
106
+ #7c3aed,
107
+ #22c55e,
108
+ #f59e0b,
109
+ #00c2ff
110
+ );
111
+
112
+ --ai-kit-position-z-index: 100001;
113
+
114
+ /* default offsets */
115
+ --ai-kit-open-button-offset-x: 20px;
116
+ --ai-kit-open-button-offset-y: 20px;
117
+
118
+ /* The active position values (set by wrapper variants) */
119
+ --ai-kit-pos-top: auto;
120
+ --ai-kit-pos-right: var(--ai-kit-open-button-offset-x);
121
+ --ai-kit-pos-bottom: var(--ai-kit-open-button-offset-y);
122
+ --ai-kit-pos-left: auto;
123
+
124
+ /* Sizing */
125
+ --ai-kit-chat-launcher-size: 60px;
126
+
127
+ --ai-kit-chat-width: 400px;
128
+ --ai-kit-chat-height-min: 360px;
129
+ --ai-kit-chat-height-max: 80vh;
130
+ --ai-kit-chat-height-cap: 1000px;
131
+
132
+ /* Launcher colors */
133
+ --ai-kit-launcher-bg: var(--ai-kit-color-primary);
134
+ --ai-kit-launcher-color: var(--ai-kit-color-primary-contrast);
135
+ --ai-kit-launcher-bg-hover: var(--ai-kit-color-primary-hover);
136
+ --ai-kit-launcher-shadow: var(--ai-kit-shadow-sm);
137
+ --ai-kit-launcher-shadow-hover: var(--ai-kit-shadow-sm-hover);
138
+
139
+ /* Chat surface & borders */
140
+ --ai-kit-chat-surface: var(--ai-kit-color-background);
141
+ --ai-kit-chat-surface-subtle: var(--ai-kit-color-background-light);
142
+ --ai-kit-chat-border-color: var(--ai-kit-color-border);
143
+ --ai-kit-chat-border-radius: var(--ai-kit-radius-sm);
144
+
145
+ /* Icon color in header actions */
146
+ --ai-kit-chat-icon-color: var(--ai-kit-color-text);
147
+
148
+ /* Status */
149
+ --ai-kit-chat-status-bg: rgba(255, 255, 255, 0.95);
150
+ --ai-kit-chat-status-fg: var(--ai-kit-color-text-muted);
151
+
152
+ /* Bubbles */
153
+ --ai-kit-user-bubble-bg: var(--ai-kit-color-primary);
154
+ --ai-kit-user-bubble-color: var(--ai-kit-color-primary-contrast);
155
+ --ai-kit-assistant-bubble-bg: rgba(0, 0, 0, 0.05);
156
+ --ai-kit-assistant-bubble-color: inherit;
157
+
158
+ /* Markdown */
159
+ --ai-kit-chat-code-bg: rgba(0, 0, 0, 0.1);
160
+ --ai-kit-chat-pre-bg: rgba(0, 0, 0, 0.05);
161
+
162
+ /* Close button */
163
+ --ai-kit-chat-close-bg: var(--ai-kit-color-background-lighter);
164
+ --ai-kit-chat-close-bg-hover: rgba(0, 0, 0, 0.07);
165
+
166
+ /* Typing */
167
+ --ai-kit-chat-typing-dot-color: #adb5bd;
168
+
169
+ /* Feedback */
170
+ --ai-kit-chat-feedback-bg: var(--ai-kit-color-background-lighter);
171
+ --ai-kit-chat-feedback-border: var(--ai-kit-color-border);
172
+ --ai-kit-chat-feedback-active-bg: #ffd43b;
173
+
174
+ /* Typography apply */
175
+ font-family: var(--ai-kit-font-family);
20
176
  }
21
177
 
178
+ /* Variation defaults */
22
179
  :host[data-ai-kit-variation="default"] {
23
180
  --ai-kit-background-color: transparent;
24
181
  }
25
182
 
183
+ /* ==========================================================================
184
+ AI Feature
185
+ ========================================================================== */
186
+
26
187
  .ai-feature-root {
27
- --mb-z-index: var(--ai-kit-z-index, 100000) !important;
188
+ --mb-z-index: var(--ai-kit-position-z-index) !important;
28
189
  border: var(--ai-kit-border-width) solid var(--ai-kit-border-color);
29
- border-radius: var(--ai-kit-border-radius);
190
+ border-radius: var(--ai-kit-radius);
30
191
  }
31
192
 
32
193
  .ai-feature-root .Mantine-Paper-root {
@@ -37,12 +198,13 @@
37
198
  width: 24px;
38
199
  height: 24px;
39
200
  fill: none;
40
- margin-right: 8px;
201
+ margin-right: var(--ai-kit-space-2);
41
202
  }
42
203
 
43
204
  .ai-feature-open-button-no-title {
44
- padding-inline-start: var(--button-padding-x);
205
+ padding-inline-start: var(--ai-kit-button-padding-x);
45
206
  }
207
+
46
208
  .ai-feature-open-button-no-title .mantine-Button-section {
47
209
  margin-inline-end: unset;
48
210
  }
@@ -50,8 +212,8 @@
50
212
  .ai-feature-options {
51
213
  background-color: var(--ai-kit-options-background-color);
52
214
  border: var(--ai-kit-border-width) solid var(--ai-kit-border-color);
53
- border-radius: var(--ai-kit-border-radius);
54
- font-size: var(--mantine-font-size-xs);
215
+ border-radius: var(--ai-kit-radius-sm);
216
+ font-size: var(--ai-kit-font-size-xs);
55
217
  cursor: pointer;
56
218
  }
57
219
 
@@ -69,41 +231,45 @@
69
231
  }
70
232
 
71
233
  .ai-feature-status-text {
72
- font-size: var(--mantine-font-size-xs);
234
+ font-size: var(--ai-kit-font-size-xs);
73
235
  opacity: 0.85;
74
236
  }
75
237
 
76
238
  .ai-feature-generated-content {
77
239
  border: var(--ai-kit-border-width) solid var(--ai-kit-border-color);
78
- border-radius: var(--ai-kit-border-radius);
240
+ border-radius: var(--ai-kit-radius);
79
241
  white-space: normal;
80
242
  background-color: var(--ai-kit-options-background-color);
81
243
  max-height: 400px;
82
244
  overflow: auto;
83
- padding: var(--mantine-spacing-sm);
84
- font-size: var(--mantine-font-size-sm);
85
- line-height: var(--mantine-line-height-sm);
245
+ padding: var(--ai-kit-space-2);
246
+ font-size: var(--ai-kit-font-size);
247
+ line-height: var(--ai-kit-line-height);
86
248
  }
249
+
87
250
  .ai-feature-generated-content * {
88
251
  margin-block-start: auto;
89
252
  margin-block-end: auto;
90
253
  }
254
+
91
255
  .ai-feature-generated-content.ai-feature-preview,
92
256
  .ai-feature-generated-content.ai-feature-editor {
93
257
  max-height: 200px;
94
258
  }
259
+
95
260
  .ai-feature-generated-content.ai-feature-editor textarea {
96
261
  border: 0;
97
262
  max-height: 198px;
98
263
  resize: vertical;
99
264
  }
100
265
 
266
+ /* Animated border wrapper */
101
267
  .ai-kit-feature-border {
102
268
  background-color: var(--ai-kit-background-color);
103
269
  position: relative;
104
270
  overflow: visible;
105
271
  padding: var(--ai-kit-border-thickness);
106
- border-radius: var(--ai-kit-border-radius);
272
+ border-radius: var(--ai-kit-radius);
107
273
  width: 100%;
108
274
  box-sizing: border-box;
109
275
  }
@@ -118,7 +284,7 @@
118
284
  position: absolute;
119
285
  inset: 0;
120
286
  z-index: 0;
121
- border-radius: var(--ai-kit-border-radius);
287
+ border-radius: var(--ai-kit-radius);
122
288
  padding: var(--ai-kit-border-thickness);
123
289
  }
124
290
 
@@ -127,19 +293,9 @@
127
293
  position: absolute;
128
294
  inset: 0;
129
295
  z-index: 0;
130
- border-radius: var(--ai-kit-border-radius);
296
+ border-radius: var(--ai-kit-radius);
131
297
  padding: var(--ai-kit-border-thickness);
132
- background: var(
133
- --ai-kit-border-gradient,
134
- conic-gradient(
135
- from var(--ai-kit-border-angle, 0deg) at 50% 50%,
136
- #00c2ff,
137
- #7c3aed,
138
- #22c55e,
139
- #f59e0b,
140
- #00c2ff
141
- )
142
- );
298
+ background: var(--ai-kit-border-gradient);
143
299
  animation: ai-kit-border-run var(--ai-kit-border-speed) linear infinite;
144
300
  -webkit-mask:
145
301
  linear-gradient(#000 0 0) content-box,
@@ -173,11 +329,11 @@
173
329
  }
174
330
  }
175
331
 
176
- /* AiResult inner padding so content doesn't touch the animated border */
332
+ /* Actions layout */
177
333
  .ai-kit-actions {
178
334
  display: flex;
179
335
  width: 100%;
180
- gap: var(--ai-kit-actions-gap, 8px);
336
+ gap: var(--ai-kit-actions-gap, var(--ai-kit-space-2));
181
337
  justify-content: flex-end;
182
338
  flex-wrap: wrap;
183
339
  }
@@ -199,3 +355,504 @@
199
355
  min-width: 0;
200
356
  }
201
357
  }
358
+
359
+ /* ==========================================================================
360
+ AI Chatbot
361
+ ========================================================================== */
362
+
363
+ /* Wrapper does not position; it only sets variables for the chosen corner */
364
+ .ai-docs-ask {
365
+ display: contents;
366
+ }
367
+
368
+ .ai-docs-ask.ai-open-btn--bottom-right {
369
+ --ai-kit-pos-top: auto;
370
+ --ai-kit-pos-right: var(--ai-kit-open-button-offset-x);
371
+ --ai-kit-pos-bottom: var(--ai-kit-open-button-offset-y);
372
+ --ai-kit-pos-left: auto;
373
+ }
374
+
375
+ .ai-docs-ask.ai-open-btn--bottom-left {
376
+ --ai-kit-pos-top: auto;
377
+ --ai-kit-pos-right: auto;
378
+ --ai-kit-pos-bottom: var(--ai-kit-open-button-offset-y);
379
+ --ai-kit-pos-left: var(--ai-kit-open-button-offset-x);
380
+ }
381
+
382
+ .ai-docs-ask.ai-open-btn--top-right {
383
+ --ai-kit-pos-top: var(--ai-kit-open-button-offset-y);
384
+ --ai-kit-pos-right: var(--ai-kit-open-button-offset-x);
385
+ --ai-kit-pos-bottom: auto;
386
+ --ai-kit-pos-left: auto;
387
+ }
388
+
389
+ .ai-docs-ask.ai-open-btn--top-left {
390
+ --ai-kit-pos-top: var(--ai-kit-open-button-offset-y);
391
+ --ai-kit-pos-right: auto;
392
+ --ai-kit-pos-bottom: auto;
393
+ --ai-kit-pos-left: var(--ai-kit-open-button-offset-x);
394
+ }
395
+
396
+ .ai-docs-ask.ai-open-btn--bottom-right .ai-chat-container {
397
+ transform-origin: bottom right;
398
+ }
399
+ .ai-docs-ask.ai-open-btn--bottom-left .ai-chat-container {
400
+ transform-origin: bottom left;
401
+ }
402
+ .ai-docs-ask.ai-open-btn--top-right .ai-chat-container {
403
+ transform-origin: top right;
404
+ }
405
+ .ai-docs-ask.ai-open-btn--top-left .ai-chat-container {
406
+ transform-origin: top left;
407
+ }
408
+
409
+ /* Launcher Button (closed state)
410
+ Note: This is a Mantine Button; ensure radius works by also overriding --button-radius */
411
+ .ai-launcher-button {
412
+ position: fixed;
413
+ top: var(--ai-kit-pos-top, auto);
414
+ right: var(--ai-kit-pos-right, auto);
415
+ bottom: var(--ai-kit-pos-bottom, auto);
416
+ left: var(--ai-kit-pos-left, auto);
417
+
418
+ z-index: var(--ai-kit-position-z-index);
419
+
420
+ width: var(--ai-kit-chat-launcher-size);
421
+ height: var(--ai-kit-chat-launcher-size);
422
+
423
+ /* Radius: apply both border-radius and Mantine variable */
424
+ border-radius: var(--ai-kit-launcher-radius) !important;
425
+ --button-radius: var(--ai-kit-launcher-radius) !important;
426
+
427
+ border: none;
428
+ background: var(--ai-kit-launcher-bg);
429
+ color: var(--ai-kit-launcher-color);
430
+
431
+ cursor: pointer;
432
+
433
+ display: flex;
434
+ align-items: center;
435
+ justify-content: center;
436
+ flex-direction: column;
437
+ gap: 2px;
438
+
439
+ box-shadow: var(--ai-kit-launcher-shadow);
440
+ transition:
441
+ transform 0.2s ease,
442
+ box-shadow 0.2s ease,
443
+ background 0.2s ease;
444
+
445
+ padding: 0;
446
+ pointer-events: auto;
447
+ }
448
+
449
+ .ai-launcher-button:hover {
450
+ transform: scale(1.1);
451
+ box-shadow: var(--ai-kit-launcher-shadow-hover);
452
+ background: var(--ai-kit-launcher-bg-hover);
453
+ }
454
+
455
+ .ai-launcher-button:active {
456
+ transform: scale(0.95);
457
+ }
458
+
459
+ .ai-launcher-button svg {
460
+ width: 24px;
461
+ height: 24px;
462
+ stroke-linecap: round;
463
+ stroke-linejoin: round;
464
+ }
465
+
466
+ .ai-launcher-text {
467
+ font-size: 10px;
468
+ font-weight: 600;
469
+ text-transform: uppercase;
470
+ letter-spacing: 0.3px;
471
+ line-height: 1;
472
+ }
473
+
474
+ /* Chat Container (open state) – same corner as launcher */
475
+ .ai-chat-container {
476
+ position: fixed;
477
+ top: var(--ai-kit-pos-top, auto);
478
+ right: var(--ai-kit-pos-right, auto);
479
+ bottom: var(--ai-kit-pos-bottom, auto);
480
+ left: var(--ai-kit-pos-left, auto);
481
+
482
+ z-index: var(--ai-kit-position-z-index);
483
+
484
+ width: var(--ai-kit-chat-width);
485
+ min-height: var(--ai-kit-chat-height-min);
486
+ max-height: var(--ai-kit-chat-height-max);
487
+ max-width: calc(90vw - 40px);
488
+
489
+ border-radius: var(--ai-kit-chat-border-radius);
490
+ border: 1px solid var(--ai-kit-chat-border-color);
491
+ background: var(--ai-kit-chat-surface);
492
+ box-shadow: var(--ai-kit-launcher-shadow);
493
+
494
+ overflow: hidden;
495
+ display: flex;
496
+ pointer-events: auto;
497
+ gap: 0;
498
+
499
+ transition:
500
+ transform 0.28s ease,
501
+ opacity 0.2s ease;
502
+ will-change: transform;
503
+ }
504
+
505
+ .ai-chat-container.maximized {
506
+ top: 0 !important;
507
+ right: 0 !important;
508
+ bottom: 0 !important;
509
+ left: 0 !important;
510
+
511
+ width: 100vw !important;
512
+ height: 100vh !important;
513
+ max-width: 100vw !important;
514
+ max-height: 100vh !important;
515
+ border-radius: 0;
516
+
517
+ transform: scale(1);
518
+ opacity: 1;
519
+ }
520
+
521
+ .ai-chat-container.maximized.ai-max-enter {
522
+ transform: scale(0.2);
523
+ opacity: 0.9;
524
+ }
525
+
526
+ .ai-chat-container-internal {
527
+ display: flex;
528
+ width: 100%;
529
+ max-width: 1300px;
530
+ margin-right: auto;
531
+ margin-left: auto;
532
+ flex-direction: column;
533
+ }
534
+
535
+ /* Input Box */
536
+ .ai-box-open {
537
+ gap: var(--ai-kit-space-2);
538
+ padding: var(--ai-kit-space-4);
539
+ border-top: 1px solid var(--ai-kit-color-border-light);
540
+ background: var(--ai-kit-chat-surface-subtle);
541
+ margin-top: auto;
542
+ }
543
+
544
+ /* Responsive tweaks */
545
+ @media (max-width: 996px) {
546
+ :host {
547
+ --ai-kit-chat-launcher-size: 56px;
548
+ }
549
+
550
+ .ai-launcher-button svg {
551
+ width: 22px;
552
+ height: 22px;
553
+ }
554
+
555
+ .ai-chat-container {
556
+ width: calc(100vw - 40px);
557
+ height: calc(100vh - 40px);
558
+ max-width: none;
559
+ max-height: none;
560
+
561
+ /* Keep same position variables */
562
+ top: var(--ai-kit-pos-top, auto);
563
+ right: var(--ai-kit-pos-right, auto);
564
+ bottom: var(--ai-kit-pos-bottom, auto);
565
+ left: var(--ai-kit-pos-left, auto);
566
+ }
567
+ }
568
+
569
+ @media (max-width: 600px) {
570
+ .ai-chat-container {
571
+ top: 0 !important;
572
+ right: 0 !important;
573
+ bottom: 0 !important;
574
+ left: 0 !important;
575
+
576
+ width: 100% !important;
577
+ height: 100% !important;
578
+ border-radius: 0;
579
+ max-width: 100% !important;
580
+ max-height: 100% !important;
581
+ }
582
+
583
+ .ai-box-open {
584
+ padding: var(--ai-kit-space-3);
585
+ }
586
+ }
587
+
588
+ /* Header / status */
589
+ .ai-chat-header-bar {
590
+ display: flex;
591
+ align-items: center;
592
+ justify-content: space-between;
593
+ padding: 0 var(--ai-kit-space-3) var(--ai-kit-space-3) var(--ai-kit-space-4);
594
+ border-bottom: 1px solid var(--ai-kit-chat-border-color);
595
+ }
596
+
597
+ .ai-status-line {
598
+ padding: var(--ai-kit-space-2) var(--ai-kit-space-4);
599
+ font-size: var(--ai-kit-font-size-sm);
600
+ color: var(--ai-kit-chat-status-fg);
601
+ background: var(--ai-kit-chat-status-bg);
602
+ }
603
+
604
+ .ai-chat-title {
605
+ font-weight: 600;
606
+ font-size: var(--ai-kit-font-size-title);
607
+ }
608
+
609
+ .ai-close-button {
610
+ display: inline-flex;
611
+ align-items: center;
612
+ justify-content: center;
613
+ gap: 4px;
614
+ padding: 4px 8px;
615
+ border-radius: var(--ai-kit-radius-pill);
616
+ border: 1px solid var(--ai-kit-color-border);
617
+ background: var(--ai-kit-chat-close-bg);
618
+ color: inherit;
619
+ cursor: pointer;
620
+ font-size: 0.8rem;
621
+ transition:
622
+ background 0.2s ease,
623
+ transform 0.1s ease;
624
+ }
625
+
626
+ .ai-close-button:hover {
627
+ background: var(--ai-kit-chat-close-bg-hover);
628
+ transform: scale(1.05);
629
+ }
630
+
631
+ .ai-close-button:active {
632
+ transform: scale(0.95);
633
+ }
634
+
635
+ .ai-close-button svg {
636
+ width: 16px;
637
+ height: 16px;
638
+ stroke-linecap: round;
639
+ stroke-linejoin: round;
640
+ }
641
+
642
+ /* Chat area */
643
+ .ai-chat-scroll {
644
+ flex: 1;
645
+ overflow-y: auto;
646
+ padding: var(--ai-kit-space-4);
647
+ }
648
+
649
+ .ai-chat-placeholder {
650
+ padding: var(--ai-kit-space-4);
651
+ color: #868e96;
652
+ }
653
+
654
+ .ai-chat-row {
655
+ margin-bottom: var(--ai-kit-space-2);
656
+ display: flex;
657
+ }
658
+
659
+ .ai-chat-row.user {
660
+ justify-content: flex-end;
661
+ }
662
+
663
+ .ai-chat-row.assistant {
664
+ justify-content: flex-start;
665
+ }
666
+
667
+ .ai-chat-bubble {
668
+ max-width: 85%;
669
+ padding: 10px 12px;
670
+ border-radius: var(--ai-kit-radius-sm);
671
+ background: var(--ai-kit-assistant-bubble-bg);
672
+ font-size: var(--ai-kit-font-size);
673
+ color: var(--ai-kit-assistant-bubble-color);
674
+ word-wrap: break-word;
675
+ overflow-wrap: break-word;
676
+ word-break: break-word;
677
+ hyphens: auto;
678
+ line-height: var(--ai-kit-line-height);
679
+ }
680
+
681
+ .ai-chat-row.user .ai-chat-bubble {
682
+ background: var(--ai-kit-user-bubble-bg);
683
+ color: var(--ai-kit-user-bubble-color);
684
+ }
685
+
686
+ .ai-chat-header {
687
+ display: flex;
688
+ justify-content: space-between;
689
+ font-size: 0.75rem;
690
+ margin-bottom: 4px;
691
+ opacity: 0.8;
692
+ }
693
+
694
+ /* Input card */
695
+ .ai-box {
696
+ border-radius: var(--ai-kit-radius-sm);
697
+ border: 1px solid var(--ai-kit-color-border);
698
+ padding: var(--ai-kit-space-2);
699
+ background: var(--ai-kit-color-background);
700
+ display: flex;
701
+ flex-direction: column;
702
+ gap: var(--ai-kit-space-2);
703
+ }
704
+
705
+ .ai-message {
706
+ --input-padding-inline-start: var(--ai-kit-input-padding-x);
707
+ --input-padding-inline-end: var(--ai-kit-input-padding-x);
708
+
709
+ flex: 1;
710
+ resize: vertical;
711
+ outline: none;
712
+ border: 1px solid var(--ai-kit-color-border-muted);
713
+ border-radius: var(--ai-kit-radius-sm);
714
+ font-size: var(--ai-kit-font-size);
715
+ }
716
+
717
+ .ai-message textarea {
718
+ border: 0;
719
+ resize: vertical;
720
+ min-height: 64px;
721
+ }
722
+
723
+ /* Thumbs */
724
+ .ai-thumbs {
725
+ display: flex;
726
+ flex-wrap: wrap;
727
+ gap: var(--ai-kit-space-2);
728
+ }
729
+
730
+ .ai-thumbs .thumb {
731
+ position: relative;
732
+ width: 80px;
733
+ height: 80px;
734
+ border-radius: var(--ai-kit-radius-sm);
735
+ overflow: hidden;
736
+ border: 1px solid var(--ai-kit-color-border);
737
+ }
738
+
739
+ .ai-thumbs img {
740
+ width: 100%;
741
+ height: 100%;
742
+ object-fit: cover;
743
+ }
744
+
745
+ .ai-thumbs .thumb button {
746
+ position: absolute;
747
+ top: 2px;
748
+ right: 2px;
749
+ border-radius: var(--ai-kit-radius-pill);
750
+ border: none;
751
+ background: rgba(0, 0, 0, 0.6);
752
+ color: #fff;
753
+ width: 20px;
754
+ height: 20px;
755
+ cursor: pointer;
756
+ font-size: 14px;
757
+ line-height: 18px;
758
+ }
759
+
760
+ /* Citations / status / feedback */
761
+ .ai-citations {
762
+ margin-top: var(--ai-kit-space-2);
763
+ font-size: 0.8rem;
764
+ }
765
+
766
+ .ai-citations ul {
767
+ padding-left: 16px;
768
+ margin: 4px 0 0;
769
+ }
770
+
771
+ .ai-status-text {
772
+ font-size: 0.85rem;
773
+ color: var(--ai-kit-color-text-muted);
774
+ }
775
+
776
+ .ai-feedback {
777
+ margin-top: 6px;
778
+ display: flex;
779
+ gap: 4px;
780
+ }
781
+
782
+ .ai-feedback button {
783
+ border-radius: var(--ai-kit-radius-pill) !important;
784
+ border: 1px solid var(--ai-kit-chat-feedback-border);
785
+ background: var(--ai-kit-chat-feedback-bg);
786
+ width: 32px;
787
+ height: 32px;
788
+ cursor: pointer;
789
+ padding: 0;
790
+ }
791
+
792
+ .ai-feedback button.active {
793
+ background: var(--ai-kit-chat-feedback-active-bg);
794
+ }
795
+
796
+ .ai-error {
797
+ color: var(--ai-kit-color-danger);
798
+ font-size: 0.9rem;
799
+ }
800
+
801
+ /* Markdown formatting */
802
+ .ai-chat-bubble p,
803
+ .ai-chat-bubble ul,
804
+ .ai-chat-bubble ol,
805
+ .ai-chat-bubble pre,
806
+ .ai-chat-bubble code {
807
+ margin: 0;
808
+ word-wrap: break-word;
809
+ overflow-wrap: break-word;
810
+ }
811
+
812
+ .ai-chat-bubble code {
813
+ background: var(--ai-kit-chat-code-bg);
814
+ padding: 2px 4px;
815
+ border-radius: 3px;
816
+ font-size: 0.9em;
817
+ }
818
+
819
+ .ai-chat-bubble pre {
820
+ background: var(--ai-kit-chat-pre-bg);
821
+ padding: 8px;
822
+ border-radius: 4px;
823
+ overflow-x: auto;
824
+ max-width: 100%;
825
+ }
826
+
827
+ /* Typing indicator */
828
+ .typing-indicator {
829
+ display: inline-flex;
830
+ gap: 4px;
831
+ }
832
+
833
+ .typing-indicator span {
834
+ width: 6px;
835
+ height: 6px;
836
+ border-radius: 999px;
837
+ background: var(--ai-kit-chat-typing-dot-color);
838
+ animation: typing-bounce 0.9s infinite ease-in-out;
839
+ }
840
+
841
+ .typing-indicator span:nth-child(2) {
842
+ animation-delay: 0.15s;
843
+ }
844
+
845
+ .typing-indicator span:nth-child(3) {
846
+ animation-delay: 0.3s;
847
+ }
848
+
849
+ @keyframes typing-bounce {
850
+ 0%,
851
+ 80%,
852
+ 100% {
853
+ transform: translateY(0);
854
+ }
855
+ 40% {
856
+ transform: translateY(-4px);
857
+ }
858
+ }