bunnyquery 1.1.4 → 1.2.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 (4) hide show
  1. package/README.md +111 -148
  2. package/bunnyquery.css +794 -983
  3. package/bunnyquery.js +3677 -2477
  4. package/package.json +7 -5
package/bunnyquery.css CHANGED
@@ -1,24 +1,16 @@
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;
@@ -29,1180 +21,999 @@
29
21
  --bq-light-pink: #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-pink-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-pink: #f06292;
49
+ --bq-light-pink: #f48fb1;
50
+ --bq-danger: #ef5350;
51
+ --bq-danger-bg: #2d1616;
52
+ --bq-pink-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;
193
- }
194
-
195
- .bq-text-btn--danger:hover {
196
- color: var(--bq-danger);
197
- }
198
-
199
- .bq-text-btn-sep {
200
- color: var(--bq-line);
201
- user-select: none;
202
- font-size: 0.85rem;
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;
203
245
  }
204
246
 
205
247
  .bq-link {
206
248
  color: var(--bq-pink);
207
- text-decoration: none;
208
- }
209
-
210
- .bq-link:hover {
249
+ cursor: pointer;
250
+ font-size: 0.8rem;
251
+ background: none;
252
+ border: 0;
253
+ padding: 0;
254
+ font-family: var(--bq-mono);
211
255
  text-decoration: underline;
212
256
  }
257
+ .bq-link:hover { text-decoration: none; }
258
+ .bq-link.disabled { opacity: 0.4; pointer-events: none; }
213
259
 
214
- /* ---- chat surface ------------------------------------------------------- */
215
-
216
- .bq-chat {
217
- border: none;
218
- display: flex;
219
- 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);
260
+ .bq-checkbox {
261
+ display: inline-flex;
262
+ align-items: center;
263
+ gap: 0.4rem;
264
+ font-size: 0.8rem;
265
+ cursor: pointer;
235
266
  }
236
267
 
237
- .bq-history-loading {
238
- position: sticky;
239
- top: 0;
240
- z-index: 1;
241
- display: flex;
242
- justify-content: center;
243
- padding: 0.5rem 0 1rem;
244
- text-align: center;
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);
245
273
  font-size: 0.8rem;
246
- color: var(--bq-muted);
247
- background: linear-gradient(to bottom, var(--bq-paper) 70%, rgba(255, 255, 255, 0));
274
+ line-height: 1.5;
248
275
  }
249
276
 
250
- .bq-empty-greeting .bq-bubble {
251
- user-select: none;
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;
252
284
  }
253
285
 
