bunnyquery 1.1.4 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +112 -148
  2. package/bunnyquery.css +761 -952
  3. package/bunnyquery.js +3679 -2478
  4. package/package.json +22 -11
package/bunnyquery.css CHANGED
@@ -1,368 +1,754 @@
1
- /**
2
- * BunnyQuery embed styles.
1
+ /* ============================================================================
2
+ * BunnyQuery embeddable AI chat widget
3
+ * Ported from the bunnyquery (www.skapi.com) agent.vue chatbox + login views.
3
4
  *
4
- * Plain-CSS port of the scoped LESS in
5
- * www.skapi.com/src/views/service/agent.vue, with the AI-platform / model
6
- * selector rules dropped (the embed has no platform picker). Tokens from
7
- * src/assets/less/bq-tokens.less are resolved inline below.
8
- *
9
- * Tokens:
10
- * --bq-mono IBM Plex Mono stack
11
- * --bq-ink #111
12
- * --bq-paper #fff
13
- * --bq-muted #666
14
- * --bq-line #c8c8c8
15
- * --bq-hover-bg #ebebeb
16
- * --bq-pink #c2185b
17
- * --bq-danger #c44
18
- * --bq-danger-bg #fff5f5
19
- */
20
-
21
- .bq-agent {
5
+ * Theming: tokens live on the widget root `.bq-agent[data-bq-theme]` and on
6
+ * any modal root appended to <body> (which carries its own data-bq-theme).
7
+ * All selectors are scoped under `.bq-agent` / `.bq-modal-root` so the widget
8
+ * never leaks styles into the host page.
9
+ * ==========================================================================*/
10
+
11
+ /* ---- Tokens: light (default) ---------------------------------------------*/
12
+ .bq-agent,
13
+ .bq-modal-root {
22
14
  --bq-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
23
15
  --bq-ink: #111;
24
16
  --bq-paper: #fff;
25
17
  --bq-muted: #666;
26
18
  --bq-line: #c8c8c8;
27
19
  --bq-hover-bg: #ebebeb;
28
- --bq-pink: #c2185b;
29
- --bq-light-pink: #f06292;
20
+ --bq-main: #c2185b;
21
+ --bq-light-main: #f06292;
30
22
  --bq-danger: #c44;
31
23
  --bq-danger-bg: #fff5f5;
32
-
33
- height: var(--agent-available-height, 100%);
34
- overflow: hidden;
24
+ --bq-main-bg: #fff8fa;
25
+ --bq-success: #2a7d29;
26
+ --bq-success-bg: #eef9f0;
27
+ --bq-success-border: #b8dcbc;
28
+ --bq-warning: #8a6d00;
29
+ --bq-warning-bg: #fff8e1;
30
+ --bq-warning-border: #e2a300;
31
+ --bq-info: #1a5bb5;
32
+ --bq-info-bg: #e8f0fb;
33
+ --bq-info-border: #3c94ff;
34
+ --bq-placeholder: #aaaaaa;
35
+ --bq-code-bg: #1e1e1e;
36
+ --bq-code-fg: #f5f5f5;
37
+ --bq-icon-invert: 0;
38
+ }
39
+
40
+ /* ---- Tokens: dark --------------------------------------------------------*/
41
+ .bq-agent[data-bq-theme="dark"],
42
+ .bq-modal-root[data-bq-theme="dark"] {
43
+ --bq-ink: #ebebeb;
44
+ --bq-paper: #000;
45
+ --bq-muted: #a0a0a0;
46
+ --bq-line: #3d3d3d;
47
+ --bq-hover-bg: #252525;
48
+ --bq-main: #f06292;
49
+ --bq-light-main: #f48fb1;
50
+ --bq-danger: #ef5350;
51
+ --bq-danger-bg: #2d1616;
52
+ --bq-main-bg: #2b1520;
53
+ --bq-success: #6abf66;
54
+ --bq-success-bg: #192e1e;
55
+ --bq-success-border: #4caf50;
56
+ --bq-warning: #ffca28;
57
+ --bq-warning-bg: #2d2516;
58
+ --bq-warning-border: #f9a825;
59
+ --bq-info: #64b5f6;
60
+ --bq-info-bg: #162230;
61
+ --bq-info-border: #42a5f5;
62
+ --bq-placeholder: #787878;
63
+ --bq-icon-invert: 1;
64
+ }
65
+
66
+ /* ---- Root container ------------------------------------------------------*/
67
+ .bq-agent {
68
+ box-sizing: border-box;
69
+ display: flex;
70
+ flex-direction: column;
71
+ width: 100%;
72
+ height: 100%;
73
+ min-height: 0;
74
+ margin: 0;
35
75
  font-family: var(--bq-mono);
76
+ font-size: 16px;
77
+ line-height: 1.5;
36
78
  color: var(--bq-ink);
37
- box-sizing: border-box;
79
+ background: var(--bq-paper);
80
+ -webkit-text-size-adjust: 100%;
38
81
  }
39
82
 
40
83
  .bq-agent *,
41
84
  .bq-agent *::before,
42
- .bq-agent *::after {
85
+ .bq-agent *::after,
86
+ .bq-modal-root *,
87
+ .bq-modal-root *::before,
88
+ .bq-modal-root *::after {
43
89
  box-sizing: border-box;
44
90
  }
45
91
 
46
- /* ---- shared helpers (loader / .btn) ------------------------------------ */
47
-
48
- .bq-agent .bq-loader {
49
- font-size: inherit;
50
- letter-spacing: 0.2em;
51
- }
52
-
53
- .bq-agent .bq-loader::after {
54
- content: '.';
55
- animation: bq-dots 1.2s steps(1) infinite;
56
- }
57
-
58
- @keyframes bq-dots {
59
- 0% { content: '.'; }
60
- 33% { content: '..'; }
61
- 66% { content: '...'; }
62
- }
63
-
64
- .bq-agent .btn {
65
- position: relative;
92
+ /* ---- Base button ---------------------------------------------------------*/
93
+ .bq-agent .btn,
94
+ .bq-modal-root .btn {
95
+ appearance: none;
96
+ -webkit-appearance: none;
66
97
  display: inline-flex;
67
- max-width: none;
68
- padding: 0.75rem 1.4rem;
69
- width: auto;
70
- height: auto;
71
- min-height: 0;
72
- justify-content: center;
73
98
  align-items: center;
74
- gap: 0.5rem;
75
- border-radius: 0;
76
- background: var(--bq-ink);
99
+ justify-content: center;
100
+ min-width: 5.5rem;
101
+ padding: 0.6rem 1rem;
77
102
  border: 1px solid var(--bq-ink);
103
+ background: var(--bq-ink);
78
104
  color: var(--bq-paper);
79
105
  font-family: var(--bq-mono);
80
- font-size: 0.88rem;
81
- font-weight: 600;
82
- letter-spacing: 0.04em;
83
- white-space: nowrap;
84
- user-select: none;
85
- outline: none;
106
+ font-size: 0.85rem;
107
+ line-height: 1;
86
108
  cursor: pointer;
87
- box-sizing: border-box;
88
- transition: background 0.15s, color 0.15s;
109
+ border-radius: 0;
89
110
  box-shadow: 2px 2px rgba(0, 0, 0, 0.12);
111
+ transition: opacity 0.15s, background 0.15s, color 0.15s;
90
112
  }
91
113
 
92
- .bq-agent .btn:disabled {
93
- opacity: 0.3;
94
- pointer-events: none;
95
- cursor: default;
114
+ .bq-agent .btn:hover:not(:disabled),
115
+ .bq-modal-root .btn:hover:not(:disabled) {
116
+ opacity: 0.85;
117
+ }
118
+
119
+ .bq-agent .btn:disabled,
120
+ .bq-modal-root .btn:disabled {
121
+ opacity: 0.4;
122
+ cursor: not-allowed;
96
123
  }
97
124
 
98
- .bq-agent .btn:hover {
125
+ .bq-agent .btn--outline,
126
+ .bq-modal-root .btn--outline {
99
127
  background: var(--bq-paper);
100
128
  color: var(--bq-ink);
101
- text-decoration: none;
102
129
  }
103
130
 
104
- /* ---- shell -------------------------------------------------------------- */
105
-
106
- .bq-meta {
107
- height: 100%;
108
- width: 100%;
109
- display: flex;
110
- flex-direction: column;
111
- min-height: 0;
112
- /* border: 1px solid var(--bq-line); */
113
- padding: 1rem;
114
- /* box-shadow: 2px 2px rgba(0, 0, 0, 0.12); */
131
+ /* dot-trail loader (".", "..", "...") */
132
+ .bq-loader {
133
+ font-size: inherit;
134
+ letter-spacing: 0.2em;
135
+ }
136
+ .bq-loader::after {
137
+ content: '.';
138
+ animation: bq-dots 1.2s steps(1) infinite;
139
+ }
140
+ @keyframes bq-dots {
141
+ 0% { content: '.'; }
142
+ 33% { content: '..'; }
143
+ 66% { content: '...'; }
115
144
  }
116
145
 
117
- .bq-section-title {
118
- font-size: 1.1rem;
119
- font-weight: 700;
120
- padding-bottom: 0.75rem;
146
+ /* spinner used inside primary buttons */
147
+ .bq-btn-spinner {
148
+ display: inline-block;
149
+ width: 1rem;
150
+ height: 1rem;
151
+ border: 2px solid currentColor;
152
+ border-right-color: transparent;
153
+ border-radius: 50%;
154
+ animation: bq-spin 0.7s linear infinite;
155
+ }
156
+ @keyframes bq-spin {
157
+ to { transform: rotate(360deg); }
121
158
  }
122
159
 
123
- .bq-title-row {
160
+ /* ============================================================================
161
+ * AUTH VIEWS (login / signup / forgot / verify / settings)
162
+ * ==========================================================================*/
163
+ /* padded parent that nests a standalone page (login / signup / verify / …) */
164
+ .bq-page {
165
+ flex: 1;
166
+ min-height: 0;
167
+ overflow-y: auto;
124
168
  display: flex;
125
- align-items: center;
126
- justify-content: space-between;
127
- gap: 0.5rem;
169
+ flex-direction: column;
170
+ padding: 2.5rem 1.5rem;
171
+ }
172
+ .bq-settings {
173
+ flex: 1;
174
+ width: 100%;
175
+ max-width: 440px;
176
+ margin: 0 auto;
177
+ font-family: var(--bq-mono);
178
+ color: var(--bq-ink);
128
179
  }
129
180
 
130
- .bq-title-row h2 {
131
- margin: 0;
132
- font-size: inherit;
133
- font-weight: inherit;
181
+ .bq-page-footer {
182
+ flex-shrink: 0;
183
+ text-align: center;
184
+ padding-top: 2rem;
134
185
  }
186
+ .bq-page-footer-link {
187
+ font-family: var(--bq-mono);
188
+ font-size: 0.75rem;
189
+ color: var(--bq-muted);
190
+ text-decoration: none;
191
+ }
192
+ .bq-page-footer-link:hover { text-decoration: underline; }
135
193
 
136
- .bq-title-left {
137
- display: flex;
138
- align-items: center;
139
- gap: 0.5rem;
140
- min-width: 0;
141
- overflow: hidden;
142
- text-overflow: ellipsis;
143
- white-space: nowrap;
194
+ .bq-settings-title {
195
+ font-size: 1.5rem;
196
+ font-weight: 700;
197
+ margin: 1.5rem 0 1.25rem;
198
+ letter-spacing: -0.01em;
144
199
  }
145
200
 
146
- .bq-ai-status {
147
- display: inline-flex;
148
- align-items: center;
149
- max-width: min(56vw, 26rem);
150
- padding: 0.12rem 0.45rem;
151
- border: 1px solid var(--bq-line);
152
- background: #f7f7f7;
201
+ .bq-settings-sub {
202
+ font-size: 0.82rem;
153
203
  color: var(--bq-muted);
154
- font-size: 0.72rem;
155
- font-weight: 600;
156
- letter-spacing: 0.01em;
157
- line-height: 1.25;
158
- overflow: hidden;
159
- text-overflow: ellipsis;
160
- white-space: nowrap;
204
+ line-height: 1.6;
161
205
  }
162
206
 
163
- .bq-title-right {
207
+ .bq-form {
164
208
  display: flex;
165
- align-items: center;
166
- gap: 0.5rem;
209
+ flex-direction: column;
210
+ gap: 1.1rem;
167
211
  }
168
212
 
169
- .bq-text-btn {
170
- font-family: var(--bq-mono);
171
- font-size: 0.78rem;
213
+ .bq-label {
214
+ display: flex;
215
+ flex-direction: column;
216
+ gap: 0.4rem;
217
+ font-size: 0.8rem;
172
218
  font-weight: 600;
173
- color: var(--bq-muted);
174
- background: transparent;
175
- border: none;
176
- padding: 0.15rem 0.25rem;
177
- margin: 0;
178
- line-height: 1;
179
- cursor: pointer;
180
- text-transform: uppercase;
181
219
  letter-spacing: 0.04em;
182
- transition: color 0.15s;
183
220
  }
184
221
 
185
- .bq-text-btn:hover {
222
+ .bq-input-text {
223
+ width: 100%;
224
+ padding: 0.7rem 0.8rem;
225
+ border: 1px solid var(--bq-line);
226
+ background: var(--bq-paper);
186
227
  color: var(--bq-ink);
228
+ font-family: var(--bq-mono);
229
+ font-size: 0.9rem;
230
+ border-radius: 0;
231
+ outline: none;
232
+ transition: border-color 0.15s;
187
233
  }
234
+ .bq-input-text::placeholder { color: var(--bq-placeholder); }
235
+ .bq-input-text:focus { border-color: var(--bq-ink); }
236
+ .bq-input-text:disabled { opacity: 0.5; cursor: default; }
188
237
 
189
- .bq-text-btn.disabled {
190
- opacity: 0.4;
191
- pointer-events: none;
192
- cursor: default;
238
+ .bq-actions {
239
+ display: flex;
240
+ justify-content: space-between;
241
+ align-items: center;
242
+ flex-wrap: wrap;
243
+ gap: 0.5rem;
244
+ font-size: 0.8rem;
193
245
  }
194
246
 
195
- .bq-text-btn--danger:hover {
196
- color: var(--bq-danger);
247
+ .bq-link {
248
+ color: var(--bq-main);
249
+ cursor: pointer;
250
+ font-size: 0.8rem;
251
+ background: none;
252
+ border: 0;
253
+ padding: 0;
254
+ font-family: var(--bq-mono);
255
+ text-decoration: underline;
197
256
  }
257
+ .bq-link:hover { text-decoration: none; }
258
+ .bq-link.disabled { opacity: 0.4; pointer-events: none; }
198
259
 
199
- .bq-text-btn-sep {
200
- color: var(--bq-line);
201
- user-select: none;
202
- font-size: 0.85rem;
260
+ .bq-checkbox {
261
+ display: inline-flex;
262
+ align-items: center;
263
+ gap: 0.4rem;
264
+ font-size: 0.8rem;
265
+ cursor: pointer;
203
266
  }
204
267
 
205
- .bq-link {
206
- color: var(--bq-pink);
207
- text-decoration: none;
268
+ .bq-error {
269
+ padding: 0.75rem 1rem;
270
+ border: 1px solid var(--bq-danger);
271
+ background: var(--bq-danger-bg);
272
+ color: var(--bq-danger);
273
+ font-size: 0.8rem;
274
+ line-height: 1.5;
208
275
  }
209
276
 
210
- .bq-link:hover {
211
- text-decoration: underline;
277
+ .bq-success-box {
278
+ padding: 0.75rem 1rem;
279
+ border: 1px solid var(--bq-success-border);
280
+ background: var(--bq-success-bg);
281
+ color: var(--bq-success);
282
+ font-size: 0.8rem;
283
+ line-height: 1.5;
212
284
  }
213
285
 
214
- /* ---- chat surface ------------------------------------------------------- */
215
-
216
- .bq-chat {
217
- border: none;
286
+ .bq-form-bottom {
218
287
  display: flex;
219
288
  flex-direction: column;
220
- flex: 1;
221
- min-height: 0;
222
- position: relative;
223
- }
224
-
225
- .bq-messages {
226
- position: relative;
227
- overflow-y: auto;
228
- overflow-x: hidden;
229
- flex: 1;
230
- min-height: 0;
231
- max-height: none;
232
- padding: 0;
233
- border-bottom: none;
234
- background: var(--bq-paper);
289
+ gap: 1.25rem;
290
+ margin-top: 0.25rem;
235
291
  }
292
+ .bq-form-bottom .btn { width: 100%; }
236
293
 
237
- .bq-history-loading {
238
- position: sticky;
239
- top: 0;
240
- z-index: 1;
294
+ /* divider "OR" */
295
+ .bq-divider {
241
296
  display: flex;
242
- justify-content: center;
243
- padding: 0.5rem 0 1rem;
244
- text-align: center;
245
- font-size: 0.8rem;
297
+ align-items: center;
298
+ gap: 1rem;
299
+ margin: 1.75rem 0;
300
+ }
301
+ .bq-divider-line { flex: 1; height: 1px; background: var(--bq-line); }
302
+ .bq-divider-text {
303
+ font-size: 0.7rem;
246
304
  color: var(--bq-muted);
247
- background: linear-gradient(to bottom, var(--bq-paper) 70%, rgba(255, 255, 255, 0));
305
+ letter-spacing: 0.14em;
306
+ text-transform: uppercase;
248
307
  }
249
308
 
250
- .bq-empty-greeting .bq-bubble {
251
- user-select: none;
309
+ /* Google button */
310
+ .bq-google {
311
+ display: flex;
312
+ align-items: center;
313
+ justify-content: center;
314
+ gap: 0.75rem;
315
+ width: 100%;
316
+ padding: 0.75rem 1rem;
317
+ border: 1px solid var(--bq-line);
318
+ background: var(--bq-paper);
319
+ font-family: var(--bq-mono);
320
+ font-size: 0.85rem;
321
+ color: var(--bq-ink);
322
+ cursor: pointer;
323
+ border-radius: 0;
324
+ box-shadow: 2px 2px rgba(0, 0, 0, 0.12);
325
+ transition: border-color 0.15s;
252
326
  }
327
+ .bq-google:hover:not(:disabled) { border-color: var(--bq-ink); }
328
+ .bq-google:disabled { opacity: 0.4; pointer-events: none; }
253
329
 
254
- .bq-message {
330
+ /* small top nav inside setting views (back link + theme toggle) */
331
+ .bq-settings-top {
255
332
  display: flex;
333
+ align-items: center;
334
+ justify-content: space-between;
256
335
  margin-bottom: 0.5rem;
257
336
  }
258
337
 
259
- .bq-message.is-user {
260
- justify-content: flex-end;
338
+ /* multi-step indicator text */
339
+ .bq-step-note {
340
+ font-size: 0.78rem;
341
+ color: var(--bq-muted);
342
+ margin-bottom: 1rem;
343
+ line-height: 1.6;
261
344
  }
262
345
 
263
- .bq-message.is-assistant {
264
- justify-content: flex-start;
346
+ /* ---- settings ------------------------------------------------------------ */
347
+ .bq-settings-section-title {
348
+ font-size: 0.72rem;
349
+ font-weight: 700;
350
+ letter-spacing: 0.1em;
351
+ text-transform: uppercase;
352
+ color: var(--bq-ink);
353
+ margin: 1.75rem 0 0.25rem;
265
354
  }
266
-
267
- .bq-bubble {
268
- padding: 0.55rem 0.7rem;
269
- border: 1px solid var(--bq-line);
270
- white-space: pre-wrap;
271
- line-height: 1.45;
272
- font-size: 0.83rem;
273
- background: var(--bq-paper);
355
+ .bq-link--danger { color: var(--bq-danger); }
356
+ .bq-account-tip {
357
+ padding: 0.85rem 1rem;
358
+ margin-bottom: 1.5rem;
359
+ border: 1px solid var(--bq-warning-border);
360
+ background: var(--bq-warning-bg);
361
+ color: var(--bq-warning);
362
+ font-size: 0.82rem;
363
+ line-height: 1.5;
274
364
  }
275
-
276
- .bq-bubble span {
277
- word-break: break-word;
365
+ .bq-account-section { display: flex; flex-direction: column; }
366
+ .bq-account-row {
367
+ display: flex;
368
+ align-items: center;
369
+ justify-content: space-between;
370
+ gap: 1rem;
371
+ padding: 0.85rem 0;
372
+ border-bottom: 1px solid var(--bq-line);
278
373
  }
279
-
280
- .is-user .bq-bubble {
281
- background: var(--bq-paper);
374
+ .bq-account-row:last-child { border-bottom: 0; }
375
+ .bq-account-row-main { min-width: 0; }
376
+ .bq-theme-radios {
377
+ display: flex;
378
+ gap: 1rem;
379
+ flex-wrap: wrap;
380
+ justify-content: flex-end;
282
381
  }
283
-
284
- .is-assistant:not(.is-error) .bq-bubble {
285
- background: #eef9f0;
286
- border-color: #b8dcbc;
382
+ .bq-account-label {
383
+ font-size: 0.7rem;
384
+ font-weight: 600;
385
+ letter-spacing: 0.06em;
386
+ color: var(--bq-muted);
387
+ text-transform: uppercase;
287
388
  }
288
-
289
- .is-error .bq-bubble {
389
+ .bq-account-value {
390
+ font-size: 0.9rem;
391
+ margin-top: 0.25rem;
392
+ overflow: hidden;
393
+ text-overflow: ellipsis;
394
+ white-space: nowrap;
395
+ }
396
+ .bq-account-value.is-muted { color: var(--bq-muted); }
397
+ .bq-verify-badge {
398
+ display: inline-block;
399
+ margin-left: 0.5rem;
400
+ padding: 0.05rem 0.4rem;
401
+ font-size: 0.66rem;
402
+ letter-spacing: 0.04em;
403
+ border: 1px solid var(--bq-line);
404
+ vertical-align: middle;
405
+ }
406
+ .bq-verify-badge.is-verified { color: var(--bq-success); border-color: var(--bq-success-border); background: var(--bq-success-bg); }
407
+ .bq-verify-badge.is-unverified { color: var(--bq-warning); border-color: var(--bq-warning-border); background: var(--bq-warning-bg); }
408
+ .bq-account-logout {
409
+ margin-top: 2rem;
410
+ text-align: right;
411
+ }
412
+ .bq-account-danger {
413
+ margin-top: 2rem;
414
+ padding: 1.25rem;
415
+ border: 1px solid var(--bq-danger);
290
416
  background: var(--bq-danger-bg);
291
- border-color: var(--bq-danger);
417
+ }
418
+ .bq-account-danger-title {
419
+ font-size: 0.72rem;
420
+ font-weight: 700;
421
+ letter-spacing: 0.1em;
422
+ text-transform: uppercase;
292
423
  color: var(--bq-danger);
424
+ margin-bottom: 1rem;
425
+ }
426
+ .bq-account-danger-desc { font-size: 0.8rem; color: var(--bq-muted); line-height: 1.5; margin: 0 0 1rem; }
427
+ .bq-danger-item {
428
+ padding: 0.85rem 0;
429
+ border-top: 1px solid var(--bq-danger);
430
+ }
431
+ .bq-danger-item:first-of-type { border-top: 0; padding-top: 0; }
432
+ .bq-danger-item:last-child { padding-bottom: 0; }
433
+ .bq-danger-item-title { font-size: 0.85rem; font-weight: 600; color: var(--bq-danger); margin-bottom: 0.35rem; }
434
+ .bq-danger-item-desc { font-size: 0.78rem; color: var(--bq-muted); line-height: 1.5; margin: 0 0 0.85rem; }
435
+ .bq-danger-item .btn { min-width: 0; }
436
+
437
+ /* ============================================================================
438
+ * CHAT VIEW
439
+ * ==========================================================================*/
440
+ .bq-meta {
441
+ display: flex;
442
+ flex-direction: column;
443
+ flex: 1;
444
+ min-height: 0;
293
445
  }
294
446
 
295
- .is-pending-older .bq-bubble {
296
- background: #fff8e1;
297
- border-color: #e6c25a;
298
- color: #8a6d1a;
447
+ .bq-section-title {
448
+ display: flex;
449
+ flex-direction: column;
450
+ gap: 0.5rem;
451
+ font-size: 1.1rem;
452
+ font-weight: 700;
453
+ padding: 1rem 1.25rem 0.75rem;
454
+ flex-shrink: 0;
299
455
  }
300
456
 
301
- /* ------------ markdown body rendered by marked ----------------- */
302
- .bq-md {
303
- white-space: normal;
304
- word-break: break-word;
457
+ .bq-title-row {
458
+ display: flex;
459
+ justify-content: space-between;
460
+ align-items: center;
461
+ gap: 0.5rem;
305
462
  }
306
- .bq-md > *:first-child { margin-top: 0; }
307
- .bq-md > *:last-child { margin-bottom: 0; }
308
- .bq-md p {
309
- margin: 0.4em 0;
310
- }
311
- .bq-md h1,
312
- .bq-md h2,
313
- .bq-md h3,
314
- .bq-md h4,
315
- .bq-md h5,
316
- .bq-md h6 {
317
- margin: 0.8em 0 0.35em;
318
- line-height: 1.25;
463
+ .bq-title-left,
464
+ .bq-title-right {
465
+ display: flex;
466
+ align-items: center;
467
+ gap: 0.5rem;
468
+ }
469
+
470
+ /* read-only agent (platform + model) badge */
471
+ .bq-agent-badge {
472
+ display: inline-flex;
473
+ align-items: center;
474
+ gap: 0.45rem;
475
+ padding: 0.3rem 0.6rem;
476
+ border: 1px solid var(--bq-line);
477
+ background: var(--bq-paper);
478
+ font-size: 0.75rem;
479
+ font-family: var(--bq-mono);
480
+ color: var(--bq-ink);
481
+ max-width: 100%;
482
+ overflow: hidden;
483
+ }
484
+ .bq-agent-badge-logo {
485
+ width: 1.1rem;
486
+ height: 1.1rem;
487
+ object-fit: contain;
488
+ flex: 0 0 auto;
489
+ }
490
+ .bq-agent-badge-model {
491
+ color: var(--bq-muted);
492
+ overflow: hidden;
493
+ text-overflow: ellipsis;
494
+ white-space: nowrap;
495
+ }
496
+
497
+ /* header icon buttons (theme, clear, account) */
498
+ .bq-icon-btn {
499
+ display: inline-flex;
500
+ align-items: center;
501
+ justify-content: center;
502
+ width: 2rem;
503
+ height: 2rem;
504
+ padding: 0;
505
+ border: none;
506
+ background: transparent;
507
+ color: var(--bq-muted);
508
+ cursor: pointer;
509
+ transition: color 0.15s;
510
+ border-radius: 0;
511
+ }
512
+ .bq-icon-btn:hover { color: var(--bq-main); }
513
+ .bq-icon-btn.is-active { color: var(--bq-main); }
514
+ .bq-icon-btn--danger:hover { color: var(--bq-danger); }
515
+ .bq-icon-btn:disabled { opacity: 0.3; pointer-events: none; }
516
+ .bq-icon-btn svg { width: 1.25rem; height: 1.25rem; display: block; }
517
+
518
+ /* settings shown in place inside the chat's messages area */
519
+ .bq-chat-settings {
520
+ width: 100%;
521
+ max-width: 440px;
522
+ margin: 0 auto;
523
+ padding: 1.25rem 0 2rem;
524
+ }
525
+ .bq-chat-settings-loading { text-align: center; padding: 2.5rem 0; color: var(--bq-muted); }
526
+
527
+ /* chat container + scroll area */
528
+ .bq-chat {
529
+ position: relative;
530
+ display: flex;
531
+ flex-direction: column;
532
+ flex: 1;
533
+ min-height: 0;
534
+ }
535
+ .bq-messages {
536
+ position: relative;
537
+ overflow-y: auto;
538
+ overflow-x: hidden;
539
+ flex: 1;
540
+ min-height: 0;
541
+ padding: 0.25rem 1.25rem;
542
+ background: var(--bq-paper);
543
+ }
544
+
545
+ .bq-history-loading {
546
+ position: sticky;
547
+ top: 0;
548
+ z-index: 1;
549
+ display: flex;
550
+ justify-content: center;
551
+ gap: 0.1em;
552
+ padding: 0.5rem 0 1rem;
553
+ font-size: 0.8rem;
554
+ color: var(--bq-muted);
555
+ background: var(--bq-paper);
556
+ }
557
+ /* initial first-page load: center it in the (empty) messages area */
558
+ .bq-history-loading.is-initial {
559
+ position: absolute;
560
+ inset: 0;
561
+ align-items: center;
562
+ padding: 0;
563
+ }
564
+
565
+ /* "admin hasn't set up the agent" / disabled overlay */
566
+ .bq-disabled-overlay {
567
+ position: absolute;
568
+ inset: 0;
569
+ z-index: 4;
570
+ display: flex;
571
+ align-items: center;
572
+ justify-content: center;
573
+ background: var(--bq-paper);
574
+ padding: 1.5rem;
575
+ }
576
+ .bq-disabled-inner {
577
+ display: flex;
578
+ flex-direction: column;
579
+ align-items: center;
580
+ gap: 0.85rem;
581
+ text-align: center;
582
+ max-width: 28rem;
583
+ color: var(--bq-muted);
584
+ font-size: 0.88rem;
585
+ line-height: 1.5;
586
+ }
587
+
588
+ /* drag-drop overlay */
589
+ .bq-drop-overlay {
590
+ position: absolute;
591
+ inset: 0;
592
+ z-index: 5;
593
+ display: flex;
594
+ align-items: center;
595
+ justify-content: center;
596
+ background: var(--bq-paper);
597
+ border: 2px dashed var(--bq-main);
598
+ pointer-events: none;
599
+ opacity: 0.92;
600
+ }
601
+ .bq-drop-overlay-inner {
602
+ display: flex;
603
+ flex-direction: column;
604
+ align-items: center;
605
+ gap: 0.5rem;
606
+ color: var(--bq-main);
607
+ font-size: 0.9rem;
319
608
  font-weight: 600;
320
609
  }
610
+
611
+ /* messages + bubbles */
612
+ .bq-message {
613
+ display: flex;
614
+ margin-bottom: 0.5rem;
615
+ }
616
+ .bq-message.is-user { justify-content: flex-end; }
617
+ .bq-message.is-assistant { justify-content: flex-start; }
618
+
619
+ .bq-bubble {
620
+ max-width: 85%;
621
+ padding: 0.55rem 0.7rem;
622
+ border: 1px solid var(--bq-line);
623
+ white-space: pre-wrap;
624
+ line-height: 1.45;
625
+ font-size: 0.83rem;
626
+ background: var(--bq-paper);
627
+ }
628
+ .bq-message.is-user .bq-bubble { background: var(--bq-paper); }
629
+ .bq-message.is-assistant:not(.is-error) .bq-bubble {
630
+ background: var(--bq-success-bg);
631
+ border-color: var(--bq-success-border);
632
+ }
633
+ .bq-message.is-error .bq-bubble {
634
+ background: var(--bq-danger-bg);
635
+ border-color: var(--bq-danger);
636
+ color: var(--bq-danger);
637
+ }
638
+ .bq-message.is-cancelled .bq-bubble {
639
+ background: var(--bq-danger-bg);
640
+ border-color: var(--bq-danger);
641
+ color: var(--bq-danger);
642
+ opacity: 0.65;
643
+ }
644
+ .bq-message.is-pending-older .bq-bubble {
645
+ background: var(--bq-warning-bg);
646
+ border-color: var(--bq-warning-border);
647
+ color: var(--bq-warning);
648
+ transition: opacity 0.25s ease;
649
+ }
650
+ .bq-message.is-sending-to-server .bq-bubble { opacity: 0.4; }
651
+
652
+ .bq-empty-greeting .bq-bubble {
653
+ color: var(--bq-muted);
654
+ }
655
+
656
+ .bq-pending-note {
657
+ display: block;
658
+ margin-top: 0.35rem;
659
+ font-size: 0.7rem;
660
+ color: var(--bq-warning);
661
+ font-style: italic;
662
+ }
663
+ .bq-cancel-error {
664
+ display: block;
665
+ margin-top: 0.3rem;
666
+ font-size: 0.68rem;
667
+ color: var(--bq-danger);
668
+ font-style: italic;
669
+ clear: both;
670
+ }
671
+ .bq-cancel-queue-btn {
672
+ float: right;
673
+ margin: -0.25rem -0.25rem 0.2rem 0.4rem;
674
+ width: 1.1rem;
675
+ height: 1.1rem;
676
+ display: inline-flex;
677
+ align-items: center;
678
+ justify-content: center;
679
+ padding: 0;
680
+ border: 1px solid var(--bq-warning-border);
681
+ background: transparent;
682
+ color: var(--bq-warning);
683
+ font-size: 0.85rem;
684
+ line-height: 1;
685
+ cursor: pointer;
686
+ flex-shrink: 0;
687
+ }
688
+ .bq-cancel-queue-btn:hover:not(.is-disabled) { background: var(--bq-warning-bg); }
689
+ .bq-cancel-queue-btn.is-disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
690
+
691
+ /* in-bubble file/link anchors */
692
+ .bq-file-download,
693
+ .bq-link-button {
694
+ color: var(--bq-main);
695
+ text-decoration: none;
696
+ cursor: pointer;
697
+ background: transparent;
698
+ border: 0;
699
+ padding: 0;
700
+ font: inherit;
701
+ }
702
+ .bq-file-download:hover,
703
+ .bq-link-button:hover { text-decoration: underline; }
704
+ .bq-link-button {
705
+ display: inline-block;
706
+ max-width: 100%;
707
+ overflow: hidden;
708
+ text-overflow: ellipsis;
709
+ white-space: nowrap;
710
+ vertical-align: bottom;
711
+ }
712
+
713
+ /* ---- markdown body -------------------------------------------------------*/
714
+ .bq-md { white-space: normal; word-break: break-word; }
715
+ .bq-md > :first-child { margin-top: 0; }
716
+ .bq-md > :last-child { margin-bottom: 0; }
717
+ .bq-md p { margin: 0.4em 0; }
321
718
  .bq-md h1 { font-size: 1.3em; }
322
719
  .bq-md h2 { font-size: 1.18em; }
323
720
  .bq-md h3 { font-size: 1.08em; }
324
- .bq-md h4,
325
- .bq-md h5,
326
- .bq-md h6 { font-size: 1em; }
327
- .bq-md ul,
328
- .bq-md ol {
329
- margin: 0.4em 0;
330
- padding-left: 1.4em;
721
+ .bq-md h4, .bq-md h5, .bq-md h6 { font-size: 1em; }
722
+ .bq-md h1, .bq-md h2, .bq-md h3, .bq-md h4, .bq-md h5, .bq-md h6 {
723
+ margin: 0.8em 0 0.35em;
724
+ line-height: 1.25;
725
+ font-weight: 600;
331
726
  }
727
+ .bq-md ul, .bq-md ol { margin: 0.4em 0; padding-left: 1.4em; }
332
728
  .bq-md li { margin: 0.15em 0; }
333
- .bq-md li > p { margin: 0.2em 0; }
334
729
  .bq-md blockquote {
335
730
  margin: 0.5em 0;
336
731
  padding: 0.2em 0.8em;
337
732
  border-left: 3px solid var(--bq-line);
338
- color: #555;
339
- background: rgba(0, 0, 0, 0.03);
340
- }
341
- .bq-md hr {
342
- border: 0;
343
- border-top: 1px solid var(--bq-line);
344
- margin: 0.8em 0;
345
- }
346
- .bq-md a {
347
- color: var(--bq-pink);
348
- text-decoration: underline;
733
+ color: var(--bq-muted);
734
+ background: rgba(127, 127, 127, 0.08);
349
735
  }
736
+ .bq-md hr { border: none; border-top: 1px solid var(--bq-line); margin: 0.8em 0; }
737
+ .bq-md a { color: var(--bq-main); text-decoration: underline; }
350
738
  .bq-md a:hover { text-decoration: none; }
351
739
  .bq-md code {
352
740
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
353
741
  font-size: 0.9em;
354
742
  padding: 0.1em 0.35em;
355
- background: rgba(0, 0, 0, 0.06);
356
- border-radius: 0;
743
+ background: rgba(127, 127, 127, 0.16);
357
744
  white-space: pre-wrap;
358
745
  word-break: break-word;
359
746
  }
360
747
  .bq-md pre {
361
748
  margin: 0.5em 0;
362
749
  padding: 0.6em 0.8em;
363
- background: #1e1e1e;
364
- color: #f5f5f5;
365
- border-radius: 0;
750
+ background: var(--bq-code-bg);
751
+ color: var(--bq-code-fg);
366
752
  overflow-x: auto;
367
753
  white-space: pre;
368
754
  }
@@ -371,7 +757,6 @@
371
757
  color: inherit;
372
758
  padding: 0;
373
759
  font-size: 0.85em;
374
- white-space: pre;
375
760
  word-break: normal;
376
761
  }
377
762
  .bq-md table {
@@ -381,93 +766,29 @@
381
766
  display: block;
382
767
  overflow-x: auto;
383
768
  }
384
- .bq-md th,
385
- .bq-md td {
386
- border: 1px solid var(--bq-line);
387
- padding: 0.3em 0.55em;
388
- text-align: left;
389
- }
390
- .bq-md th {
391
- background: rgba(0, 0, 0, 0.04);
392
- font-weight: 600;
393
- }
394
- .bq-md img {
395
- max-width: 100%;
396
- height: auto;
397
- border-radius: 4px;
398
- }
769
+ .bq-md th, .bq-md td { border: 1px solid var(--bq-line); padding: 0.3em 0.55em; text-align: left; }
770
+ .bq-md th { background: rgba(127, 127, 127, 0.1); font-weight: 600; }
771
+ .bq-md img { max-width: 100%; height: auto; border-radius: 4px; }
399
772
  .bq-md strong { font-weight: 600; }
400
773
  .bq-md em { font-style: italic; }
401
774
  .bq-md del { text-decoration: line-through; }
402
- /* keep our inline file/link anchors flush within markdown paragraphs */
403
- .bq-md .bq-file-download,
404
- .bq-md .bq-link-button {
405
- margin: 0;
406
- }
407
- a.bq-link-button.is-refreshing {
408
- opacity: 0.7;
409
- cursor: wait;
410
- }
411
-
412
- .bq-pending-note {
413
- display: block;
414
- margin-top: 0.35rem;
415
- font-size: 0.7rem;
416
- color: #a07d1a;
417
- font-style: italic;
418
- }
419
-
420
- /* Plain pink underlined inline text links — matches agent.vue. Underline
421
- stays on hover, no border/background. */
422
- a.bq-file-download,
423
- a.bq-link-button {
424
- color: var(--bq-pink);
425
- text-decoration: none;
426
- cursor: pointer;
427
- background: transparent;
428
- border: 0;
429
- padding: 0;
430
- font: inherit;
431
- vertical-align: baseline;
432
- }
433
-
434
- a.bq-link-button {
435
- max-width: 100%;
436
- overflow: hidden;
437
- text-overflow: ellipsis;
438
- white-space: nowrap;
439
- }
440
-
441
- a.bq-file-download:hover,
442
- a.bq-link-button:hover {
443
- color: var(--bq-pink);
444
- text-decoration: underline;
445
- background: transparent;
446
- }
447
-
448
- /* ---- input row ---------------------------------------------------------- */
449
775
 
776
+ /* ---- composer / input row ------------------------------------------------*/
450
777
  .bq-input-row {
778
+ --chat-control-height: 2.6rem;
451
779
  display: flex;
452
780
  flex-shrink: 0;
453
- --chat-control-height: 2.6rem;
454
781
  gap: 0.65rem;
455
- padding: 0.65rem 0 0;
782
+ padding: 0.65rem 1.25rem 1.25rem;
456
783
  background: var(--bq-paper);
457
784
  flex-wrap: wrap;
458
785
  }
459
-
460
- .bq-attach-input {
461
- display: none;
462
- }
463
-
464
786
  .bq-input-wrap {
465
787
  position: relative;
466
788
  flex: 1;
467
789
  display: flex;
468
790
  min-width: 0;
469
791
  }
470
-
471
792
  .bq-attach-btn {
472
793
  position: absolute;
473
794
  top: 0;
@@ -477,27 +798,42 @@ a.bq-link-button:hover {
477
798
  justify-content: center;
478
799
  width: var(--chat-control-height);
479
800
  height: var(--chat-control-height);
480
- min-height: 0;
481
801
  padding: 0;
482
802
  border: none;
483
803
  background: transparent;
484
804
  color: var(--bq-muted);
485
805
  cursor: pointer;
486
806
  z-index: 1;
487
- box-shadow: none;
488
- border-radius: 0;
489
807
  }
490
-
491
- .bq-attach-btn:hover:not(:disabled) {
492
- background: transparent;
493
- color: var(--bq-pink);
808
+ .bq-attach-btn:hover:not(:disabled) { color: var(--bq-main); }
809
+ .bq-attach-btn:disabled { opacity: 0.5; cursor: not-allowed; }
810
+ .bq-attach-input { display: none; }
811
+ .bq-input {
812
+ flex: 1;
813
+ min-height: var(--chat-control-height);
814
+ max-height: 12rem;
815
+ box-sizing: border-box;
816
+ overflow-y: hidden; /* autoGrowInput switches to auto only at the max-height cap */
817
+ resize: none;
818
+ border: 1px solid var(--bq-line);
819
+ background: var(--bq-paper);
820
+ color: var(--bq-ink);
821
+ padding: 0.7rem 0.7rem 0.7rem var(--chat-control-height);
822
+ font-family: var(--bq-mono);
823
+ font-size: 0.83rem;
824
+ line-height: 1.4;
825
+ border-radius: 0;
494
826
  }
495
-
496
- .bq-attach-btn:disabled {
497
- opacity: 0.5;
498
- cursor: not-allowed;
827
+ .bq-input::placeholder { color: var(--bq-placeholder); }
828
+ .bq-input:focus { outline: none; border-color: var(--bq-ink); }
829
+ .bq-input:disabled { opacity: 0.5; cursor: default; }
830
+ .bq-input-row .btn {
831
+ align-self: flex-end;
832
+ min-width: 5.5rem;
833
+ height: var(--chat-control-height);
499
834
  }
500
835
 
836
+ /* ---- attachment chips ----------------------------------------------------*/
501
837
  .bq-attachments {
502
838
  flex-basis: 100%;
503
839
  display: flex;
@@ -505,7 +841,6 @@ a.bq-link-button:hover {
505
841
  gap: 0.4rem;
506
842
  padding: 0 0 0.5rem;
507
843
  }
508
-
509
844
  .bq-attachment {
510
845
  display: inline-flex;
511
846
  align-items: center;
@@ -520,75 +855,53 @@ a.bq-link-button:hover {
520
855
  overflow: hidden;
521
856
  isolation: isolate;
522
857
  }
523
-
524
858
  .bq-attachment.is-uploading::before {
525
859
  content: "";
526
860
  position: absolute;
527
861
  inset: 0 auto 0 0;
528
862
  width: var(--att-progress, 0%);
529
- background: rgba(194, 24, 91, 0.18);
863
+ background: rgba(240, 98, 146, 0.18);
530
864
  transition: width 0.15s linear;
531
865
  z-index: 0;
532
866
  pointer-events: none;
533
867
  }
534
-
535
- .bq-attachment.is-uploading > * {
536
- position: relative;
537
- z-index: 1;
538
- }
539
-
540
- .bq-attachment.is-error {
541
- border-color: #c0392b;
542
- }
543
-
544
- .bq-attachment.is-error .bq-attachment-meta {
545
- color: #c0392b;
546
- }
547
-
548
- .bq-attachment.is-clickable {
549
- cursor: pointer;
550
- transition: background 0.12s ease, border-color 0.12s ease;
551
- }
552
-
553
- .bq-attachment.is-clickable:hover {
554
- background: var(--bq-hover-bg);
555
- border-color: var(--bq-ink);
556
- }
557
-
558
- .bq-attachment-icon {
559
- flex: 0 0 16px;
560
- color: var(--bq-muted);
561
- }
562
-
563
- .bq-attachment-arrow {
564
- flex: 0 0 auto;
565
- font-size: 0.95rem;
566
- line-height: 1;
567
- color: var(--bq-muted);
568
- }
569
-
570
- .is-done .bq-attachment-arrow {
571
- color: var(--bq-ink);
572
- }
573
-
868
+ .bq-attachment.is-uploading > * { position: relative; z-index: 1; }
869
+ .bq-attachment.is-error { border-color: var(--bq-danger); background: var(--bq-danger-bg); }
870
+ .bq-attachment.is-error .bq-attachment-meta,
871
+ .bq-attachment.is-error .bq-attachment-name { color: var(--bq-danger); }
872
+ .bq-attachment.is-index-error { border-color: var(--bq-warning-border); background: var(--bq-warning-bg); }
873
+ .bq-attachment.is-index-error .bq-attachment-meta,
874
+ .bq-attachment.is-index-error .bq-attachment-name { color: var(--bq-warning); }
875
+ .bq-attachment.is-done { border-color: var(--bq-success-border); background: var(--bq-success-bg); }
876
+ .bq-attachment.is-done .bq-attachment-meta { color: var(--bq-success); }
877
+ .bq-attachment.is-clickable { cursor: pointer; transition: background 0.12s, border-color 0.12s; }
878
+ .bq-attachment.is-clickable:hover { background: var(--bq-hover-bg); border-color: var(--bq-ink); }
879
+ .bq-attachment-icon { flex: 0 0 16px; color: var(--bq-muted); display: inline-flex; }
880
+ .bq-attachment-icon svg { width: 16px; height: 16px; }
881
+ .bq-attachment-arrow { flex: 0 0 auto; font-size: 0.95rem; line-height: 1; color: var(--bq-muted); }
882
+ .bq-attachment.is-done .bq-attachment-arrow { color: var(--bq-ink); }
574
883
  .bq-attachment-name {
575
884
  overflow: hidden;
576
885
  text-overflow: ellipsis;
577
886
  white-space: nowrap;
578
887
  max-width: 12rem;
579
888
  }
580
-
581
- .bq-attachment-meta {
582
- color: var(--bq-muted);
583
- flex-shrink: 0;
584
- }
585
-
586
- .bq-attachment-more {
889
+ .bq-attachment-meta { color: var(--bq-muted); flex-shrink: 0; }
890
+ .bq-attachment-more { color: var(--bq-muted); font-style: italic; }
891
+ .bq-attachment-remove-all {
892
+ display: inline-flex;
893
+ align-items: center;
894
+ gap: 0.2rem;
895
+ padding: 0.3rem 0.5rem;
896
+ border: 1px dashed var(--bq-line);
897
+ background: transparent;
587
898
  color: var(--bq-muted);
588
- font-style: italic;
589
- cursor: default;
899
+ font-family: var(--bq-mono);
900
+ font-size: 0.72rem;
901
+ cursor: pointer;
902
+ align-self: center;
590
903
  }
591
-
904
+ .bq-attachment-remove-all:hover { color: var(--bq-danger); border-color: var(--bq-danger); }
592
905
  .bq-attachment-remove {
593
906
  display: inline-flex;
594
907
  align-items: center;
@@ -601,608 +914,104 @@ a.bq-link-button:hover {
601
914
  background: transparent;
602
915
  color: var(--bq-muted);
603
916
  font-size: 1rem;
604
- line-height: 1;
605
917
  cursor: pointer;
606
918
  }
919
+ .bq-attachment-remove:hover { color: var(--bq-ink); }
607
920
 
608
- .bq-attachment-remove:hover {
609
- color: var(--bq-ink);
610
- }
611
-
612
- .bq-input {
613
- flex: 1;
614
- min-height: var(--chat-control-height);
615
- box-sizing: border-box;
616
- overflow-y: hidden;
617
- resize: vertical;
618
- border: 1px solid var(--bq-line);
619
- padding: 0.7rem 0.7rem 0.7rem var(--chat-control-height);
620
- font-family: var(--bq-mono);
621
- font-size: calc(1em - 2px);
622
- color: var(--bq-ink);
623
- background: var(--bq-paper);
624
- outline: none;
625
- }
626
-
627
- /* When the attach button is hidden (read-only), reclaim the left padding. */
628
- .bq-input-wrap.no-attach .bq-input {
629
- padding-left: 0.7rem;
630
- }
631
-
632
- .bq-input:focus {
633
- border-color: var(--bq-ink);
634
- }
635
-
636
- .bq-input:disabled {
637
- opacity: 0.6;
638
- cursor: not-allowed;
639
- }
640
-
641
- .bq-input-row .btn {
642
- align-self: flex-end;
643
- min-width: 5.5rem;
644
- height: var(--chat-control-height);
645
- padding: 0 1.1rem;
646
- }
647
-
648
- /* ---- gate / overlay screens (login, loading, fatal) -------------------- */
649
-
650
- .bq-gate-loading {
651
- flex: 1;
652
- min-height: 100%;
653
- display: flex;
654
- flex-direction: column;
655
- align-items: center;
656
- justify-content: center;
657
- font-size: 0.83rem;
658
- color: var(--bq-muted);
659
- }
660
-
661
- .bq-apikey-overlay {
662
- position: relative;
663
- flex: 1;
664
- z-index: 4;
665
- display: flex;
666
- align-items: center;
667
- justify-content: center;
668
- background: var(--bq-paper);
669
- padding: 1rem;
670
- height: 100%;
671
- }
672
-
673
- .bq-apikey-overlay-inner {
921
+ .bq-attachment-warning {
922
+ flex-basis: 100%;
674
923
  display: flex;
675
- flex-direction: column;
676
- align-items: center;
677
- gap: 0.85rem;
678
- text-align: center;
679
- max-width: 32rem;
680
- width: 100%;
681
- }
682
-
683
- .bq-apikey-overlay-inner .btn {
684
- align-self: center;
685
- min-width: 11rem;
686
- }
687
-
688
- .bq-apikey-help {
689
- margin: 0;
690
- color: var(--bq-muted);
691
- font-size: 0.83rem;
692
- line-height: 1.4;
693
- }
694
-
695
- .bq-apikey-error {
696
- margin: 0;
924
+ align-items: flex-start;
925
+ gap: 0.4rem;
926
+ padding: 0.4rem 0.5rem;
927
+ margin-bottom: 0.4rem;
928
+ border: 1px solid var(--bq-danger);
929
+ background: var(--bq-danger-bg);
697
930
  color: var(--bq-danger);
698
- font-size: 0.9rem;
699
- font-weight: 600;
700
- }
701
-
702
- /* ---- login form (embed-only) ------------------------------------------- */
703
-
704
- .bq-login-form {
705
- display: flex;
706
- flex-direction: column;
707
- gap: 0.65rem;
708
- width: 100%;
709
- max-width: 22rem;
710
- align-items: stretch;
711
- }
712
-
713
- .bq-login-title {
714
- margin: 0 0 0.25rem;
715
- font-size: 1rem;
716
- font-weight: 700;
717
- color: var(--bq-ink);
718
- text-align: center;
719
- }
720
-
721
- .bq-login-form .bq-input {
722
- padding: 0.6rem 0.7rem;
723
- min-height: 2.4rem;
724
- resize: none;
725
- }
726
-
727
- .bq-login-form .btn {
728
- width: 100%;
729
- align-self: stretch;
730
- }
731
-
732
- .bq-login-actions {
733
- display: flex;
734
- justify-content: center;
735
- margin-top: 0.25rem;
736
- }
737
-
738
- .bq-login-link {
739
- all: unset;
740
- cursor: pointer;
741
- font-family: var(--bq-mono);
742
- font-size: 0.78rem;
743
- color: var(--bq-muted);
744
- text-decoration: underline;
745
- text-underline-offset: 2px;
746
- padding: 0.25rem 0.5rem;
747
- }
748
-
749
- .bq-login-link:hover {
750
- color: var(--bq-ink);
751
- }
752
-
753
- .bq-login-note {
754
- margin: 0;
755
- color: var(--bq-muted);
756
- font-size: 0.8rem;
757
- line-height: 1.4;
758
- }
759
-
760
- .bq-login-step {
761
- display: flex;
762
- flex-direction: column;
763
- gap: 0.65rem;
764
- margin-top: 0.5rem;
765
- padding-top: 0.75rem;
766
- border-top: 1px dashed var(--bq-line);
767
- }
768
-
769
- /*
770
- * Loading state for the login submit button.
771
- *
772
- * The button text is wrapped in `.bq-login-submit-label`; while the parent
773
- * carries `.is-loading` we hide that label and reveal a CSS pseudo-element
774
- * whose content is sourced from the `--bq-login-loading-label` custom
775
- * property. Override either (or both) to fully customize the busy state:
776
- *
777
- * .bq-agent .bq-login-submit { --bq-login-loading-label: "Signing in..."; }
778
- * .bq-agent .bq-login-submit.is-loading::after { content: "..."; }
779
- */
780
- .bq-agent .bq-login-submit {
781
- --bq-login-loading-label: "...";
782
- position: relative;
783
- }
784
-
785
- .bq-agent .bq-login-submit.is-loading .bq-login-submit-label {
786
- visibility: hidden;
787
- }
788
-
789
- .bq-agent .bq-login-submit.is-loading::after {
790
- content: var(--bq-login-loading-label);
791
- position: absolute;
792
- inset: 0;
793
- display: flex;
794
- align-items: center;
795
- justify-content: center;
796
- pointer-events: none;
931
+ font-size: 0.75rem;
932
+ line-height: 1.3;
797
933
  }
798
934
 
799
- /* ---- modal: clear chat history ----------------------------------------- */
800
-
801
- .bq-modal-backdrop {
802
- /* Re-declare design tokens here because the modal is appended to
803
- document.body and would otherwise lose the variables defined under
804
- .bq-agent (resulting in unstyled font and a transparent dialog
805
- background that makes the overlay appear to cover everything). */
806
- --bq-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
807
- --bq-ink: #111;
808
- --bq-paper: #fff;
809
- --bq-muted: #666;
810
- --bq-line: #c8c8c8;
811
- --bq-hover-bg: #ebebeb;
812
- --bq-danger: #c44;
813
- --bq-danger-bg: #fff5f5;
814
-
935
+ /* ============================================================================
936
+ * MODALS (appended to <body> under .bq-modal-root)
937
+ * ==========================================================================*/
938
+ .bq-modal-root {
815
939
  position: fixed;
816
940
  inset: 0;
817
- z-index: 1000;
818
- background: rgba(0, 0, 0, 0.5);
941
+ z-index: 2147483000;
819
942
  display: flex;
820
943
  align-items: center;
821
944
  justify-content: center;
822
- padding: 3rem;
945
+ padding: 1rem;
823
946
  font-family: var(--bq-mono);
824
- color: var(--bq-ink);
825
- box-sizing: border-box;
826
947
  }
827
-
828
- .bq-modal-backdrop *,
829
- .bq-modal-backdrop *::before,
830
- .bq-modal-backdrop *::after {
831
- box-sizing: border-box;
948
+ .bq-modal-backdrop {
949
+ position: absolute;
950
+ inset: 0;
951
+ background: rgba(0, 0, 0, 0.45);
832
952
  }
833
-
834
- /* Outer shell mirrors the <dialog> chrome from www.skapi.com's Modal
835
- component: white card, thin border, soft drop shadow. The inner
836
- .bq-modal-delete provides the 2rem content padding (matches
837
- bq-shared.less). */
838
- .bq-modal-delete {
839
- width: 100%;
840
- max-width: 24rem;
841
- margin: 0 auto;
953
+ .bq-modal {
954
+ position: relative;
955
+ z-index: 1;
956
+ width: 28rem;
957
+ max-width: 100%;
958
+ max-height: 90vh;
959
+ overflow-y: auto;
842
960
  background: var(--bq-paper);
843
- border: 1px solid #d0d0d0;
844
- box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
845
- padding: 2rem;
846
- font-family: var(--bq-mono);
847
- color: var(--bq-ink);
848
- }
849
-
850
- .bq-modal-delete-header {
851
- display: flex;
852
- align-items: center;
853
- justify-content: space-between;
854
- gap: 0.5rem;
855
- font-size: 0.95rem;
856
- font-weight: 600;
857
- color: var(--bq-danger);
858
- margin-bottom: 1.25rem;
859
- }
860
-
861
- .bq-modal-delete-icon {
862
- color: var(--bq-danger);
863
- font-size: 1.3rem;
864
- }
865
-
866
- .bq-modal-delete-body {
867
- font-size: 0.82rem;
868
961
  color: var(--bq-ink);
869
- line-height: 1.6;
870
- margin-bottom: 1.5rem;
871
- }
872
-
873
- .bq-modal-delete-body p {
874
- margin: 0 0 0.4rem;
875
- }
876
-
877
- .bq-modal-delete-warn {
878
- color: var(--bq-muted);
879
- font-size: 0.78rem !important;
880
- }
881
-
882
- .bq-modal-delete-footer {
883
- display: flex;
884
- justify-content: flex-end;
885
- align-items: center;
886
- gap: 0.5rem;
887
- }
888
-
889
- .bq-modal-delete-btn {
890
- font-family: var(--bq-mono);
891
- font-size: 0.8rem;
892
- line-height: 0.8rem;
893
- padding: 0.45rem 1rem;
894
962
  border: 1px solid var(--bq-line);
895
- background: var(--bq-paper);
896
- color: var(--bq-ink);
897
- cursor: pointer;
898
- transition: border-color 0.15s, background 0.15s, color 0.15s;
899
- box-shadow: 2px 2px rgba(0, 0, 0, 0.12);
900
- }
901
-
902
- .bq-modal-delete-btn--cancel:hover {
903
- border-color: var(--bq-ink);
904
- }
905
-
906
- .bq-modal-delete-btn--delete {
907
- background: var(--bq-danger);
908
- color: var(--bq-paper);
909
- border-color: var(--bq-danger);
910
- }
911
-
912
- .bq-modal-delete-btn--delete:hover {
913
- background: var(--bq-danger-bg);
914
- border-color: var(--bq-danger);
915
- color: var(--bq-danger);
916
- }
917
-
918
- /* ---- modal: account settings ------------------------------------------- */
919
-
920
- .bq-modal-card {
921
- width: 100%;
922
- max-width: 26rem;
923
- max-height: calc(100vh - 6rem);
924
- overflow: auto;
925
- margin: 0 auto;
926
- background: var(--bq-paper);
927
- border: 1px solid #d0d0d0;
928
- box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
929
- font-family: var(--bq-mono);
930
- color: var(--bq-ink);
931
- display: flex;
932
- flex-direction: column;
933
- }
934
-
935
- .bq-modal-header {
936
- display: flex;
937
- align-items: center;
938
- justify-content: space-between;
939
- gap: 0.5rem;
940
- padding: 1rem 1.25rem;
941
- border-bottom: 1px solid var(--bq-line);
942
- position: sticky;
943
- top: 0;
944
- background: var(--bq-paper);
945
- z-index: 1;
946
- }
947
-
948
- .bq-modal-title {
949
- font-size: 0.95rem;
950
- font-weight: 600;
951
- color: var(--bq-ink);
952
- letter-spacing: 0.01em;
963
+ box-shadow: 4px 4px rgba(0, 0, 0, 0.2);
964
+ padding: 2rem;
953
965
  }
954
-
955
966
  .bq-modal-close {
956
- all: unset;
957
- box-sizing: border-box;
958
- width: 1.75rem;
959
- height: 1.75rem;
960
- display: inline-flex;
961
- align-items: center;
962
- justify-content: center;
963
- font-size: 1.4rem;
967
+ position: absolute;
968
+ top: 1rem;
969
+ right: 1.25rem;
970
+ font-size: 1.5rem;
964
971
  line-height: 1;
965
- color: var(--bq-muted);
966
972
  cursor: pointer;
967
- border-radius: 2px;
968
- transition: background 0.15s, color 0.15s;
969
- }
970
-
971
- .bq-modal-close:hover {
972
- color: var(--bq-ink);
973
- background: var(--bq-hover-bg);
974
- }
975
-
976
- .bq-modal-body {
977
- display: flex;
978
- flex-direction: column;
979
- gap: 1.5rem;
980
- padding: 1.25rem;
981
- }
982
-
983
- .bq-modal-section {
984
- display: flex;
985
- flex-direction: column;
986
- gap: 0.75rem;
987
- padding-bottom: 1.25rem;
988
- border-bottom: 1px solid var(--bq-line);
989
- }
990
-
991
- .bq-modal-section:last-child {
992
- padding-bottom: 0;
993
- border-bottom: 0;
994
- }
995
-
996
- .bq-modal-section-title {
997
- font-size: 0.7rem;
998
- font-weight: 700;
999
- letter-spacing: 0.08em;
1000
- text-transform: uppercase;
1001
973
  color: var(--bq-muted);
1002
- margin: 0;
974
+ background: none;
975
+ border: 0;
1003
976
  }
977
+ .bq-modal-close:hover { color: var(--bq-ink); }
978
+ .bq-modal-title { margin: 0 0 0.75rem; font-size: 1.2rem; font-weight: 700; }
979
+ .bq-modal-desc { margin: 0 0 1.25rem; font-size: 0.85rem; color: var(--bq-muted); line-height: 1.6; }
980
+ .bq-modal-btns { display: flex; gap: 0.75rem; justify-content: flex-end; align-items: center; }
1004
981
 
1005
- .bq-modal-row {
982
+ /* delete/clear (danger) modal accents */
983
+ .bq-modal-delete-header {
1006
984
  display: flex;
1007
985
  align-items: center;
1008
- flex-wrap: wrap;
1009
986
  gap: 0.5rem;
1010
- font-size: 0.82rem;
1011
- min-width: 0;
1012
- }
1013
-
1014
- .bq-modal-value {
1015
- flex: 1 1 auto;
1016
- min-width: 0;
987
+ font-size: 0.95rem;
1017
988
  font-weight: 600;
1018
- overflow-wrap: anywhere;
1019
- }
1020
-
1021
- .bq-modal-badge {
1022
- flex: 0 0 auto;
1023
- font-size: 0.65rem;
1024
- text-transform: uppercase;
1025
- letter-spacing: 0.06em;
1026
- padding: 0.15rem 0.45rem;
1027
- border: 1px solid var(--bq-line);
1028
- color: var(--bq-muted);
1029
- line-height: 1;
1030
- }
1031
-
1032
- .bq-modal-badge--ok {
1033
- color: #2a7;
1034
- border-color: #2a7;
1035
- }
1036
-
1037
- .bq-modal-badge--warn {
1038
- color: var(--bq-danger);
1039
- border-color: var(--bq-danger);
1040
- }
1041
-
1042
- .bq-modal-verify-row {
1043
- display: flex;
1044
- flex-wrap: wrap;
1045
- gap: 0.4rem;
1046
- align-items: stretch;
1047
- }
1048
-
1049
- .bq-modal-verify-row .bq-settings-input {
1050
- flex: 1 1 9rem;
1051
- min-width: 0;
1052
- }
1053
-
1054
- .bq-modal-form {
1055
- display: flex;
1056
- flex-direction: column;
1057
- gap: 0.5rem;
1058
- }
1059
-
1060
- .bq-modal-form-actions {
1061
- display: flex;
1062
- justify-content: flex-end;
1063
- margin-top: 0.25rem;
1064
- }
1065
-
1066
- .bq-modal-msg {
1067
- margin: 0.25rem 0 0;
1068
- font-size: 0.75rem;
1069
- line-height: 1.4;
1070
- }
1071
-
1072
- .bq-modal-msg--ok {
1073
- color: #2a7;
1074
- }
1075
-
1076
- .bq-modal-msg--err {
1077
989
  color: var(--bq-danger);
990
+ margin-bottom: 1rem;
1078
991
  }
1079
-
1080
- /* Dedicated input for settings dialog — does NOT inherit chat .bq-input
1081
- left-padding (which is reserved for the attach button). */
1082
- .bq-settings-input {
1083
- box-sizing: border-box;
1084
- width: 100%;
1085
- height: 2.25rem;
1086
- padding: 0 0.7rem;
1087
- border: 1px solid var(--bq-line);
1088
- background: var(--bq-paper);
1089
- color: var(--bq-ink);
1090
- font-family: var(--bq-mono);
1091
- font-size: 0.82rem;
1092
- line-height: 1.2;
1093
- outline: none;
1094
- border-radius: 0;
1095
- -webkit-appearance: none;
1096
- appearance: none;
1097
- resize: none;
1098
- }
1099
-
1100
- .bq-settings-input:focus {
1101
- border-color: var(--bq-ink);
1102
- }
1103
-
1104
- .bq-settings-input:disabled {
1105
- opacity: 0.6;
1106
- cursor: not-allowed;
1107
- }
1108
-
1109
- /* Dedicated settings buttons — same visual language as the delete modal
1110
- buttons but without the delete-specific naming and with a tighter size
1111
- that pairs cleanly with the input height. */
1112
- .bq-settings-btn {
1113
- font-family: var(--bq-mono);
1114
- font-size: 0.78rem;
1115
- line-height: 1;
1116
- padding: 0 0.9rem;
1117
- height: 2.25rem;
1118
- border: 1px solid var(--bq-line);
1119
- background: var(--bq-paper);
1120
- color: var(--bq-ink);
1121
- cursor: pointer;
1122
- transition: border-color 0.15s, background 0.15s, color 0.15s;
1123
- }
1124
-
1125
- .bq-settings-btn:hover {
1126
- border-color: var(--bq-ink);
1127
- }
1128
-
1129
- .bq-settings-btn--primary {
1130
- background: var(--bq-ink);
992
+ .bq-modal-delete-warn { color: var(--bq-muted); font-size: 0.78rem; }
993
+ .btn--danger {
994
+ background: var(--bq-danger);
995
+ border-color: var(--bq-danger);
1131
996
  color: var(--bq-paper);
1132
- border-color: var(--bq-ink);
1133
- }
1134
-
1135
- .bq-settings-btn--primary:hover {
1136
- background: var(--bq-paper);
1137
- color: var(--bq-ink);
1138
997
  }
1139
998
 
1140
- .bq-settings-btn:disabled,
1141
- .bq-settings-btn.is-loading {
1142
- opacity: 0.6;
1143
- cursor: not-allowed;
1144
- }
1145
-
1146
- @media (max-width: 800px) {
1147
- .bq-modal-backdrop {
1148
- padding: 0.5rem;
1149
- }
1150
- }
1151
-
1152
- @media (max-width: 430px) {
1153
- .bq-modal-delete {
1154
- max-height: calc(100% - 1rem);
1155
- }
1156
-
1157
- .bq-modal-card {
1158
- max-width: 100%;
1159
- max-height: calc(100vh - 1rem);
1160
- }
1161
-
1162
- .bq-modal-header {
1163
- padding: 0.85rem 1rem;
1164
- }
1165
-
1166
- .bq-modal-body {
1167
- padding: 1rem;
1168
- gap: 1.25rem;
1169
- }
1170
-
1171
- .bq-modal-form-actions {
1172
- justify-content: stretch;
1173
- }
1174
-
1175
- .bq-modal-form-actions .bq-settings-btn {
1176
- flex: 1 1 auto;
1177
- }
1178
- }
1179
-
1180
- @media (max-width: 700px) {
1181
- .bq-meta {
1182
- /* padding: 1rem 0; */
1183
- border: none;
1184
- box-shadow: none;
1185
- }
1186
-
1187
- .bq-input-row {
1188
- flex-direction: column;
1189
- }
1190
-
1191
- .bq-input-wrap {
1192
- width: 100%;
1193
- flex: 0 0 auto;
1194
- }
1195
-
1196
- .bq-attachments {
1197
- flex-basis: auto;
1198
- width: 100%;
1199
- }
1200
-
1201
- .bq-input-row .btn {
1202
- width: 100%;
1203
- }
1204
-
1205
- .bq-bubble {
1206
- max-width: 100%;
1207
- }
999
+ /* ============================================================================
1000
+ * RESPONSIVE
1001
+ * ==========================================================================*/
1002
+ @media (max-width: 600px) {
1003
+ /* .bq-meta { padding: 0.75rem; } */
1004
+ .bq-input-row { flex-direction: column; padding: 0.65rem 0.75rem 0.75rem; }
1005
+ .bq-input-wrap { width: 100%; flex: 0 0 auto; }
1006
+ .bq-input-row .btn { width: 100%; }
1007
+ .bq-bubble { max-width: 100%; }
1008
+ .bq-page { padding: 2rem 1.25rem; }
1009
+ .bq-section-title { padding: 0.75rem; }
1010
+ .bq-messages { padding: 0.25rem 0.75rem; }
1011
+ }
1012
+
1013
+ /* dark-mode: brighten any inline dark SVG icons (e.g. provider logos) */
1014
+ .bq-agent[data-bq-theme="dark"] .bq-icon-invertible,
1015
+ .bq-modal-root[data-bq-theme="dark"] .bq-icon-invertible {
1016
+ filter: invert(var(--bq-icon-invert));
1208
1017
  }