@nextbridgehq/payload-block-builder 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1365 @@
1
+ @import "tailwindcss";
2
+
3
+ /* ── Block Builder — Light theme ──────────────────────────────────────────── */
4
+
5
+ *, *::before, *::after { box-sizing: border-box; }
6
+
7
+ :root {
8
+ --bb-font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
9
+
10
+ /* Surfaces */
11
+ --bb-bg: #f3f4f6;
12
+ --bb-surface-0: #ffffff;
13
+ --bb-surface-1: #ffffff;
14
+ --bb-surface-2: #f9fafb;
15
+ --bb-surface-3: #f3f4f6;
16
+
17
+ /* Borders */
18
+ --bb-border: #e5e7eb;
19
+ --bb-border-mid: #d1d5db;
20
+ --bb-border-strong: #9ca3af;
21
+
22
+ /* Text */
23
+ --bb-text: #111827;
24
+ --bb-text-muted: #374151;
25
+ --bb-text-subtle: #9ca3af;
26
+
27
+ /* Accent — Payload light interactive (dark charcoal, mirrors --theme-elevation-1000) */
28
+ --bb-accent: #111827;
29
+ --bb-accent-dark: #000000;
30
+ --bb-accent-subtle: rgba(17, 24, 39, 0.05);
31
+ --bb-accent-border: rgba(17, 24, 39, 0.18);
32
+
33
+ /* Publish green — kept only for the Publish button */
34
+ --bb-publish: #22c55e;
35
+ --bb-publish-dark: #16a34a;
36
+
37
+ /* Danger */
38
+ --bb-danger: #ef4444;
39
+ --bb-danger-subtle: rgba(239, 68, 68, 0.07);
40
+ --bb-danger-border: rgba(239, 68, 68, 0.3);
41
+
42
+ /* Warning */
43
+ --bb-warning: #f59e0b;
44
+ }
45
+
46
+ /* ── Scrollbars ─────────────────────────────────────────────────────────── */
47
+ ::-webkit-scrollbar { width: 5px; height: 5px; }
48
+ ::-webkit-scrollbar-track { background: transparent; }
49
+ ::-webkit-scrollbar-thumb { background: var(--bb-border-mid); border-radius: 3px; }
50
+ ::-webkit-scrollbar-thumb:hover { background: var(--bb-border-strong); }
51
+
52
+ /* ── Base ───────────────────────────────────────────────────────────────── */
53
+ body {
54
+ background: var(--bb-bg);
55
+ color: var(--bb-text);
56
+ font-family: var(--bb-font);
57
+ -webkit-font-smoothing: antialiased;
58
+ }
59
+
60
+ /* ── Full-screen state (loading / error) ────────────────────────────────── */
61
+ .bb-fullscreen {
62
+ height: 100vh;
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ gap: 8px;
67
+ font-family: var(--bb-font);
68
+ font-size: 14px;
69
+ background: var(--bb-bg);
70
+ }
71
+ .bb-fullscreen--error { color: var(--bb-danger); }
72
+ .bb-fullscreen--loading { color: var(--bb-text-subtle); }
73
+
74
+ /* ── Shell ──────────────────────────────────────────────────────────────── */
75
+ .bb-shell {
76
+ display: flex;
77
+ flex-direction: column;
78
+ height: 100vh;
79
+ background: var(--bb-bg);
80
+ color: var(--bb-text);
81
+ font-family: var(--bb-font);
82
+ overflow: hidden;
83
+ font-size: 14px;
84
+ line-height: 1.5;
85
+ }
86
+
87
+ /* ── Top Bar ────────────────────────────────────────────────────────────── */
88
+ .bb-topbar {
89
+ height: 48px;
90
+ border-bottom: 1px solid var(--bb-border);
91
+ display: flex;
92
+ align-items: center;
93
+ justify-content: space-between;
94
+ padding: 0 20px;
95
+ background: var(--bb-surface-0);
96
+ flex-shrink: 0;
97
+ gap: 12px;
98
+ }
99
+
100
+ .bb-topbar__brand {
101
+ display: flex;
102
+ align-items: center;
103
+ gap: 10px;
104
+ }
105
+
106
+ .bb-topbar__title {
107
+ font-size: 14px;
108
+ font-weight: 600;
109
+ color: var(--bb-text);
110
+ letter-spacing: -0.01em;
111
+ }
112
+
113
+ .bb-topbar__dirty {
114
+ font-size: 11px;
115
+ color: var(--bb-warning);
116
+ font-weight: 500;
117
+ }
118
+
119
+ .bb-topbar__actions {
120
+ display: flex;
121
+ align-items: center;
122
+ gap: 8px;
123
+ }
124
+
125
+ .bb-topbar__status {
126
+ font-size: 12px;
127
+ max-width: 220px;
128
+ overflow: hidden;
129
+ text-overflow: ellipsis;
130
+ white-space: nowrap;
131
+ }
132
+ .bb-topbar__status--ok { color: var(--bb-publish-dark); }
133
+ .bb-topbar__status--error { color: var(--bb-danger); }
134
+
135
+ /* ── Buttons ────────────────────────────────────────────────────────────── */
136
+ .bb-btn {
137
+ display: inline-flex;
138
+ align-items: center;
139
+ justify-content: center;
140
+ gap: 5px;
141
+ border-radius: 5px;
142
+ font-size: 13px;
143
+ font-weight: 500;
144
+ font-family: var(--bb-font);
145
+ cursor: pointer;
146
+ border: 1px solid transparent;
147
+ line-height: 1;
148
+ transition: background 0.1s, border-color 0.1s, color 0.1s, opacity 0.1s;
149
+ white-space: nowrap;
150
+ padding: 0 16px;
151
+ height: 34px;
152
+ }
153
+ .bb-btn:disabled { opacity: 0.45; cursor: not-allowed; }
154
+
155
+ .bb-btn--primary {
156
+ background: var(--bb-publish);
157
+ color: #fff;
158
+ border-color: var(--bb-publish);
159
+ }
160
+ .bb-btn--primary:hover:not(:disabled) { background: var(--bb-publish-dark); border-color: var(--bb-publish-dark); }
161
+
162
+ .bb-btn--secondary {
163
+ background: var(--bb-surface-0);
164
+ color: var(--bb-text-muted);
165
+ border-color: var(--bb-border-mid);
166
+ }
167
+ .bb-btn--secondary:hover:not(:disabled) {
168
+ background: var(--bb-surface-3);
169
+ color: var(--bb-text);
170
+ border-color: var(--bb-border-strong);
171
+ }
172
+
173
+ /* ── Main layout ────────────────────────────────────────────────────────── */
174
+ .bb-main {
175
+ flex: 1;
176
+ display: flex;
177
+ overflow: hidden;
178
+ }
179
+
180
+ /* ── Sidebar panel (BlockList, FieldPalette) ────────────────────────────── */
181
+ .bb-sidebar {
182
+ border-right: 1px solid var(--bb-border);
183
+ display: flex;
184
+ flex-direction: column;
185
+ height: 100%;
186
+ overflow: hidden;
187
+ background: var(--bb-surface-0);
188
+ flex-shrink: 0;
189
+ }
190
+ .bb-sidebar--200 { width: 200px; }
191
+
192
+ .bb-sidebar__header {
193
+ padding: 0 12px;
194
+ height: 40px;
195
+ border-bottom: 1px solid var(--bb-border);
196
+ display: flex;
197
+ align-items: center;
198
+ justify-content: space-between;
199
+ flex-shrink: 0;
200
+ }
201
+
202
+ .bb-sidebar__title {
203
+ font-size: 10px;
204
+ font-weight: 700;
205
+ color: var(--bb-text-subtle);
206
+ text-transform: uppercase;
207
+ letter-spacing: 0.1em;
208
+ }
209
+
210
+ .bb-sidebar__body {
211
+ flex: 1;
212
+ overflow-y: auto;
213
+ padding: 6px;
214
+ }
215
+
216
+ .bb-sidebar__footer {
217
+ padding: 8px 12px;
218
+ border-top: 1px solid var(--bb-border);
219
+ font-size: 11px;
220
+ color: var(--bb-text-subtle);
221
+ text-align: center;
222
+ flex-shrink: 0;
223
+ }
224
+
225
+ .bb-sidebar__add {
226
+ width: 24px;
227
+ height: 24px;
228
+ background: var(--bb-publish);
229
+ border: none;
230
+ border-radius: 4px;
231
+ color: #fff;
232
+ font-size: 18px;
233
+ font-weight: 400;
234
+ cursor: pointer;
235
+ display: flex;
236
+ align-items: center;
237
+ justify-content: center;
238
+ flex-shrink: 0;
239
+ line-height: 1;
240
+ transition: background 0.1s;
241
+ font-family: var(--bb-font);
242
+ }
243
+ .bb-sidebar__add:hover { background: var(--bb-publish-dark); }
244
+
245
+ /* ── Block items ────────────────────────────────────────────────────────── */
246
+ .bb-block-item {
247
+ padding: 7px 9px;
248
+ border-radius: 5px;
249
+ border: 1px solid transparent;
250
+ cursor: pointer;
251
+ transition: background 0.1s, border-color 0.1s;
252
+ margin-bottom: 2px;
253
+ }
254
+ .bb-block-item:hover { background: var(--bb-surface-3); }
255
+ .bb-block-item--active {
256
+ background: var(--bb-accent-subtle);
257
+ border-color: var(--bb-accent-border);
258
+ }
259
+
260
+ .bb-block-item__slug {
261
+ font-size: 12px;
262
+ font-weight: 500;
263
+ color: var(--bb-text);
264
+ overflow: hidden;
265
+ text-overflow: ellipsis;
266
+ white-space: nowrap;
267
+ }
268
+ .bb-block-item--active .bb-block-item__slug { color: var(--bb-accent-dark); }
269
+
270
+ .bb-block-item__meta {
271
+ font-size: 11px;
272
+ color: var(--bb-text-subtle);
273
+ margin-top: 1px;
274
+ }
275
+
276
+ .bb-block-item__actions {
277
+ display: flex;
278
+ gap: 4px;
279
+ margin-top: 5px;
280
+ }
281
+
282
+ .bb-block-action {
283
+ padding: 2px 7px;
284
+ background: transparent;
285
+ border: 1px solid var(--bb-border-mid);
286
+ border-radius: 3px;
287
+ color: var(--bb-text-subtle);
288
+ cursor: pointer;
289
+ font-size: 11px;
290
+ font-family: var(--bb-font);
291
+ transition: border-color 0.1s, color 0.1s, background 0.1s;
292
+ line-height: 1.5;
293
+ }
294
+ .bb-block-action:hover { border-color: var(--bb-border-strong); color: var(--bb-text-muted); }
295
+ .bb-block-action--danger:hover {
296
+ border-color: var(--bb-danger-border);
297
+ color: var(--bb-danger);
298
+ background: var(--bb-danger-subtle);
299
+ }
300
+
301
+ .bb-block-empty {
302
+ font-size: 12px;
303
+ color: var(--bb-text-subtle);
304
+ text-align: center;
305
+ padding: 20px 8px;
306
+ line-height: 1.7;
307
+ }
308
+
309
+ /* ── Field palette ──────────────────────────────────────────────────────── */
310
+ .bb-palette__search-wrap {
311
+ padding: 8px;
312
+ border-bottom: 1px solid var(--bb-border);
313
+ }
314
+ .bb-palette__search {
315
+ width: 100%;
316
+ height: 32px;
317
+ padding: 0 10px;
318
+ background: var(--bb-surface-0);
319
+ border: 1px solid var(--bb-border-mid);
320
+ border-radius: 5px;
321
+ color: var(--bb-text);
322
+ font-size: 12px;
323
+ font-family: var(--bb-font);
324
+ outline: none;
325
+ transition: border-color 0.1s;
326
+ box-sizing: border-box;
327
+ }
328
+ .bb-palette__search:focus { border-color: var(--bb-border-strong); }
329
+ .bb-palette__search::placeholder { color: var(--bb-text-subtle); }
330
+
331
+ .bb-palette__cat-label {
332
+ font-size: 9px;
333
+ font-weight: 700;
334
+ color: var(--bb-text-subtle);
335
+ text-transform: uppercase;
336
+ letter-spacing: 0.12em;
337
+ padding: 10px 6px 3px;
338
+ }
339
+
340
+ .bb-palette__items {
341
+ display: flex;
342
+ flex-direction: column;
343
+ gap: 1px;
344
+ }
345
+
346
+ .bb-palette__item {
347
+ display: flex;
348
+ align-items: center;
349
+ gap: 7px;
350
+ padding: 5px 6px;
351
+ border-radius: 4px;
352
+ border: 1px solid transparent;
353
+ cursor: pointer;
354
+ width: 100%;
355
+ background: transparent;
356
+ color: var(--bb-text-muted);
357
+ font-size: 12px;
358
+ font-family: var(--bb-font);
359
+ text-align: left;
360
+ transition: background 0.1s, color 0.1s;
361
+ line-height: 1.4;
362
+ justify-content: space-between;
363
+ }
364
+ .bb-palette__item:hover:not(:disabled) {
365
+ background: var(--bb-surface-3);
366
+ color: var(--bb-text);
367
+ }
368
+ .bb-palette__item:disabled { opacity: 0.4; cursor: not-allowed; }
369
+
370
+ .bb-palette__item__icon {
371
+ flex-shrink: 0;
372
+ width: 16px;
373
+ display: flex;
374
+ align-items: center;
375
+ justify-content: center;
376
+ color: var(--bb-text-subtle);
377
+ }
378
+ .bb-palette__item__label {
379
+ flex: 1;
380
+ overflow: hidden;
381
+ text-overflow: ellipsis;
382
+ white-space: nowrap;
383
+ color: var(--bb-text-muted);
384
+ font-size: 12px;
385
+ }
386
+ .bb-palette__item__type {
387
+ font-size: 10px;
388
+ color: var(--bb-text-subtle);
389
+ flex-shrink: 0;
390
+ letter-spacing: 0.01em;
391
+ }
392
+ .bb-palette__item:hover:not(:disabled) .bb-palette__item__icon { color: var(--bb-text-muted); }
393
+ .bb-palette__item:hover:not(:disabled) .bb-palette__item__label { color: var(--bb-text); }
394
+ .bb-palette__item:hover:not(:disabled) .bb-palette__item__type { color: var(--bb-text-subtle); }
395
+
396
+ /* ── Canvas ─────────────────────────────────────────────────────────────── */
397
+ .bb-canvas {
398
+ flex: 1;
399
+ overflow: auto;
400
+ padding: 20px 16px;
401
+ background: var(--bb-bg);
402
+ }
403
+
404
+ .bb-canvas__inner {
405
+ max-width: 100%;
406
+ margin: 0 auto;
407
+ }
408
+
409
+ .bb-canvas__header {
410
+ font-size: 11px;
411
+ font-weight: 700;
412
+ color: var(--bb-text-subtle);
413
+ text-transform: uppercase;
414
+ letter-spacing: 0.08em;
415
+ margin-bottom: 12px;
416
+ }
417
+
418
+ .bb-canvas__empty {
419
+ padding: 36px 24px;
420
+ border: 2px dashed var(--bb-border-mid);
421
+ border-radius: 8px;
422
+ text-align: center;
423
+ color: var(--bb-text-subtle);
424
+ font-size: 13px;
425
+ line-height: 1.7;
426
+ }
427
+
428
+ .bb-canvas__no-block {
429
+ flex: 1;
430
+ display: flex;
431
+ align-items: center;
432
+ justify-content: center;
433
+ color: var(--bb-text-subtle);
434
+ font-size: 13px;
435
+ }
436
+
437
+ .bb-canvas__field-list {
438
+ display: flex;
439
+ flex-direction: column;
440
+ gap: 6px;
441
+ }
442
+
443
+ /* ── Field Card ─────────────────────────────────────────────────────────── */
444
+ .bb-field-card-wrap--dragging { opacity: 0.5; }
445
+
446
+ .bb-field-card {
447
+ display: flex;
448
+ align-items: center;
449
+ gap: 10px;
450
+ padding: 9px 12px;
451
+ border: 1px solid var(--bb-border);
452
+ border-radius: 6px;
453
+ background: var(--bb-surface-0);
454
+ cursor: pointer;
455
+ user-select: none;
456
+ transition: border-color 0.12s, box-shadow 0.12s;
457
+ }
458
+ .bb-field-card:hover {
459
+ border-color: var(--bb-border-mid);
460
+ box-shadow: 0 1px 3px rgba(0,0,0,0.06);
461
+ }
462
+ .bb-field-card--active {
463
+ border-color: var(--bb-accent-border);
464
+ background: var(--bb-accent-subtle);
465
+ }
466
+
467
+ .bb-field-card__icon { font-size: 15px; flex-shrink: 0; width: 22px; text-align: center; color: var(--bb-text-subtle); }
468
+
469
+ .bb-field-card__body { flex: 1; min-width: 0; }
470
+
471
+ .bb-field-card__name {
472
+ font-size: 13px;
473
+ font-weight: 500;
474
+ color: var(--bb-text);
475
+ overflow: hidden;
476
+ text-overflow: ellipsis;
477
+ white-space: nowrap;
478
+ }
479
+ .bb-field-card__name--empty { font-style: italic; color: var(--bb-text-subtle); opacity: 0.7; }
480
+
481
+ .bb-field-card__type {
482
+ font-size: 11px;
483
+ color: var(--bb-text-subtle);
484
+ display: flex;
485
+ align-items: center;
486
+ gap: 4px;
487
+ margin-top: 1px;
488
+ }
489
+ .bb-field-card__required { color: var(--bb-danger); font-weight: 600; }
490
+
491
+ .bb-field-card__index {
492
+ font-size: 10px;
493
+ color: var(--bb-text-subtle);
494
+ flex-shrink: 0;
495
+ min-width: 20px;
496
+ text-align: right;
497
+ font-variant-numeric: tabular-nums;
498
+ }
499
+
500
+ .bb-field-card__delete {
501
+ width: 24px;
502
+ height: 24px;
503
+ padding: 0;
504
+ background: transparent;
505
+ border: 1px solid transparent;
506
+ border-radius: 4px;
507
+ color: var(--bb-text-subtle);
508
+ cursor: pointer;
509
+ font-size: 11px;
510
+ flex-shrink: 0;
511
+ display: flex;
512
+ align-items: center;
513
+ justify-content: center;
514
+ transition: background 0.1s, border-color 0.1s, color 0.1s;
515
+ font-family: var(--bb-font);
516
+ line-height: 1;
517
+ }
518
+ .bb-field-card__delete:hover {
519
+ background: var(--bb-danger-subtle);
520
+ border-color: var(--bb-danger-border);
521
+ color: var(--bb-danger);
522
+ }
523
+
524
+ /* ── Config Panel ───────────────────────────────────────────────────────── */
525
+ .bb-config {
526
+ width: 280px;
527
+ border-left: 1px solid var(--bb-border);
528
+ display: flex;
529
+ flex-direction: column;
530
+ height: 100%;
531
+ overflow: hidden;
532
+ background: var(--bb-surface-0);
533
+ flex-shrink: 0;
534
+ }
535
+
536
+ .bb-config__tabs {
537
+ display: flex;
538
+ border-bottom: 1px solid var(--bb-border);
539
+ flex-shrink: 0;
540
+ }
541
+
542
+ .bb-config__tab {
543
+ flex: 1;
544
+ height: 40px;
545
+ background: transparent;
546
+ border: none;
547
+ border-bottom: 2px solid transparent;
548
+ color: var(--bb-text-subtle);
549
+ font-size: 12px;
550
+ font-weight: 500;
551
+ font-family: var(--bb-font);
552
+ cursor: pointer;
553
+ letter-spacing: 0.02em;
554
+ transition: color 0.1s, border-color 0.1s;
555
+ }
556
+ .bb-config__tab:hover { color: var(--bb-text-muted); }
557
+ .bb-config__tab--active {
558
+ color: var(--bb-text);
559
+ border-bottom-color: var(--bb-text);
560
+ }
561
+
562
+ .bb-config__body {
563
+ flex: 1;
564
+ overflow-y: auto;
565
+ }
566
+
567
+ /* ── Config forms ───────────────────────────────────────────────────────── */
568
+ .bb-form {
569
+ padding: 14px;
570
+ display: flex;
571
+ flex-direction: column;
572
+ gap: 14px;
573
+ }
574
+
575
+ .bb-form__empty {
576
+ padding: 16px 14px;
577
+ font-size: 13px;
578
+ color: var(--bb-text-subtle);
579
+ }
580
+
581
+ .bb-form__section {
582
+ display: flex;
583
+ flex-direction: column;
584
+ gap: 4px;
585
+ }
586
+
587
+ .bb-form__label {
588
+ display: block;
589
+ font-size: 10px;
590
+ font-weight: 600;
591
+ color: var(--bb-text-subtle);
592
+ letter-spacing: 0.06em;
593
+ margin-bottom: 4px;
594
+ text-transform: uppercase;
595
+ }
596
+
597
+ .bb-form__hint {
598
+ font-size: 11px;
599
+ color: var(--bb-text-subtle);
600
+ margin-top: 3px;
601
+ line-height: 1.4;
602
+ }
603
+
604
+ .bb-input {
605
+ width: 100%;
606
+ height: 34px;
607
+ padding: 0 10px;
608
+ background: var(--bb-surface-0);
609
+ border: 1px solid var(--bb-border-mid);
610
+ border-radius: 5px;
611
+ color: var(--bb-text);
612
+ font-size: 13px;
613
+ font-family: var(--bb-font);
614
+ outline: none;
615
+ transition: border-color 0.1s;
616
+ box-sizing: border-box;
617
+ }
618
+ .bb-input:hover:not(:disabled) { border-color: var(--bb-border-strong); }
619
+ .bb-input:focus { border-color: var(--bb-border-strong); }
620
+ .bb-input::placeholder { color: var(--bb-text-subtle); }
621
+ .bb-input:disabled { opacity: 0.5; cursor: not-allowed; background: var(--bb-surface-2); }
622
+
623
+ .bb-select {
624
+ cursor: pointer;
625
+ appearance: none;
626
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
627
+ background-repeat: no-repeat;
628
+ background-position: right 10px center;
629
+ padding-right: 28px;
630
+ }
631
+ .bb-select option { background: var(--bb-surface-0); color: var(--bb-text); }
632
+
633
+ .bb-grid-2 {
634
+ display: grid;
635
+ grid-template-columns: 1fr 1fr;
636
+ gap: 8px;
637
+ }
638
+
639
+ .bb-flags-row {
640
+ display: flex;
641
+ gap: 16px;
642
+ flex-wrap: wrap;
643
+ }
644
+
645
+ .bb-checkbox-row {
646
+ display: flex;
647
+ align-items: center;
648
+ gap: 7px;
649
+ cursor: pointer;
650
+ font-size: 13px;
651
+ color: var(--bb-text-muted);
652
+ }
653
+ .bb-checkbox-row input[type='checkbox'] {
654
+ width: 14px;
655
+ height: 14px;
656
+ cursor: pointer;
657
+ accent-color: var(--bb-text);
658
+ flex-shrink: 0;
659
+ }
660
+
661
+ .bb-stat-box {
662
+ padding: 8px 10px;
663
+ background: var(--bb-surface-2);
664
+ border-radius: 5px;
665
+ font-size: 12px;
666
+ color: var(--bb-text-subtle);
667
+ border: 1px solid var(--bb-border);
668
+ }
669
+ .bb-stat-box strong { color: var(--bb-text-muted); }
670
+
671
+ /* Options list */
672
+ .bb-options-label {
673
+ font-size: 9px;
674
+ font-weight: 700;
675
+ color: var(--bb-text-subtle);
676
+ text-transform: uppercase;
677
+ letter-spacing: 0.1em;
678
+ margin-bottom: 6px;
679
+ }
680
+ .bb-option-row {
681
+ display: grid;
682
+ grid-template-columns: 1fr 1fr auto;
683
+ gap: 5px;
684
+ margin-bottom: 5px;
685
+ align-items: center;
686
+ }
687
+ .bb-option-delete {
688
+ width: 34px;
689
+ height: 34px;
690
+ background: transparent;
691
+ border: 1px solid var(--bb-border-mid);
692
+ border-radius: 5px;
693
+ color: var(--bb-text-subtle);
694
+ cursor: pointer;
695
+ display: flex;
696
+ align-items: center;
697
+ justify-content: center;
698
+ font-size: 11px;
699
+ font-family: var(--bb-font);
700
+ transition: border-color 0.1s, color 0.1s, background 0.1s;
701
+ }
702
+ .bb-option-delete:hover {
703
+ border-color: var(--bb-danger-border);
704
+ color: var(--bb-danger);
705
+ background: var(--bb-danger-subtle);
706
+ }
707
+
708
+ .bb-add-option {
709
+ padding: 4px 10px;
710
+ background: transparent;
711
+ border: 1px solid var(--bb-border-mid);
712
+ border-radius: 5px;
713
+ color: var(--bb-text-subtle);
714
+ cursor: pointer;
715
+ font-size: 12px;
716
+ font-family: var(--bb-font);
717
+ transition: border-color 0.1s, color 0.1s;
718
+ margin-top: 2px;
719
+ }
720
+ .bb-add-option:hover { border-color: var(--bb-border-strong); color: var(--bb-text-muted); }
721
+
722
+ /* ── Footer / Code Preview ──────────────────────────────────────────────── */
723
+ .bb-footer {
724
+ border-top: 1px solid var(--bb-border);
725
+ flex-shrink: 0;
726
+ background: var(--bb-surface-0);
727
+ }
728
+
729
+ .bb-footer__toggle {
730
+ width: 100%;
731
+ padding: 6px 16px;
732
+ background: transparent;
733
+ border: none;
734
+ border-bottom: 1px solid transparent;
735
+ color: var(--bb-text-subtle);
736
+ font-size: 11px;
737
+ font-family: var(--bb-font);
738
+ cursor: pointer;
739
+ text-align: left;
740
+ display: flex;
741
+ align-items: center;
742
+ gap: 6px;
743
+ letter-spacing: 0.02em;
744
+ transition: color 0.1s;
745
+ }
746
+ .bb-footer__toggle:hover { color: var(--bb-text-muted); }
747
+ .bb-footer__toggle--open { border-bottom-color: var(--bb-border); color: var(--bb-text-muted); }
748
+
749
+ .bb-footer__content {
750
+ height: 280px;
751
+ overflow: hidden;
752
+ }
753
+
754
+ /* ── Code preview syntax ────────────────────────────────────────────────── */
755
+ .code-preview {
756
+ background: #1e293b;
757
+ font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
758
+ }
759
+ .token-keyword { color: #c792ea; }
760
+ .token-string { color: #c3e88d; }
761
+ .token-comment { color: #546e7a; font-style: italic; }
762
+ .token-type { color: #82aaff; }
763
+ .token-number { color: #f78c6c; }
764
+ .token-punct { color: #89ddff; }
765
+ .token-plain { color: #f1f5f9; }
766
+
767
+ /* ── Panel animation ────────────────────────────────────────────────────── */
768
+ @keyframes panel-enter {
769
+ from { opacity: 0; transform: translateX(8px); }
770
+ to { opacity: 1; transform: translateX(0); }
771
+ }
772
+ .panel-enter { animation: panel-enter 0.15s ease-out; }
773
+
774
+ /* ── Notification overlay ───────────────────────────────────────────────── */
775
+ @keyframes bb-notify-in {
776
+ from { opacity: 0; transform: translateY(-12px) scale(0.97); }
777
+ to { opacity: 1; transform: translateY(0) scale(1); }
778
+ }
779
+
780
+ .bb-notify {
781
+ position: fixed;
782
+ top: 56px; /* below topbar */
783
+ left: 50%;
784
+ transform: translateX(-50%);
785
+ z-index: 9999;
786
+ width: min(520px, 90vw);
787
+ animation: bb-notify-in 0.2s ease-out;
788
+ }
789
+
790
+ .bb-notify__box {
791
+ display: flex;
792
+ align-items: flex-start;
793
+ gap: 12px;
794
+ padding: 16px 18px;
795
+ border-radius: 8px;
796
+ border: 1px solid transparent;
797
+ box-shadow: 0 8px 32px rgba(0,0,0,0.18);
798
+ background: #1e1e2e;
799
+ }
800
+
801
+ /* publishing */
802
+ .bb-notify--publishing .bb-notify__box {
803
+ border-color: #3b82f6;
804
+ background: #1e2a3a;
805
+ }
806
+
807
+ /* success */
808
+ .bb-notify--success .bb-notify__box {
809
+ border-color: #22c55e;
810
+ background: #162318;
811
+ }
812
+
813
+ /* error */
814
+ .bb-notify--error .bb-notify__box {
815
+ border-color: #ef4444;
816
+ background: #2a1414;
817
+ }
818
+
819
+ .bb-notify__icon {
820
+ flex-shrink: 0;
821
+ width: 24px;
822
+ height: 24px;
823
+ border-radius: 50%;
824
+ display: flex;
825
+ align-items: center;
826
+ justify-content: center;
827
+ font-size: 13px;
828
+ font-weight: 700;
829
+ margin-top: 1px;
830
+ }
831
+
832
+ .bb-notify--success .bb-notify__icon {
833
+ background: #22c55e;
834
+ color: #fff;
835
+ }
836
+
837
+ .bb-notify--error .bb-notify__icon {
838
+ background: #ef4444;
839
+ color: #fff;
840
+ }
841
+
842
+ .bb-notify__body {
843
+ flex: 1;
844
+ min-width: 0;
845
+ }
846
+
847
+ .bb-notify__title {
848
+ margin: 0 0 2px;
849
+ font-size: 14px;
850
+ font-weight: 600;
851
+ color: #f1f5f9;
852
+ line-height: 1.3;
853
+ }
854
+
855
+ .bb-notify__sub {
856
+ margin: 0;
857
+ font-size: 12px;
858
+ color: #94a3b8;
859
+ line-height: 1.4;
860
+ }
861
+
862
+ .bb-notify__error-list {
863
+ margin: 8px 0 0;
864
+ padding: 0 0 0 16px;
865
+ list-style: disc;
866
+ display: flex;
867
+ flex-direction: column;
868
+ gap: 4px;
869
+ }
870
+
871
+ .bb-notify__error-list li {
872
+ font-size: 12px;
873
+ color: #fca5a5;
874
+ line-height: 1.4;
875
+ word-break: break-word;
876
+ }
877
+
878
+ .bb-notify__close {
879
+ flex-shrink: 0;
880
+ background: none;
881
+ border: none;
882
+ color: #64748b;
883
+ cursor: pointer;
884
+ font-size: 14px;
885
+ padding: 2px 4px;
886
+ line-height: 1;
887
+ border-radius: 4px;
888
+ transition: color 0.15s;
889
+ margin-top: -2px;
890
+ }
891
+ .bb-notify__close:hover { color: #f1f5f9; }
892
+
893
+ /* spinner for publishing state */
894
+ @keyframes bb-spin {
895
+ to { transform: rotate(360deg); }
896
+ }
897
+ .bb-notify__spinner {
898
+ flex-shrink: 0;
899
+ width: 20px;
900
+ height: 20px;
901
+ border: 2px solid #3b82f630;
902
+ border-top-color: #3b82f6;
903
+ border-radius: 50%;
904
+ animation: bb-spin 0.7s linear infinite;
905
+ margin-top: 2px;
906
+ }
907
+
908
+ /* ── Warning button (restore as new version) ────────────────────────────── */
909
+ .bb-btn--warning {
910
+ background: #f59e0b;
911
+ color: #fff;
912
+ border-color: #f59e0b;
913
+ }
914
+ .bb-btn--warning:hover:not(:disabled) { background: #d97706; border-color: #d97706; }
915
+
916
+ /* ── Read-only banner ───────────────────────────────────────────────────── */
917
+ .bb-readonly-banner {
918
+ display: flex;
919
+ align-items: center;
920
+ gap: 8px;
921
+ padding: 7px 20px;
922
+ background: #fffbeb;
923
+ border-bottom: 1px solid #fde68a;
924
+ font-size: 12px;
925
+ color: #92400e;
926
+ flex-shrink: 0;
927
+ }
928
+ .bb-readonly-banner__icon { font-size: 14px; }
929
+ .bb-readonly-banner__btn {
930
+ background: none;
931
+ border: none;
932
+ color: #b45309;
933
+ font-size: 12px;
934
+ font-weight: 600;
935
+ cursor: pointer;
936
+ text-decoration: underline;
937
+ padding: 0 4px;
938
+ font-family: var(--bb-font);
939
+ }
940
+ .bb-readonly-banner__btn:hover { color: #92400e; }
941
+
942
+ /* ── Read-only canvas ───────────────────────────────────────────────────── */
943
+ .bb-canvas--readonly { pointer-events: none; user-select: none; opacity: 0.7; }
944
+
945
+ /* ── Read-only field palette ────────────────────────────────────────────── */
946
+ .bb-sidebar--readonly {
947
+ opacity: 0.5;
948
+ pointer-events: none;
949
+ }
950
+
951
+ /* ── Read-only config panel overlay ────────────────────────────────────── */
952
+ .bb-config--readonly { position: relative; }
953
+ .bb-config__readonly-overlay {
954
+ position: absolute;
955
+ inset: 0;
956
+ background: rgba(255, 255, 255, 0.72);
957
+ display: flex;
958
+ align-items: center;
959
+ justify-content: center;
960
+ z-index: 10;
961
+ backdrop-filter: blur(1px);
962
+ }
963
+ .bb-config__readonly-label {
964
+ font-size: 11px;
965
+ font-weight: 600;
966
+ color: var(--bb-text-subtle);
967
+ letter-spacing: 0.06em;
968
+ text-transform: uppercase;
969
+ padding: 5px 12px;
970
+ border: 1px solid var(--bb-border-mid);
971
+ border-radius: 4px;
972
+ background: var(--bb-surface-0);
973
+ }
974
+
975
+ /* ── Version selector (TopBar dropdown) ─────────────────────────────────── */
976
+ .bb-version-selector {
977
+ position: relative;
978
+ flex-shrink: 0;
979
+ }
980
+
981
+ .bb-version-selector__trigger {
982
+ display: inline-flex;
983
+ align-items: center;
984
+ gap: 6px;
985
+ height: 30px;
986
+ padding: 0 10px;
987
+ border: 1px solid var(--bb-border-mid);
988
+ border-radius: 5px;
989
+ background: var(--bb-surface-0);
990
+ color: var(--bb-text-muted);
991
+ font-size: 12px;
992
+ font-weight: 500;
993
+ font-family: var(--bb-font);
994
+ cursor: pointer;
995
+ transition: border-color 0.1s, background 0.1s;
996
+ white-space: nowrap;
997
+ }
998
+ .bb-version-selector__trigger:hover {
999
+ border-color: var(--bb-border-strong);
1000
+ background: var(--bb-surface-3);
1001
+ }
1002
+ .bb-version-selector__trigger--readonly {
1003
+ border-color: #fde68a;
1004
+ background: #fffbeb;
1005
+ color: #92400e;
1006
+ }
1007
+
1008
+ .bb-version-selector__dot {
1009
+ width: 7px;
1010
+ height: 7px;
1011
+ border-radius: 50%;
1012
+ flex-shrink: 0;
1013
+ }
1014
+ .bb-version-selector__dot--current { background: #22c55e; }
1015
+ .bb-version-selector__dot--old { background: #d1d5db; }
1016
+
1017
+ .bb-version-selector__badge {
1018
+ font-size: 10px;
1019
+ font-weight: 600;
1020
+ color: #16a34a;
1021
+ background: #dcfce7;
1022
+ border-radius: 3px;
1023
+ padding: 1px 5px;
1024
+ line-height: 1.4;
1025
+ }
1026
+
1027
+ .bb-version-selector__chevron {
1028
+ font-size: 10px;
1029
+ color: var(--bb-text-subtle);
1030
+ margin-left: 2px;
1031
+ }
1032
+
1033
+ /* ── Version dropdown menu ──────────────────────────────────────────────── */
1034
+ .bb-version-dropdown {
1035
+ position: absolute;
1036
+ top: calc(100% + 4px);
1037
+ left: 0;
1038
+ min-width: 260px;
1039
+ max-height: 300px;
1040
+ overflow-y: auto;
1041
+ background: var(--bb-surface-0);
1042
+ border: 1px solid var(--bb-border-mid);
1043
+ border-radius: 6px;
1044
+ box-shadow: 0 4px 16px rgba(0,0,0,0.10);
1045
+ z-index: 100;
1046
+ }
1047
+
1048
+ .bb-version-dropdown__header {
1049
+ padding: 8px 12px 6px;
1050
+ font-size: 10px;
1051
+ font-weight: 700;
1052
+ letter-spacing: 0.06em;
1053
+ text-transform: uppercase;
1054
+ color: var(--bb-text-subtle);
1055
+ border-bottom: 1px solid var(--bb-border);
1056
+ }
1057
+
1058
+ .bb-version-dropdown__item {
1059
+ display: flex;
1060
+ align-items: center;
1061
+ gap: 8px;
1062
+ width: 100%;
1063
+ padding: 8px 12px;
1064
+ background: none;
1065
+ border: none;
1066
+ border-bottom: 1px solid var(--bb-border);
1067
+ font-size: 12px;
1068
+ font-family: var(--bb-font);
1069
+ color: var(--bb-text-muted);
1070
+ cursor: pointer;
1071
+ text-align: left;
1072
+ transition: background 0.1s;
1073
+ }
1074
+ .bb-version-dropdown__item:last-child { border-bottom: none; }
1075
+ .bb-version-dropdown__item:hover { background: var(--bb-surface-3); }
1076
+ .bb-version-dropdown__item--active { background: var(--bb-accent-subtle); color: var(--bb-text); }
1077
+
1078
+ .bb-version-dropdown__label {
1079
+ display: flex;
1080
+ align-items: center;
1081
+ gap: 5px;
1082
+ flex: 1;
1083
+ font-weight: 500;
1084
+ min-width: 0;
1085
+ }
1086
+
1087
+ .bb-version-dropdown__meta {
1088
+ font-size: 11px;
1089
+ color: var(--bb-text-subtle);
1090
+ white-space: nowrap;
1091
+ flex-shrink: 0;
1092
+ }
1093
+
1094
+ /* ── Block picker (TopBar) ──────────────────────────────────────────────── */
1095
+
1096
+ .bb-topbar__selectors {
1097
+ display: flex;
1098
+ gap: 10px;
1099
+ flex-direction: row;
1100
+ align-items: self-start;
1101
+ min-width: 640px;
1102
+ }
1103
+
1104
+ .bb-block-picker {
1105
+ position: relative;
1106
+ flex-shrink: 0;
1107
+ }
1108
+
1109
+ .bb-block-picker__trigger {
1110
+ display: inline-flex;
1111
+ align-items: center;
1112
+ gap: 6px;
1113
+ height: 30px;
1114
+ padding: 0 10px;
1115
+ border: 1px solid var(--bb-border-mid);
1116
+ border-radius: 5px;
1117
+ background: var(--bb-surface-0);
1118
+ color: var(--bb-text);
1119
+ font-size: 13px;
1120
+ font-weight: 600;
1121
+ font-family: var(--bb-font);
1122
+ cursor: pointer;
1123
+ transition: border-color 0.1s, background 0.1s;
1124
+ white-space: nowrap;
1125
+ max-width: 220px;
1126
+ }
1127
+ .bb-block-picker__trigger:hover {
1128
+ border-color: var(--bb-border-strong);
1129
+ background: var(--bb-surface-3);
1130
+ }
1131
+
1132
+ .bb-block-picker__icon {
1133
+ font-size: 12px;
1134
+ color: var(--bb-text-subtle);
1135
+ flex-shrink: 0;
1136
+ }
1137
+
1138
+ .bb-block-picker__dropdown {
1139
+ position: absolute;
1140
+ top: calc(100% + 4px);
1141
+ left: 0;
1142
+ min-width: 220px;
1143
+ max-height: 280px;
1144
+ overflow-y: auto;
1145
+ background: var(--bb-surface-0);
1146
+ border: 1px solid var(--bb-border-mid);
1147
+ border-radius: 6px;
1148
+ box-shadow: 0 4px 16px rgba(0,0,0,0.10);
1149
+ z-index: 100;
1150
+ }
1151
+
1152
+ .bb-block-picker__item-name {
1153
+ flex: 1;
1154
+ font-weight: 500;
1155
+ text-align: left;
1156
+ overflow: hidden;
1157
+ text-overflow: ellipsis;
1158
+ white-space: nowrap;
1159
+ }
1160
+
1161
+ /* ── Inline loading / error bars ────────────────────────────────────────── */
1162
+ .bb-loading-bar {
1163
+ padding: 6px 20px;
1164
+ font-size: 12px;
1165
+ color: var(--bb-text-subtle);
1166
+ background: var(--bb-surface-3);
1167
+ border-bottom: 1px solid var(--bb-border);
1168
+ flex-shrink: 0;
1169
+ }
1170
+
1171
+ .bb-error-bar {
1172
+ padding: 6px 20px;
1173
+ font-size: 12px;
1174
+ color: var(--bb-danger);
1175
+ background: var(--bb-danger-subtle);
1176
+ border-bottom: 1px solid var(--bb-danger-border);
1177
+ flex-shrink: 0;
1178
+ }
1179
+
1180
+ /* ── Main center column (palette + canvas) ──────────────────────────────── */
1181
+ .bb-main__center {
1182
+ flex: 1;
1183
+ display: flex;
1184
+ overflow: hidden;
1185
+ }
1186
+
1187
+ /* ── Mobile nav (hidden on desktop) ────────────────────────────────────── */
1188
+ .bb-mobile-nav { display: none; }
1189
+
1190
+ /* ── Responsive — Tablet (640–1023px) ───────────────────────────────────── */
1191
+ @media (max-width: 1023px) {
1192
+ .bb-topbar__selectors {
1193
+ min-width: 0;
1194
+ overflow-x: auto;
1195
+ -webkit-overflow-scrolling: touch;
1196
+ }
1197
+ .bb-sidebar--200 { width: 170px; }
1198
+ .bb-config { width: 240px; }
1199
+ .bb-block-picker__trigger { max-width: 180px; }
1200
+ }
1201
+
1202
+ /* ── Responsive — Mobile (<640px) ───────────────────────────────────────── */
1203
+ @media (max-width: 639px) {
1204
+ /* Topbar: 2-row layout */
1205
+ .bb-topbar {
1206
+ height: auto;
1207
+ min-height: 48px;
1208
+ flex-wrap: wrap;
1209
+ padding: 0 12px 8px;
1210
+ gap: 0;
1211
+ justify-content: flex-start;
1212
+ align-items: flex-start;
1213
+ }
1214
+ .bb-topbar__brand {
1215
+ flex: 1;
1216
+ height: 48px;
1217
+ display: flex;
1218
+ align-items: center;
1219
+ min-width: 0;
1220
+ overflow: hidden;
1221
+ }
1222
+ .bb-topbar__title {
1223
+ overflow: hidden;
1224
+ text-overflow: ellipsis;
1225
+ white-space: nowrap;
1226
+ }
1227
+ .bb-topbar__status {
1228
+ max-width: none;
1229
+ font-size: 11px;
1230
+ }
1231
+ .bb-topbar__actions {
1232
+ height: 48px;
1233
+ display: flex;
1234
+ align-items: center;
1235
+ gap: 6px;
1236
+ }
1237
+ /* Selectors row: allow dropdowns to escape downward, wrap if needed */
1238
+ .bb-topbar__selectors {
1239
+ order: 3;
1240
+ width: 100%;
1241
+ min-width: 0;
1242
+ overflow: visible;
1243
+ padding: 0 0 4px;
1244
+ align-items: center;
1245
+ gap: 8px;
1246
+ flex-wrap: wrap;
1247
+ }
1248
+
1249
+ /* Constrain picker triggers to keep them in one row on narrow screens */
1250
+ .bb-block-picker__trigger {
1251
+ max-width: calc(60vw - 20px);
1252
+ min-width: 0;
1253
+ }
1254
+ .bb-version-selector__trigger {
1255
+ max-width: calc(40vw - 20px);
1256
+ min-width: 0;
1257
+ }
1258
+
1259
+ /* Dropdowns: cap width to viewport so they never overflow the edge */
1260
+ .bb-version-dropdown,
1261
+ .bb-block-picker__dropdown {
1262
+ max-width: calc(100vw - 24px);
1263
+ min-width: 0;
1264
+ }
1265
+
1266
+ /* Buttons: proper 44px touch targets */
1267
+ .bb-btn { height: 44px; padding: 0 14px; font-size: 13px; }
1268
+
1269
+ /* Main: panel-tab switching — each panel fills full width when active */
1270
+ .bb-main__center { width: 100%; }
1271
+
1272
+ /* Hide blocks sidebar and config by default on mobile */
1273
+ .bb-sidebar--blocks { display: none; }
1274
+ .bb-config { display: none; width: 0; border-left: none; }
1275
+
1276
+ /* Blocks tab */
1277
+ .bb-main[data-mobile-panel='blocks'] .bb-sidebar--blocks {
1278
+ display: flex;
1279
+ width: 100%;
1280
+ border-right: none;
1281
+ }
1282
+ .bb-main[data-mobile-panel='blocks'] .bb-main__center { display: none; }
1283
+ .bb-main[data-mobile-panel='blocks'] .bb-config { display: none; }
1284
+
1285
+ /* Canvas tab — palette hidden, canvas visible */
1286
+ .bb-sidebar--palette { display: none; }
1287
+ .bb-main[data-mobile-panel='canvas'] .bb-sidebar--palette { display: none; }
1288
+ .bb-main[data-mobile-panel='canvas'] .bb-canvas { display: flex; flex: 1; }
1289
+
1290
+ /* Palette tab */
1291
+ .bb-main[data-mobile-panel='palette'] .bb-sidebar--palette {
1292
+ display: flex;
1293
+ width: 100%;
1294
+ border-right: none;
1295
+ }
1296
+ .bb-main[data-mobile-panel='palette'] .bb-canvas { display: none; }
1297
+
1298
+ /* Config tab */
1299
+ .bb-main[data-mobile-panel='config'] .bb-config {
1300
+ display: flex;
1301
+ width: 100%;
1302
+ border-left: none;
1303
+ }
1304
+ .bb-main[data-mobile-panel='config'] .bb-main__center { display: none; }
1305
+
1306
+ /* Canvas: less padding on small screens */
1307
+ .bb-canvas { padding: 12px 8px; }
1308
+
1309
+ /* Field cards: larger touch targets */
1310
+ .bb-field-card { padding: 11px 10px; gap: 8px; }
1311
+ .bb-field-card__delete { width: 36px; height: 36px; }
1312
+
1313
+ /* Block actions: better touch target height */
1314
+ .bb-block-action { padding: 5px 9px; font-size: 12px; }
1315
+
1316
+ /* Code preview: shorter on mobile */
1317
+ .bb-footer__content { height: 180px; }
1318
+
1319
+ /* Notify overlay: full width */
1320
+ .bb-notify { width: 94vw; }
1321
+
1322
+ /* Readonly banner: more compact */
1323
+ .bb-readonly-banner { padding: 6px 12px; font-size: 11px; }
1324
+
1325
+ /* Mobile nav: iOS safe-area support + 44px touch target */
1326
+ .bb-mobile-nav {
1327
+ display: flex;
1328
+ height: calc(56px + env(safe-area-inset-bottom, 0px));
1329
+ border-top: 1px solid var(--bb-border);
1330
+ background: var(--bb-surface-0);
1331
+ flex-shrink: 0;
1332
+ padding-bottom: env(safe-area-inset-bottom, 0px);
1333
+ }
1334
+ .bb-mobile-nav__tab {
1335
+ flex: 1;
1336
+ display: flex;
1337
+ flex-direction: column;
1338
+ align-items: center;
1339
+ justify-content: center;
1340
+ gap: 3px;
1341
+ background: none;
1342
+ border: none;
1343
+ cursor: pointer;
1344
+ font-size: 10px;
1345
+ font-family: var(--bb-font);
1346
+ color: var(--bb-text-subtle);
1347
+ letter-spacing: 0.02em;
1348
+ padding: 8px 4px 6px;
1349
+ transition: color 0.1s, background 0.1s;
1350
+ line-height: 1;
1351
+ min-height: 44px;
1352
+ touch-action: manipulation;
1353
+ }
1354
+ .bb-mobile-nav__tab:hover { background: var(--bb-surface-3); }
1355
+ .bb-mobile-nav__tab--active {
1356
+ color: var(--bb-text);
1357
+ background: var(--bb-accent-subtle);
1358
+ }
1359
+ .bb-mobile-nav__icon {
1360
+ font-size: 18px;
1361
+ line-height: 1;
1362
+ }
1363
+ }
1364
+
1365
+