254
- .bq-message {
286
+ .bq-form-bottom {
255
287
  display: flex;
256
- margin-bottom: 0.5rem;
288
+ flex-direction: column;
289
+ gap: 1.25rem;
290
+ margin-top: 0.25rem;
257
291
  }
292
+ .bq-form-bottom .btn { width: 100%; }
258
293
 
259
- .bq-message.is-user {
260
- justify-content: flex-end;
294
+ /* divider "OR" */
295
+ .bq-divider {
296
+ display: flex;
297
+ align-items: center;
298
+ gap: 1rem;
299
+ margin: 1.75rem 0;
261
300
  }
262
-
263
- .bq-message.is-assistant {
264
- justify-content: flex-start;
301
+ .bq-divider-line { flex: 1; height: 1px; background: var(--bq-line); }
302
+ .bq-divider-text {
303
+ font-size: 0.7rem;
304
+ color: var(--bq-muted);
305
+ letter-spacing: 0.14em;
306
+ text-transform: uppercase;
265
307
  }
266
308
 
267
- .bq-bubble {
268
- padding: 0.55rem 0.7rem;
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;
269
317
  border: 1px solid var(--bq-line);
270
- white-space: pre-wrap;
271
- line-height: 1.45;
272
- font-size: 0.83rem;
273
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;
274
326
  }
327
+ .bq-google:hover:not(:disabled) { border-color: var(--bq-ink); }
328
+ .bq-google:disabled { opacity: 0.4; pointer-events: none; }
275
329
 
276
- .bq-bubble span {
277
- word-break: break-word;
330
+ /* small top nav inside setting views (back link + theme toggle) */
331
+ .bq-settings-top {
332
+ display: flex;
333
+ align-items: center;
334
+ justify-content: space-between;
335
+ margin-bottom: 0.5rem;
278
336
  }
279
337
 
280
- .is-user .bq-bubble {
281
- background: var(--bq-paper);
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;
282
344
  }
283
345
 
284
- .is-assistant:not(.is-error) .bq-bubble {
285
- background: #eef9f0;
286
- border-color: #b8dcbc;
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;
287
354
  }
288
-
289
- .is-error .bq-bubble {
290
- background: var(--bq-danger-bg);
291
- border-color: var(--bq-danger);
292
- color: var(--bq-danger);
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;
293
364
  }
294
-
295
- .is-pending-older .bq-bubble {
296
- background: #fff8e1;
297
- border-color: #e6c25a;
298
- color: #8a6d1a;
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);
299
373
  }
300
-
301
- /* ------------ markdown body rendered by marked ----------------- */
302
- .bq-md {
303
- white-space: normal;
304
- word-break: break-word;
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;
305
381
  }
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;
382
+ .bq-account-label {
383
+ font-size: 0.7rem;
319
384
  font-weight: 600;
385
+ letter-spacing: 0.06em;
386
+ color: var(--bq-muted);
387
+ text-transform: uppercase;
320
388
  }
321
- .bq-md h1 { font-size: 1.3em; }
322
- .bq-md h2 { font-size: 1.18em; }
323
- .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;
331
- }
332
- .bq-md li { margin: 0.15em 0; }
333
- .bq-md li > p { margin: 0.2em 0; }
334
- .bq-md blockquote {
335
- margin: 0.5em 0;
336
- padding: 0.2em 0.8em;
337
- 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;
349
- }
350
- .bq-md a:hover { text-decoration: none; }
351
- .bq-md code {
352
- font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
353
- font-size: 0.9em;
354
- padding: 0.1em 0.35em;
355
- background: rgba(0, 0, 0, 0.06);
356
- border-radius: 0;
357
- white-space: pre-wrap;
358
- word-break: break-word;
359
- }
360
- .bq-md pre {
361
- margin: 0.5em 0;
362
- padding: 0.6em 0.8em;
363
- background: #1e1e1e;
364
- color: #f5f5f5;
365
- border-radius: 0;
366
- overflow-x: auto;
367
- white-space: pre;
368
- }
369
- .bq-md pre code {
370
- background: transparent;
371
- color: inherit;
372
- padding: 0;
373
- font-size: 0.85em;
374
- white-space: pre;
375
- word-break: normal;
376
- }
377
- .bq-md table {
378
- border-collapse: collapse;
379
- margin: 0.5em 0;
380
- font-size: 0.95em;
381
- display: block;
382
- overflow-x: auto;
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;
383
395
  }
384
- .bq-md th,
385
- .bq-md td {
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;
386
403
  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;
404
+ vertical-align: middle;
398
405
  }
399
- .bq-md strong { font-weight: 600; }
400
- .bq-md em { font-style: italic; }
401
- .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
+ .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: 1.5rem;
410
+ text-align: right;
406
411
  }
407
- a.bq-link-button.is-refreshing {
408
- opacity: 0.7;
409
- cursor: wait;
412
+ .bq-account-danger {
413
+ margin-top: 2rem;
414
+ padding: 1.25rem;
415
+ border: 1px solid var(--bq-danger);
416
+ background: var(--bq-danger-bg);
410
417
  }
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
+ .bq-account-danger-title {
419
+ font-size: 0.72rem;
420
+ font-weight: 700;
421
+ letter-spacing: 0.1em;
422
+ text-transform: uppercase;
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;
445
+ /* padding: 1rem 1.25rem 1.25rem; */
418
446
  }
419
447
 
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;
448
+ .bq-section-title {
449
+ display: flex;
450
+ flex-direction: column;
451
+ gap: 0.5rem;
452
+ font-size: 1.1rem;
453
+ font-weight: 700;
454
+ /* padding-bottom: 0.75rem; */
455
+ padding: 1rem 1.25rem 0.75rem;
456
+ flex-shrink: 0;
432
457
  }
433
458
 
434
- a.bq-link-button {
435
- max-width: 100%;
436
- overflow: hidden;
437
- text-overflow: ellipsis;
438
- white-space: nowrap;
459
+ .bq-title-row {
460
+ display: flex;
461
+ justify-content: space-between;
462
+ align-items: center;
463
+ gap: 0.5rem;
439
464
  }
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;
465
+ .bq-title-left,
466
+ .bq-title-right {
467
+ display: flex;
468
+ align-items: center;
469
+ gap: 0.5rem;
446
470
  }
447
471
 
448
- /* ---- input row ---------------------------------------------------------- */
449
-
450
- .bq-input-row {
451
- display: flex;
452
- flex-shrink: 0;
453
- --chat-control-height: 2.6rem;
454
- gap: 0.65rem;
455
- padding: 0.65rem 0 0;
472
+ /* read-only agent (platform + model) badge */
473
+ .bq-agent-badge {
474
+ display: inline-flex;
475
+ align-items: center;
476
+ gap: 0.45rem;
477
+ padding: 0.3rem 0.6rem;
478
+ border: 1px solid var(--bq-line);
456
479
  background: var(--bq-paper);
457
- flex-wrap: wrap;
480
+ font-size: 0.75rem;
481
+ font-family: var(--bq-mono);
482
+ color: var(--bq-ink);
483
+ max-width: 100%;
484
+ overflow: hidden;
458
485
  }
459
-
460
- .bq-attach-input {
461
- display: none;
486
+ .bq-agent-badge-logo {
487
+ width: 1.1rem;
488
+ height: 1.1rem;
489
+ object-fit: contain;
490
+ flex: 0 0 auto;
462
491
  }
463
-
464
- .bq-input-wrap {
465
- position: relative;
466
- flex: 1;
467
- display: flex;
468
- min-width: 0;
492
+ .bq-agent-badge-model {
493
+ color: var(--bq-muted);
494
+ overflow: hidden;
495
+ text-overflow: ellipsis;
496
+ white-space: nowrap;
469
497
  }
470
498
 
471
- .bq-attach-btn {
472
- position: absolute;
473
- top: 0;
474
- left: 0;
499
+ /* header icon buttons (theme, clear, account) */
500
+ .bq-icon-btn {
475
501
  display: inline-flex;
476
502
  align-items: center;
477
503
  justify-content: center;
478
- width: var(--chat-control-height);
479
- height: var(--chat-control-height);
480
- min-height: 0;
504
+ width: 2rem;
505
+ height: 2rem;
481
506
  padding: 0;
482
507
  border: none;
483
508
  background: transparent;
484
509
  color: var(--bq-muted);
485
510
  cursor: pointer;
486
- z-index: 1;
487
- box-shadow: none;
511
+ transition: color 0.15s;
488
512
  border-radius: 0;
489
513
  }
514
+ .bq-icon-btn:hover { color: var(--bq-pink); }
515
+ .bq-icon-btn.is-active { color: var(--bq-pink); }
516
+ .bq-icon-btn--danger:hover { color: var(--bq-danger); }
517
+ .bq-icon-btn:disabled { opacity: 0.3; pointer-events: none; }
518
+ .bq-icon-btn svg { width: 1.25rem; height: 1.25rem; display: block; }
490
519
 
491
- .bq-attach-btn:hover:not(:disabled) {
492
- background: transparent;
493
- color: var(--bq-pink);
520
+ /* settings shown in place inside the chat's messages area */
521
+ .bq-chat-settings {
522
+ width: 100%;
523
+ max-width: 440px;
524
+ margin: 0 auto;
525
+ padding: 1.25rem 0 2rem;
494
526
  }
527
+ .bq-chat-settings-loading { text-align: center; padding: 2.5rem 0; color: var(--bq-muted); }
495
528
 
496
- .bq-attach-btn:disabled {
497
- opacity: 0.5;
498
- cursor: not-allowed;
529
+ /* chat container + scroll area */
530
+ .bq-chat {
531
+ position: relative;
532
+ display: flex;
533
+ flex-direction: column;
534
+ flex: 1;
535
+ min-height: 0;
536
+ }
537
+ .bq-messages {
538
+ position: relative;
539
+ overflow-y: auto;
540
+ overflow-x: hidden;
541
+ flex: 1;
542
+ min-height: 0;
543
+ padding: 0.25rem 1.25rem;
544
+ background: var(--bq-paper);
499
545
  }
500
546
 
501
- .bq-attachments {
502
- flex-basis: 100%;
547
+ .bq-history-loading {
548
+ position: sticky;
549
+ top: 0;
550
+ z-index: 1;
503
551
  display: flex;
504
- flex-wrap: wrap;
505
- gap: 0.4rem;
506
- padding: 0 0 0.5rem;
552
+ justify-content: center;
553
+ gap: 0.1em;
554
+ padding: 0.5rem 0 1rem;
555
+ font-size: 0.8rem;
556
+ color: var(--bq-muted);
557
+ background: var(--bq-paper);
558
+ }
559
+ /* initial first-page load: center it in the (empty) messages area */
560
+ .bq-history-loading.is-initial {
561
+ position: absolute;
562
+ inset: 0;
563
+ align-items: center;
564
+ padding: 0;
507
565
  }
508
566
 
509
- .bq-attachment {
510
- display: inline-flex;
567
+ /* "admin hasn't set up the agent" / disabled overlay */
568
+ .bq-disabled-overlay {
569
+ position: absolute;
570
+ inset: 0;
571
+ z-index: 4;
572
+ display: flex;
511
573
  align-items: center;
512
- gap: 0.35rem;
513
- max-width: 18rem;
514
- padding: 0.3rem 0.5rem;
515
- border: 1px solid var(--bq-line);
574
+ justify-content: center;
516
575
  background: var(--bq-paper);
517
- font-size: 0.78rem;
518
- font-family: var(--bq-mono);
519
- position: relative;
520
- overflow: hidden;
521
- isolation: isolate;
576
+ padding: 1.5rem;
577
+ }
578
+ .bq-disabled-inner {
579
+ display: flex;
580
+ flex-direction: column;
581
+ align-items: center;
582
+ gap: 0.85rem;
583
+ text-align: center;
584
+ max-width: 28rem;
585
+ color: var(--bq-muted);
586
+ font-size: 0.88rem;
587
+ line-height: 1.5;
522
588
  }
523
589
 
524
- .bq-attachment.is-uploading::before {
525
- content: "";
590
+ /* drag-drop overlay */
591
+ .bq-drop-overlay {
526
592
  position: absolute;
527
- inset: 0 auto 0 0;
528
- width: var(--att-progress, 0%);
529
- background: rgba(194, 24, 91, 0.18);
530
- transition: width 0.15s linear;
531
- z-index: 0;
593
+ inset: 0;
594
+ z-index: 5;
595
+ display: flex;
596
+ align-items: center;
597
+ justify-content: center;
598
+ background: var(--bq-paper);
599
+ border: 2px dashed var(--bq-pink);
532
600
  pointer-events: none;
601
+ opacity: 0.92;
533
602
  }
534
-
535
- .bq-attachment.is-uploading > * {
536
- position: relative;
537
- z-index: 1;
603
+ .bq-drop-overlay-inner {
604
+ display: flex;
605
+ flex-direction: column;
606
+ align-items: center;
607
+ gap: 0.5rem;
608
+ color: var(--bq-pink);
609
+ font-size: 0.9rem;
610
+ font-weight: 600;
538
611
  }
539
612
 
540
- .bq-attachment.is-error {
541
- border-color: #c0392b;
613
+ /* messages + bubbles */
614
+ .bq-message {
615
+ display: flex;
616
+ margin-bottom: 0.5rem;
542
617
  }
618
+ .bq-message.is-user { justify-content: flex-end; }
619
+ .bq-message.is-assistant { justify-content: flex-start; }
543
620
 
544
- .bq-attachment.is-error .bq-attachment-meta {
545
- color: #c0392b;
621
+ .bq-bubble {
622
+ max-width: 85%;
623
+ padding: 0.55rem 0.7rem;
624
+ border: 1px solid var(--bq-line);
625
+ white-space: pre-wrap;
626
+ line-height: 1.45;
627
+ font-size: 0.83rem;
628
+ background: var(--bq-paper);
546
629
  }
547
-
548
- .bq-attachment.is-clickable {
549
- cursor: pointer;
550
- transition: background 0.12s ease, border-color 0.12s ease;
630
+ .bq-message.is-user .bq-bubble { background: var(--bq-paper); }
631
+ .bq-message.is-assistant:not(.is-error) .bq-bubble {
632
+ background: var(--bq-success-bg);
633
+ border-color: var(--bq-success-border);
551
634
  }
552
-
553
- .bq-attachment.is-clickable:hover {
554
- background: var(--bq-hover-bg);
555
- border-color: var(--bq-ink);
635
+ .bq-message.is-error .bq-bubble {
636
+ background: var(--bq-danger-bg);
637
+ border-color: var(--bq-danger);
638
+ color: var(--bq-danger);
556
639
  }
557
-
558
- .bq-attachment-icon {
559
- flex: 0 0 16px;
560
- color: var(--bq-muted);
640
+ .bq-message.is-cancelled .bq-bubble {
641
+ background: var(--bq-danger-bg);
642
+ border-color: var(--bq-danger);
643
+ color: var(--bq-danger);
644
+ opacity: 0.65;
561
645
  }
646
+ .bq-message.is-pending-older .bq-bubble {
647
+ background: var(--bq-warning-bg);
648
+ border-color: var(--bq-warning-border);
649
+ color: var(--bq-warning);
650
+ transition: opacity 0.25s ease;
651
+ }
652
+ .bq-message.is-sending-to-server .bq-bubble { opacity: 0.4; }
562
653
 
563
- .bq-attachment-arrow {
564
- flex: 0 0 auto;
565
- font-size: 0.95rem;
566
- line-height: 1;
654
+ .bq-empty-greeting .bq-bubble {
567
655
  color: var(--bq-muted);
568
656
  }
569
657
 
570
- .is-done .bq-attachment-arrow {
571
- color: var(--bq-ink);
658
+ .bq-pending-note {
659
+ display: block;
660
+ margin-top: 0.35rem;
661
+ font-size: 0.7rem;
662
+ color: var(--bq-warning);
663
+ font-style: italic;
664
+ }
665
+ .bq-cancel-error {
666
+ display: block;
667
+ margin-top: 0.3rem;
668
+ font-size: 0.68rem;
669
+ color: var(--bq-danger);
670
+ font-style: italic;
671
+ clear: both;
672
+ }
673
+ .bq-cancel-queue-btn {
674
+ float: right;
675
+ margin: -0.25rem -0.25rem 0.2rem 0.4rem;
676
+ width: 1.1rem;
677
+ height: 1.1rem;
678
+ display: inline-flex;
679
+ align-items: center;
680
+ justify-content: center;
681
+ padding: 0;
682
+ border: 1px solid var(--bq-warning-border);
683
+ background: transparent;
684
+ color: var(--bq-warning);
685
+ font-size: 0.85rem;
686
+ line-height: 1;
687
+ cursor: pointer;
688
+ flex-shrink: 0;
572
689
  }
690
+ .bq-cancel-queue-btn:hover:not(.is-disabled) { background: var(--bq-warning-bg); }
691
+ .bq-cancel-queue-btn.is-disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
573
692
 
574
- .bq-attachment-name {
693
+ /* in-bubble file/link anchors */
694
+ .bq-file-download,
695
+ .bq-link-button {
696
+ color: var(--bq-pink);
697
+ text-decoration: none;
698
+ cursor: pointer;
699
+ background: transparent;
700
+ border: 0;
701
+ padding: 0;
702
+ font: inherit;
703
+ }
704
+ .bq-file-download:hover,
705
+ .bq-link-button:hover { text-decoration: underline; }
706
+ .bq-link-button {
707
+ display: inline-block;
708
+ max-width: 100%;
575
709
  overflow: hidden;
576
710
  text-overflow: ellipsis;
577
711
  white-space: nowrap;
578
- max-width: 12rem;
712
+ vertical-align: bottom;
579
713
  }
580
714
 
581
- .bq-attachment-meta {
582
- color: var(--bq-muted);
583
- flex-shrink: 0;
715
+ /* ---- markdown body -------------------------------------------------------*/
716
+ .bq-md { white-space: normal; word-break: break-word; }
717
+ .bq-md > :first-child { margin-top: 0; }
718
+ .bq-md > :last-child { margin-bottom: 0; }
719
+ .bq-md p { margin: 0.4em 0; }
720
+ .bq-md h1 { font-size: 1.3em; }
721
+ .bq-md h2 { font-size: 1.18em; }
722
+ .bq-md h3 { font-size: 1.08em; }
723
+ .bq-md h4, .bq-md h5, .bq-md h6 { font-size: 1em; }
724
+ .bq-md h1, .bq-md h2, .bq-md h3, .bq-md h4, .bq-md h5, .bq-md h6 {
725
+ margin: 0.8em 0 0.35em;
726
+ line-height: 1.25;
727
+ font-weight: 600;
584
728
  }
585
-
586
- .bq-attachment-more {
729
+ .bq-md ul, .bq-md ol { margin: 0.4em 0; padding-left: 1.4em; }
730
+ .bq-md li { margin: 0.15em 0; }
731
+ .bq-md blockquote {
732
+ margin: 0.5em 0;
733
+ padding: 0.2em 0.8em;
734
+ border-left: 3px solid var(--bq-line);
587
735
  color: var(--bq-muted);
588
- font-style: italic;
589
- cursor: default;
736
+ background: rgba(127, 127, 127, 0.08);
737
+ }
738
+ .bq-md hr { border: none; border-top: 1px solid var(--bq-line); margin: 0.8em 0; }
739
+ .bq-md a { color: var(--bq-pink); text-decoration: underline; }
740
+ .bq-md a:hover { text-decoration: none; }
741
+ .bq-md code {
742
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
743
+ font-size: 0.9em;
744
+ padding: 0.1em 0.35em;
745
+ background: rgba(127, 127, 127, 0.16);
746
+ white-space: pre-wrap;
747
+ word-break: break-word;
748
+ }
749
+ .bq-md pre {
750
+ margin: 0.5em 0;
751
+ padding: 0.6em 0.8em;
752
+ background: var(--bq-code-bg);
753
+ color: var(--bq-code-fg);
754
+ overflow-x: auto;
755
+ white-space: pre;
756
+ }
757
+ .bq-md pre code {
758
+ background: transparent;
759
+ color: inherit;
760
+ padding: 0;
761
+ font-size: 0.85em;
762
+ word-break: normal;
590
763
  }
764
+ .bq-md table {
765
+ border-collapse: collapse;
766
+ margin: 0.5em 0;
767
+ font-size: 0.95em;
768
+ display: block;
769
+ overflow-x: auto;
770
+ }
771
+ .bq-md th, .bq-md td { border: 1px solid var(--bq-line); padding: 0.3em 0.55em; text-align: left; }
772
+ .bq-md th { background: rgba(127, 127, 127, 0.1); font-weight: 600; }
773
+ .bq-md img { max-width: 100%; height: auto; border-radius: 4px; }
774
+ .bq-md strong { font-weight: 600; }
775
+ .bq-md em { font-style: italic; }
776
+ .bq-md del { text-decoration: line-through; }
591
777
 
592
- .bq-attachment-remove {
778
+ /* ---- composer / input row ------------------------------------------------*/
779
+ .bq-input-row {
780
+ --chat-control-height: 2.6rem;
781
+ display: flex;
782
+ flex-shrink: 0;
783
+ gap: 0.65rem;
784
+ padding: 0.65rem 1.25rem 1.25rem;
785
+ background: var(--bq-paper);
786
+ flex-wrap: wrap;
787
+ }
788
+ .bq-input-wrap {
789
+ position: relative;
790
+ flex: 1;
791
+ display: flex;
792
+ min-width: 0;
793
+ }
794
+ .bq-attach-btn {
795
+ position: absolute;
796
+ top: 0;
797
+ left: 0;
593
798
  display: inline-flex;
594
799
  align-items: center;
595
800
  justify-content: center;
596
- width: 1.2rem;
597
- height: 1.2rem;
598
- margin-left: 0.15rem;
801
+ width: var(--chat-control-height);
802
+ height: var(--chat-control-height);
599
803
  padding: 0;
600
804
  border: none;
601
805
  background: transparent;
602
806
  color: var(--bq-muted);
603
- font-size: 1rem;
604
- line-height: 1;
605
807
  cursor: pointer;
808
+ z-index: 1;
606
809
  }
607
-
608
- .bq-attachment-remove:hover {
609
- color: var(--bq-ink);
610
- }
611
-
810
+ .bq-attach-btn:hover:not(:disabled) { color: var(--bq-pink); }
811
+ .bq-attach-btn:disabled { opacity: 0.5; cursor: not-allowed; }
812
+ .bq-attach-input { display: none; }
612
813
  .bq-input {
613
814
  flex: 1;
614
815
  min-height: var(--chat-control-height);
816
+ max-height: 12rem;
615
817
  box-sizing: border-box;
616
- overflow-y: hidden;
617
- resize: vertical;
818
+ overflow-y: hidden; /* autoGrowInput switches to auto only at the max-height cap */
819
+ resize: none;
618
820
  border: 1px solid var(--bq-line);
821
+ background: var(--bq-paper);
822
+ color: var(--bq-ink);
619
823
  padding: 0.7rem 0.7rem 0.7rem var(--chat-control-height);
620
824
  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;
825
+ font-size: 0.83rem;
826
+ line-height: 1.4;
827
+ border-radius: 0;
639
828
  }
640
-
829
+ .bq-input::placeholder { color: var(--bq-placeholder); }
830
+ .bq-input:focus { outline: none; border-color: var(--bq-ink); }
831
+ .bq-input:disabled { opacity: 0.5; cursor: default; }
641
832
  .bq-input-row .btn {
642
833
  align-self: flex-end;
643
834
  min-width: 5.5rem;
644
835
  height: var(--chat-control-height);
645
- padding: 0 1.1rem;
646
836
  }
647
837
 
648
- /* ---- gate / overlay screens (login, loading, fatal) -------------------- */
649
-
650
- .bq-gate-loading {
651
- flex: 1;
652
- min-height: 100%;
838
+ /* ---- attachment chips ----------------------------------------------------*/
839
+ .bq-attachments {
840
+ flex-basis: 100%;
653
841
  display: flex;
654
- flex-direction: column;
655
- align-items: center;
656
- justify-content: center;
657
- font-size: 0.83rem;
658
- color: var(--bq-muted);
842
+ flex-wrap: wrap;
843
+ gap: 0.4rem;
844
+ padding: 0 0 0.5rem;
659
845
  }
660
-
661
- .bq-apikey-overlay {
662
- position: relative;
663
- flex: 1;
664
- z-index: 4;
665
- display: flex;
846
+ .bq-attachment {
847
+ display: inline-flex;
666
848
  align-items: center;
667
- justify-content: center;
849
+ gap: 0.35rem;
850
+ max-width: 18rem;
851
+ padding: 0.3rem 0.5rem;
852
+ border: 1px solid var(--bq-line);
668
853
  background: var(--bq-paper);
669
- padding: 1rem;
670
- height: 100%;
854
+ font-size: 0.78rem;
855
+ font-family: var(--bq-mono);
856
+ position: relative;
857
+ overflow: hidden;
858
+ isolation: isolate;
671
859
  }
672
-
673
- .bq-apikey-overlay-inner {
674
- 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%;
860
+ .bq-attachment.is-uploading::before {
861
+ content: "";
862
+ position: absolute;
863
+ inset: 0 auto 0 0;
864
+ width: var(--att-progress, 0%);
865
+ background: rgba(240, 98, 146, 0.18);
866
+ transition: width 0.15s linear;
867
+ z-index: 0;
868
+ pointer-events: none;
681
869
  }
682
-
683
- .bq-apikey-overlay-inner .btn {
684
- align-self: center;
685
- min-width: 11rem;
870
+ .bq-attachment.is-uploading > * { position: relative; z-index: 1; }
871
+ .bq-attachment.is-error { border-color: var(--bq-danger); background: var(--bq-danger-bg); }
872
+ .bq-attachment.is-error .bq-attachment-meta,
873
+ .bq-attachment.is-error .bq-attachment-name { color: var(--bq-danger); }
874
+ .bq-attachment.is-index-error { border-color: var(--bq-warning-border); background: var(--bq-warning-bg); }
875
+ .bq-attachment.is-index-error .bq-attachment-meta,
876
+ .bq-attachment.is-index-error .bq-attachment-name { color: var(--bq-warning); }
877
+ .bq-attachment.is-done { border-color: var(--bq-success-border); background: var(--bq-success-bg); }
878
+ .bq-attachment.is-done .bq-attachment-meta { color: var(--bq-success); }
879
+ .bq-attachment.is-clickable { cursor: pointer; transition: background 0.12s, border-color 0.12s; }
880
+ .bq-attachment.is-clickable:hover { background: var(--bq-hover-bg); border-color: var(--bq-ink); }
881
+ .bq-attachment-icon { flex: 0 0 16px; color: var(--bq-muted); display: inline-flex; }
882
+ .bq-attachment-icon svg { width: 16px; height: 16px; }
883
+ .bq-attachment-arrow { flex: 0 0 auto; font-size: 0.95rem; line-height: 1; color: var(--bq-muted); }
884
+ .bq-attachment.is-done .bq-attachment-arrow { color: var(--bq-ink); }
885
+ .bq-attachment-name {
886
+ overflow: hidden;
887
+ text-overflow: ellipsis;
888
+ white-space: nowrap;
889
+ max-width: 12rem;
686
890
  }
687
-
688
- .bq-apikey-help {
689
- margin: 0;
891
+ .bq-attachment-meta { color: var(--bq-muted); flex-shrink: 0; }
892
+ .bq-attachment-more { color: var(--bq-muted); font-style: italic; }
893
+ .bq-attachment-remove-all {
894
+ display: inline-flex;
895
+ align-items: center;
896
+ gap: 0.2rem;
897
+ padding: 0.3rem 0.5rem;
898
+ border: 1px dashed var(--bq-line);
899
+ background: transparent;
690
900
  color: var(--bq-muted);
691
- font-size: 0.83rem;
692
- line-height: 1.4;
693
- }
694
-
695
- .bq-apikey-error {
696
- margin: 0;
697
- 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
901
  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);
902
+ font-size: 0.72rem;
903
+ cursor: pointer;
904
+ align-self: center;
751
905
  }
752
-
753
- .bq-login-note {
754
- margin: 0;
906
+ .bq-attachment-remove-all:hover { color: var(--bq-danger); border-color: var(--bq-danger); }
907
+ .bq-attachment-remove {
908
+ display: inline-flex;
909
+ align-items: center;
910
+ justify-content: center;
911
+ width: 1.2rem;
912
+ height: 1.2rem;
913
+ margin-left: 0.15rem;
914
+ padding: 0;
915
+ border: none;
916
+ background: transparent;
755
917
  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;
918
+ font-size: 1rem;
919
+ cursor: pointer;
787
920
  }
921
+ .bq-attachment-remove:hover { color: var(--bq-ink); }
788
922
 
789
- .bq-agent .bq-login-submit.is-loading::after {
790
- content: var(--bq-login-loading-label);
791
- position: absolute;
792
- inset: 0;
923
+ .bq-attachment-warning {
924
+ flex-basis: 100%;
793
925
  display: flex;
794
- align-items: center;
795
- justify-content: center;
796
- pointer-events: none;
926
+ align-items: flex-start;
927
+ gap: 0.4rem;
928
+ padding: 0.4rem 0.5rem;
929
+ margin-bottom: 0.4rem;
930
+ border: 1px solid var(--bq-danger);
931
+ background: var(--bq-danger-bg);
932
+ color: var(--bq-danger);
933
+ font-size: 0.75rem;
934
+ line-height: 1.3;
797
935
  }
798
936
 
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
-
937
+ /* ============================================================================
938
+ * MODALS (appended to <body> under .bq-modal-root)
939
+ * ==========================================================================*/
940
+ .bq-modal-root {
815
941
  position: fixed;
816
942
  inset: 0;
817
- z-index: 1000;
818
- background: rgba(0, 0, 0, 0.5);
943
+ z-index: 2147483000;
819
944
  display: flex;
820
945
  align-items: center;
821
946
  justify-content: center;
822
- padding: 3rem;
947
+ padding: 1rem;
823
948
  font-family: var(--bq-mono);
824
- color: var(--bq-ink);
825
- box-sizing: border-box;
826
949
  }
827
-
828
- .bq-modal-backdrop *,
829
- .bq-modal-backdrop *::before,
830
- .bq-modal-backdrop *::after {
831
- box-sizing: border-box;
950
+ .bq-modal-backdrop {
951
+ position: absolute;
952
+ inset: 0;
953
+ background: rgba(0, 0, 0, 0.45);
832
954
  }
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;
955
+ .bq-modal {
956
+ position: relative;
957
+ z-index: 1;
958
+ width: 28rem;
959
+ max-width: 100%;
960
+ max-height: 90vh;
961
+ overflow-y: auto;
842
962
  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
963
  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
964
  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;
965
+ box-shadow: 4px 4px rgba(0, 0, 0, 0.2);
966
+ padding: 2rem;
953
967
  }
954
-
955
968
  .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;
969
+ position: absolute;
970
+ top: 1rem;
971
+ right: 1.25rem;
972
+ font-size: 1.5rem;
964
973
  line-height: 1;
965
- color: var(--bq-muted);
966
974
  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
975
  color: var(--bq-muted);
1002
- margin: 0;
976
+ background: none;
977
+ border: 0;
1003
978
  }
979
+ .bq-modal-close:hover { color: var(--bq-ink); }
980
+ .bq-modal-title { margin: 0 0 0.75rem; font-size: 1.2rem; font-weight: 700; }
981
+ .bq-modal-desc { margin: 0 0 1.25rem; font-size: 0.85rem; color: var(--bq-muted); line-height: 1.6; }
982
+ .bq-modal-btns { display: flex; gap: 0.75rem; justify-content: flex-end; align-items: center; }
1004
983
 
1005
- .bq-modal-row {
984
+ /* delete/clear (danger) modal accents */
985
+ .bq-modal-delete-header {
1006
986
  display: flex;
1007
987
  align-items: center;
1008
- flex-wrap: wrap;
1009
988
  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;
989
+ font-size: 0.95rem;
1017
990
  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
991
  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;
992
+ margin-bottom: 1rem;
1064
993
  }
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
- color: var(--bq-danger);
1078
- }
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);
994
+ .bq-modal-delete-warn { color: var(--bq-muted); font-size: 0.78rem; }
995
+ .btn--danger {
996
+ background: var(--bq-danger);
997
+ border-color: var(--bq-danger);
1131
998
  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
999
  }
1139
1000
 
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
- }
1001
+ /* ============================================================================
1002
+ * RESPONSIVE
1003
+ * ==========================================================================*/
1004
+ @media (max-width: 600px) {
1005
+ /* .bq-meta { padding: 0.75rem; } */
1006
+ .bq-input-row { flex-direction: column; padding: 0.65rem 0.75rem 0.75rem; }
1007
+ .bq-input-wrap { width: 100%; flex: 0 0 auto; }
1008
+ .bq-input-row .btn { width: 100%; }
1009
+ .bq-bubble { max-width: 100%; }
1010
+ .bq-page { padding: 2rem 1.25rem; }
1011
+ .bq-section-title { padding: 0.75rem; }
1012
+ .bq-messages { padding: 0.25rem 0.75rem; }
1013
+ }
1014
+
1015
+ /* dark-mode: brighten any inline dark SVG icons (e.g. provider logos) */
1016
+ .bq-agent[data-bq-theme="dark"] .bq-icon-invertible,
1017
+ .bq-modal-root[data-bq-theme="dark"] .bq-icon-invertible {
1018
+ filter: invert(var(--bq-icon-invert));
1208
1019
  }