@avocadostudio-ai/preview-adapter 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.
package/src/styles.css ADDED
@@ -0,0 +1,1207 @@
1
+ [data-editor-active] .editor-selectable {
2
+ --editor-accent-rgb: 37, 99, 235;
3
+ --editor-selected-rgb: 37, 99, 235;
4
+ --editor-selected-border-width: 2px;
5
+ --editor-focus-rgb: 217, 119, 6;
6
+ --editor-accent-strong: rgb(var(--editor-accent-rgb));
7
+ --editor-accent-soft: rgba(var(--editor-accent-rgb), 0.35);
8
+ position: relative;
9
+ transition: transform 220ms ease, opacity 220ms ease;
10
+ }
11
+
12
+ /* Only override overflow when block needs visible badges/overlays */
13
+ [data-editor-selection-mode] .editor-selectable:hover,
14
+ [data-editor-active] .editor-selectable.editor-highlight {
15
+ overflow: visible;
16
+ }
17
+
18
+ [data-editor-active] .editor-selectable::before {
19
+ content: "";
20
+ position: absolute;
21
+ inset: 4px;
22
+ pointer-events: none;
23
+ z-index: 19;
24
+ opacity: 0;
25
+ background:
26
+ radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px),
27
+ radial-gradient(circle at 76% 20%, rgba(255, 255, 255, 0.9) 0 1.5px, transparent 2.5px),
28
+ radial-gradient(circle at 62% 72%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px),
29
+ radial-gradient(circle at 28% 78%, rgba(255, 255, 255, 0.85) 0 1.5px, transparent 2.5px),
30
+ radial-gradient(circle at 88% 60%, rgba(var(--editor-accent-rgb), 0.75) 0 2px, transparent 3px);
31
+ mix-blend-mode: screen;
32
+ }
33
+
34
+ [data-editor-selection-mode] .editor-selectable:hover {
35
+ cursor: pointer;
36
+ z-index: 9999;
37
+ }
38
+
39
+ [data-editor-selection-mode] .editor-selectable:hover::before {
40
+ opacity: 1;
41
+ inset: 0;
42
+ /* Hover is a dashed, lower-opacity outline so it's visually distinct from
43
+ the solid selection outline — same color, but clearly "preview, not picked". */
44
+ border: var(--editor-selected-border-width) dashed rgba(var(--editor-accent-rgb), 0.55);
45
+ background: none;
46
+ mix-blend-mode: normal;
47
+ }
48
+
49
+ [data-editor-active] .editor-selectable::after {
50
+ content: attr(data-block-type);
51
+ position: absolute;
52
+ top: 4px;
53
+ left: 4px;
54
+ right: auto;
55
+ background: rgba(var(--editor-accent-rgb), 0.9);
56
+ color: #f8fafc;
57
+ border: 0;
58
+ border-radius: 6px;
59
+ padding: 4px 8px;
60
+ font-size: 11px;
61
+ font-weight: 600;
62
+ line-height: 1;
63
+ letter-spacing: 0.02em;
64
+ opacity: 0;
65
+ pointer-events: none;
66
+ transition: opacity 120ms ease;
67
+ z-index: 20;
68
+ }
69
+
70
+ .editor-block-badge {
71
+ position: absolute;
72
+ top: 0;
73
+ left: 0;
74
+ transform: translateY(calc(-100% + var(--editor-selected-border-width)));
75
+ display: inline-flex;
76
+ align-items: center;
77
+ gap: 4px;
78
+ opacity: 0;
79
+ transition: opacity 120ms ease;
80
+ z-index: 22;
81
+ }
82
+
83
+ .editor-has-badge::after {
84
+ opacity: 0 !important;
85
+ }
86
+
87
+ .editor-block-badge-label {
88
+ position: static;
89
+ background: rgba(var(--editor-accent-rgb), 0.9);
90
+ color: #f8fafc;
91
+ border-radius: 6px;
92
+ padding: 4px 8px;
93
+ font-size: 11px;
94
+ font-weight: 600;
95
+ line-height: 1;
96
+ letter-spacing: 0.02em;
97
+ }
98
+
99
+ [data-editor-selection-mode] .editor-selectable:hover > .editor-block-badge {
100
+ opacity: 1;
101
+ }
102
+
103
+ [data-editor-selection-mode] .editor-selectable:hover > .editor-block-badge .editor-block-badge-label {
104
+ background: rgba(var(--editor-accent-rgb), 0.97);
105
+ }
106
+
107
+ [data-editor-selection-mode] .editor-selectable:hover::after {
108
+ opacity: 1;
109
+ background: rgba(var(--editor-accent-rgb), 0.97);
110
+ }
111
+
112
+ [data-editor-active] .editor-highlight {
113
+ overflow: visible !important;
114
+ position: relative;
115
+ z-index: 9999;
116
+ }
117
+
118
+ .editor-live-draft-active {
119
+ position: relative;
120
+ }
121
+
122
+ /* Scope the typing shimmer to the fields actually being edited (.editor-live-typing
123
+ is only added to text targets, never images), so it doesn't wash the whole block —
124
+ including the hero image, which looked like it was being regenerated. */
125
+ .editor-live-draft-active .editor-live-typing:not([class*="absolute"]):not([class*="fixed"]) {
126
+ position: relative;
127
+ overflow: hidden;
128
+ }
129
+
130
+ .editor-live-draft-active .editor-live-typing::after {
131
+ content: "";
132
+ position: absolute;
133
+ inset: 0;
134
+ pointer-events: none;
135
+ background: linear-gradient(
136
+ 105deg,
137
+ transparent 0%,
138
+ rgba(var(--editor-selected-rgb), 0.03) 20%,
139
+ rgba(var(--editor-selected-rgb), 0.10) 45%,
140
+ rgba(var(--editor-selected-rgb), 0.14) 50%,
141
+ rgba(var(--editor-selected-rgb), 0.10) 55%,
142
+ rgba(var(--editor-selected-rgb), 0.03) 80%,
143
+ transparent 100%
144
+ );
145
+ background-size: 250% 100%;
146
+ animation: editor-live-draft-shimmer 1.8s ease-in-out infinite;
147
+ }
148
+
149
+ .editor-block-badge-status {
150
+ display: inline-flex;
151
+ align-items: center;
152
+ gap: 4px;
153
+ margin-left: 6px;
154
+ padding: 3px 7px;
155
+ border-radius: 999px;
156
+ font-size: 10px;
157
+ font-weight: 700;
158
+ letter-spacing: 0.02em;
159
+ color: #e2e8f0;
160
+ background: rgba(15, 23, 42, 0.28);
161
+ }
162
+
163
+ .editor-block-badge-status::after {
164
+ content: "";
165
+ width: 6px;
166
+ height: 6px;
167
+ border-radius: 999px;
168
+ background: #f8fafc;
169
+ opacity: 0.9;
170
+ animation: editor-live-draft-pulse 0.9s ease-in-out infinite alternate;
171
+ }
172
+
173
+ @keyframes editor-live-draft-shimmer {
174
+ 0% { background-position: 200% 0; }
175
+ 100% { background-position: -50% 0; }
176
+ }
177
+
178
+ @keyframes editor-live-draft-pulse {
179
+ from { transform: scale(0.7); opacity: 0.45; }
180
+ to { transform: scale(1); opacity: 1; }
181
+ }
182
+
183
+ /* ──────────────────────────────────────────────────────
184
+ AI Generation Shimmer Effects
185
+ These run inside the iframe preview during AI operations.
186
+ ────────────────────────────────────────────────────── */
187
+
188
+ /* Skeleton shimmer for incoming blocks */
189
+ .editor-skeleton-block {
190
+ min-height: 140px;
191
+ border-radius: 12px;
192
+ background: var(--bg-100, #f8fafc);
193
+ border: 1px solid var(--border, rgba(0, 0, 0, 0.06));
194
+ position: relative;
195
+ overflow: hidden;
196
+ }
197
+
198
+ .editor-skeleton-block::before {
199
+ content: "";
200
+ position: absolute;
201
+ inset: 0;
202
+ background: linear-gradient(
203
+ 90deg,
204
+ transparent 0%,
205
+ rgba(148, 163, 184, 0.07) 25%,
206
+ rgba(148, 163, 184, 0.14) 50%,
207
+ rgba(148, 163, 184, 0.07) 75%,
208
+ transparent 100%
209
+ );
210
+ background-size: 200% 100%;
211
+ animation: editor-skeleton-shimmer 1.6s ease-in-out infinite;
212
+ }
213
+
214
+ .editor-skeleton-block::after {
215
+ content: "";
216
+ position: absolute;
217
+ top: 28px;
218
+ left: 24px;
219
+ right: 40%;
220
+ height: 18px;
221
+ border-radius: 6px;
222
+ background: rgba(148, 163, 184, 0.10);
223
+ }
224
+
225
+ @keyframes editor-skeleton-shimmer {
226
+ 0% { background-position: 200% 0; }
227
+ 100% { background-position: -200% 0; }
228
+ }
229
+
230
+ .dark .editor-skeleton-block {
231
+ background: var(--bg-100, #1e293b);
232
+ border-color: rgba(255, 255, 255, 0.06);
233
+ }
234
+
235
+ .dark .editor-skeleton-block::before {
236
+ background: linear-gradient(
237
+ 90deg,
238
+ transparent 0%,
239
+ rgba(148, 163, 184, 0.04) 25%,
240
+ rgba(148, 163, 184, 0.09) 50%,
241
+ rgba(148, 163, 184, 0.04) 75%,
242
+ transparent 100%
243
+ );
244
+ }
245
+
246
+ .dark .editor-skeleton-block::after {
247
+ background: rgba(148, 163, 184, 0.06);
248
+ }
249
+
250
+ /* AI field loading shimmer */
251
+ .aifx-shimmer-overlay {
252
+ position: absolute;
253
+ inset: 0;
254
+ z-index: 21;
255
+ pointer-events: none;
256
+ border-radius: inherit;
257
+ overflow: hidden;
258
+ background: transparent;
259
+ mix-blend-mode: normal;
260
+ box-shadow: none;
261
+ }
262
+
263
+ .aifx-shimmer-overlay::before {
264
+ content: "";
265
+ position: absolute;
266
+ inset: 0;
267
+ background: linear-gradient(
268
+ 110deg,
269
+ transparent 0%,
270
+ transparent 38%,
271
+ rgba(255, 255, 255, 0.0) 42%,
272
+ rgba(255, 255, 255, 0.42) 50%,
273
+ rgba(219, 234, 254, 0.30) 54%,
274
+ rgba(255, 255, 255, 0.0) 60%,
275
+ transparent 66%,
276
+ transparent 100%
277
+ );
278
+ transform: translateX(120%);
279
+ animation: aifx-shimmer-slide 2.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
280
+ }
281
+
282
+ @keyframes aifx-shimmer-slide {
283
+ 0% { transform: translateX(120%); }
284
+ 100% { transform: translateX(-120%); }
285
+ }
286
+
287
+ /* Force chrome visible while AI shimmer is active */
288
+ .editor-block-badge:has(.aifx-shimmer-sparkle) {
289
+ opacity: 1 !important;
290
+ visibility: visible !important;
291
+ }
292
+
293
+ .aifx-shimmer-sparkle {
294
+ position: absolute;
295
+ top: 8px;
296
+ right: 8px;
297
+ z-index: 10;
298
+ width: 28px !important;
299
+ height: 28px !important;
300
+ flex-shrink: 0;
301
+ display: inline-flex !important;
302
+ align-items: center;
303
+ justify-content: center;
304
+ pointer-events: none;
305
+ color: #fff !important;
306
+ background: rgba(15, 23, 42, 0.72) !important;
307
+ border-radius: 50% !important;
308
+ animation: aifx-sparkle-blink 1.6s ease-in-out infinite;
309
+ }
310
+
311
+ .aifx-shimmer-sparkle svg {
312
+ display: block;
313
+ width: 13px;
314
+ height: 13px;
315
+ filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 6px rgba(170, 178, 186, 0.45));
316
+ }
317
+
318
+ @keyframes aifx-sparkle-blink {
319
+ 0%, 100% { transform: scale(1); opacity: 0.9; }
320
+ 50% { transform: scale(0.9); opacity: 0.65; }
321
+ }
322
+
323
+ @media (prefers-color-scheme: light) {
324
+ .aifx-shimmer-overlay {
325
+ background: transparent;
326
+ box-shadow: none;
327
+ }
328
+
329
+ .aifx-shimmer-overlay::before {
330
+ background: linear-gradient(
331
+ 110deg,
332
+ transparent 0%,
333
+ transparent 36%,
334
+ rgba(255, 255, 255, 0.0) 41%,
335
+ rgba(255, 255, 255, 0.46) 50%,
336
+ rgba(191, 219, 254, 0.34) 54%,
337
+ rgba(255, 255, 255, 0.0) 60%,
338
+ transparent 66%,
339
+ transparent 100%
340
+ );
341
+ }
342
+ }
343
+
344
+ @media (prefers-reduced-motion: reduce) {
345
+ .aifx-shimmer-overlay,
346
+ .aifx-shimmer-overlay::before,
347
+ .aifx-shimmer-sparkle,
348
+ .editor-skeleton-block::before {
349
+ animation: none !important;
350
+ }
351
+ }
352
+
353
+ [data-editor-active] .editor-highlight::before {
354
+ opacity: 1;
355
+ inset: 0;
356
+ border: var(--editor-selected-border-width) solid rgb(var(--editor-selected-rgb));
357
+ background: none;
358
+ mix-blend-mode: normal;
359
+ }
360
+
361
+ [data-editor-active] .editor-highlight.aifx-updated::before {
362
+ animation: aifx-border-pulse 1.2s ease-in-out 2;
363
+ }
364
+
365
+ @keyframes aifx-border-pulse {
366
+ 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--editor-selected-rgb), 0); }
367
+ 50% { box-shadow: 0 0 0 4px rgba(var(--editor-selected-rgb), 0.25); }
368
+ }
369
+
370
+ /* Prevent double-thick border between adjacent highlighted/hovered blocks */
371
+ [data-editor-active] .editor-highlight + .editor-selectable:hover::before,
372
+ [data-editor-selection-mode] .editor-highlight + .editor-selectable:hover::before {
373
+ top: -2px;
374
+ }
375
+
376
+ [data-editor-active] .editor-highlight.editor-child-hovering::before,
377
+ [data-editor-active] .editor-highlight.editor-child-selected::before {
378
+ opacity: 1;
379
+ inset: 0;
380
+ border: var(--editor-selected-border-width) solid rgb(var(--editor-selected-rgb));
381
+ }
382
+
383
+ [data-editor-active] .editor-highlight > .editor-block-badge {
384
+ opacity: 1;
385
+ }
386
+
387
+ [data-editor-active] .editor-highlight::after {
388
+ opacity: 1;
389
+ background: rgba(var(--editor-selected-rgb), 0.97);
390
+ }
391
+
392
+ [data-editor-active] .editor-highlight > .editor-block-badge .editor-block-badge-label {
393
+ background: rgba(var(--editor-selected-rgb), 0.97);
394
+ border-radius: 8px 8px 0 0;
395
+ padding: 5px 10px;
396
+ }
397
+
398
+ /* Move + delete buttons sit inside .editor-block-badge above the block —
399
+ sized down to match the badge label height so the chip looks unified. */
400
+ .editor-block-badge > .editor-selected-move,
401
+ .editor-block-badge > .editor-selected-delete {
402
+ width: 22px;
403
+ height: 22px;
404
+ border-radius: 5px;
405
+ }
406
+
407
+ .editor-block-badge > .editor-selected-move svg,
408
+ .editor-block-badge > .editor-selected-delete svg {
409
+ width: 11px;
410
+ height: 11px;
411
+ }
412
+
413
+ /* Always visible inside a selected block's badge — no hover gate. */
414
+ [data-editor-active] .editor-highlight > .editor-block-badge .editor-selected-move,
415
+ [data-editor-active] .editor-highlight > .editor-block-badge .editor-selected-delete {
416
+ opacity: 1;
417
+ visibility: visible;
418
+ pointer-events: auto;
419
+ }
420
+
421
+ /* Fast custom tooltip for chip buttons — native `title` waits ~1s, so users
422
+ moving quickly never see it. data-tooltip + ::after appears after 280ms. */
423
+ .editor-block-badge [data-tooltip] {
424
+ position: relative;
425
+ }
426
+
427
+ .editor-block-badge [data-tooltip]::after {
428
+ content: attr(data-tooltip);
429
+ position: absolute;
430
+ /* Anchor above the button so the tooltip lands in the empty gutter above
431
+ the block, not on top of the block's own content (heading, image, etc.). */
432
+ bottom: calc(100% + 6px);
433
+ left: 50%;
434
+ transform: translateX(-50%);
435
+ background: rgba(15, 23, 42, 0.94);
436
+ color: #f8fafc;
437
+ font-size: 11px;
438
+ font-weight: 500;
439
+ line-height: 1.3;
440
+ letter-spacing: 0.01em;
441
+ padding: 4px 7px;
442
+ border-radius: 5px;
443
+ white-space: nowrap;
444
+ pointer-events: none;
445
+ opacity: 0;
446
+ transition: opacity 100ms ease 0ms;
447
+ z-index: 30;
448
+ }
449
+
450
+ .editor-block-badge [data-tooltip]:hover::after,
451
+ .editor-block-badge [data-tooltip]:focus-visible::after {
452
+ opacity: 1;
453
+ transition-delay: 280ms;
454
+ }
455
+
456
+ @media (prefers-reduced-motion: reduce) {
457
+ .editor-block-badge [data-tooltip]:hover::after,
458
+ .editor-block-badge [data-tooltip]:focus-visible::after {
459
+ transition-delay: 0ms;
460
+ }
461
+ }
462
+
463
+ .editor-selected-delete {
464
+ border: 0;
465
+ background: rgba(var(--editor-selected-rgb), 0.92);
466
+ color: #fff;
467
+ border-radius: 6px;
468
+ width: 26px;
469
+ height: 26px;
470
+ padding: 0;
471
+ line-height: 1;
472
+ cursor: pointer;
473
+ display: inline-flex;
474
+ align-items: center;
475
+ justify-content: center;
476
+ z-index: 23;
477
+ opacity: 0;
478
+ visibility: hidden;
479
+ pointer-events: none;
480
+ transition: opacity 120ms ease;
481
+ }
482
+
483
+ .editor-selected-delete svg {
484
+ width: 13px;
485
+ height: 13px;
486
+ stroke: currentColor;
487
+ stroke-width: 2.1;
488
+ stroke-linecap: round;
489
+ stroke-linejoin: round;
490
+ fill: none;
491
+ }
492
+
493
+ .editor-selected-edit {
494
+ border: 0;
495
+ background: rgba(15, 23, 42, 0.88);
496
+ color: #fff;
497
+ border-radius: 50%;
498
+ width: 34px;
499
+ height: 34px;
500
+ padding: 0;
501
+ line-height: 1;
502
+ cursor: pointer;
503
+ display: inline-flex;
504
+ align-items: center;
505
+ justify-content: center;
506
+ z-index: 23;
507
+ opacity: 0;
508
+ visibility: hidden;
509
+ pointer-events: none;
510
+ transition: opacity 120ms ease;
511
+ }
512
+
513
+ .editor-selected-edit svg {
514
+ width: 16px;
515
+ height: 16px;
516
+ fill: none;
517
+ stroke: currentColor;
518
+ stroke-width: 2;
519
+ stroke-linecap: round;
520
+ stroke-linejoin: round;
521
+ }
522
+
523
+ .editor-selected-edit:hover {
524
+ background: rgba(15, 23, 42, 1);
525
+ }
526
+
527
+ .editor-selected-move {
528
+ border: 0;
529
+ background: rgba(var(--editor-selected-rgb), 0.92);
530
+ color: #fff;
531
+ border-radius: 6px;
532
+ width: 26px;
533
+ height: 26px;
534
+ padding: 0;
535
+ line-height: 1;
536
+ font-weight: 700;
537
+ cursor: pointer;
538
+ display: inline-flex;
539
+ align-items: center;
540
+ justify-content: center;
541
+ z-index: 23;
542
+ opacity: 0;
543
+ visibility: hidden;
544
+ pointer-events: none;
545
+ transition: opacity 120ms ease;
546
+ }
547
+
548
+ .editor-selected-move svg {
549
+ width: 13px;
550
+ height: 13px;
551
+ stroke: currentColor;
552
+ stroke-width: 2.3;
553
+ stroke-linecap: round;
554
+ stroke-linejoin: round;
555
+ fill: none;
556
+ }
557
+
558
+ .editor-selected-add {
559
+ position: absolute;
560
+ left: 50%;
561
+ transform: translateX(-50%);
562
+ border: 0;
563
+ background: rgba(var(--editor-selected-rgb), 0.95);
564
+ color: #fff;
565
+ border-radius: 999px;
566
+ width: 34px;
567
+ height: 34px;
568
+ padding: 0;
569
+ line-height: 1;
570
+ cursor: pointer;
571
+ display: inline-flex;
572
+ align-items: center;
573
+ justify-content: center;
574
+ z-index: 10000;
575
+ box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
576
+ opacity: 0;
577
+ visibility: hidden;
578
+ pointer-events: none;
579
+ transition: opacity 120ms ease;
580
+ }
581
+
582
+ .editor-selected-add-bottom {
583
+ bottom: -17px;
584
+ }
585
+
586
+ .editor-selected-add-top {
587
+ top: -17px;
588
+ }
589
+
590
+ .editor-selected-add svg {
591
+ width: 16px;
592
+ height: 16px;
593
+ stroke: currentColor;
594
+ stroke-width: 2.4;
595
+ stroke-linecap: round;
596
+ stroke-linejoin: round;
597
+ fill: none;
598
+ }
599
+
600
+ .editor-selected-add:hover {
601
+ background: rgba(var(--editor-selected-rgb), 1);
602
+ }
603
+
604
+ .editor-selected-move:hover {
605
+ background: rgba(var(--editor-selected-rgb), 1);
606
+ }
607
+
608
+ .editor-selected-move:focus,
609
+ .editor-selected-delete:focus,
610
+ .editor-selected-add:focus,
611
+ .editor-delete-confirm-btn:focus {
612
+ outline: none;
613
+ }
614
+
615
+ .editor-selected-move:focus-visible,
616
+ .editor-selected-delete:focus-visible,
617
+ .editor-selected-add:focus-visible {
618
+ box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
619
+ }
620
+
621
+ .editor-delete-confirm-btn:focus-visible {
622
+ box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
623
+ }
624
+
625
+ .editor-selected-move:disabled {
626
+ opacity: 0.45;
627
+ cursor: not-allowed;
628
+ }
629
+
630
+ .editor-selected-delete:hover {
631
+ background: #991b1b;
632
+ }
633
+
634
+ .editor-item-has-delete {
635
+ position: relative;
636
+ }
637
+
638
+ .editor-list-item-controls {
639
+ position: absolute;
640
+ top: 0;
641
+ right: 0;
642
+ transform: translateY(-100%);
643
+ display: inline-flex;
644
+ align-items: center;
645
+ gap: 0;
646
+ z-index: 24;
647
+ opacity: 0;
648
+ visibility: hidden;
649
+ pointer-events: none;
650
+ transition: opacity 120ms ease;
651
+ }
652
+
653
+ .editor-list-item-delete,
654
+ .editor-list-item-move,
655
+ .editor-list-item-add {
656
+ position: static;
657
+ border: 0;
658
+ background: rgba(var(--editor-selected-rgb), 0.94);
659
+ color: #fff;
660
+ width: 24px;
661
+ height: 24px;
662
+ padding: 0;
663
+ line-height: 1;
664
+ cursor: pointer;
665
+ display: inline-flex;
666
+ align-items: center;
667
+ justify-content: center;
668
+ z-index: 24;
669
+ opacity: 0;
670
+ visibility: hidden;
671
+ pointer-events: none;
672
+ transition: opacity 120ms ease;
673
+ }
674
+
675
+ .editor-list-item-add {
676
+ z-index: 10000;
677
+ }
678
+
679
+ .editor-list-item-controls > .editor-list-item-delete {
680
+ margin-left: 4px;
681
+ border-radius: 7px 7px 0 0;
682
+ }
683
+
684
+ .editor-highlight:hover:not(.editor-child-hovering):not(.editor-child-selected) > .editor-selected-add,
685
+ .editor-highlight:focus-within > .editor-selected-add,
686
+ .editor-highlight:hover:not(.editor-child-hovering):not(.editor-child-selected) .editor-selected-delete,
687
+ .editor-highlight:focus-within .editor-selected-delete,
688
+ .editor-highlight:hover:not(.editor-child-hovering):not(.editor-child-selected) .editor-selected-edit,
689
+ .editor-highlight:focus-within .editor-selected-edit,
690
+ .editor-highlight:hover:not(.editor-child-hovering):not(.editor-child-selected) .editor-selected-move,
691
+ .editor-highlight:focus-within .editor-selected-move {
692
+ opacity: 1;
693
+ visibility: visible;
694
+ pointer-events: auto;
695
+ }
696
+
697
+ .editor-highlight:not(.editor-child-selected):not(.editor-child-selection-locked) .editor-item-has-delete:hover > .editor-list-item-controls,
698
+ .editor-highlight:not(.editor-child-selected):not(.editor-child-selection-locked) .editor-item-has-delete:focus-within > .editor-list-item-controls,
699
+ .editor-item-has-delete.editor-item-selected > .editor-list-item-controls,
700
+ .editor-highlight:not(.editor-child-selected):not(.editor-child-selection-locked) .editor-item-has-delete:hover .editor-list-item-add,
701
+ .editor-highlight:not(.editor-child-selected):not(.editor-child-selection-locked) .editor-item-has-delete:focus-within .editor-list-item-add,
702
+ .editor-item-has-delete.editor-item-selected .editor-list-item-add,
703
+ .editor-highlight:not(.editor-child-selected):not(.editor-child-selection-locked) .editor-item-has-delete:hover .editor-list-item-delete,
704
+ .editor-highlight:not(.editor-child-selected):not(.editor-child-selection-locked) .editor-item-has-delete:focus-within .editor-list-item-delete,
705
+ .editor-item-has-delete.editor-item-selected .editor-list-item-delete,
706
+ .editor-highlight:not(.editor-child-selected):not(.editor-child-selection-locked) .editor-item-has-delete:hover .editor-list-item-move,
707
+ .editor-highlight:not(.editor-child-selected):not(.editor-child-selection-locked) .editor-item-has-delete:focus-within .editor-list-item-move,
708
+ .editor-item-has-delete.editor-item-selected .editor-list-item-move {
709
+ opacity: 1;
710
+ visibility: visible;
711
+ pointer-events: auto;
712
+ }
713
+
714
+ .editor-highlight.editor-child-selected > .editor-selected-add,
715
+ .editor-highlight.editor-child-selected .editor-selected-delete,
716
+ .editor-highlight.editor-child-selected .editor-selected-edit,
717
+ .editor-highlight.editor-child-selected .editor-selected-move,
718
+ .editor-highlight.editor-child-hovering > .editor-selected-add,
719
+ .editor-highlight.editor-child-hovering .editor-selected-delete,
720
+ .editor-highlight.editor-child-hovering .editor-selected-edit,
721
+ .editor-highlight.editor-child-hovering .editor-selected-move {
722
+ opacity: 0;
723
+ visibility: hidden;
724
+ pointer-events: none;
725
+ }
726
+
727
+ .editor-list-item-move {
728
+ border-radius: 0;
729
+ }
730
+
731
+ .editor-list-item-move-up {
732
+ border-radius: 7px 0 0 0;
733
+ }
734
+
735
+ .editor-list-item-move-down {
736
+ border-radius: 0 7px 0 0;
737
+ border-left: 1px solid rgba(255, 255, 255, 0.2);
738
+ }
739
+
740
+ .editor-list-item-add {
741
+ position: absolute;
742
+ top: 50%;
743
+ right: -17px;
744
+ transform: translateY(-50%);
745
+ border-radius: 999px;
746
+ box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
747
+ width: 34px;
748
+ height: 34px;
749
+ }
750
+
751
+ .editor-list-item-delete svg,
752
+ .editor-list-item-move svg,
753
+ .editor-list-item-add svg {
754
+ width: 16px;
755
+ height: 16px;
756
+ stroke: currentColor;
757
+ stroke-width: 2.3;
758
+ stroke-linecap: round;
759
+ stroke-linejoin: round;
760
+ fill: none;
761
+ }
762
+
763
+ .editor-list-item-delete:hover,
764
+ .editor-list-item-move:hover,
765
+ .editor-list-item-add:hover {
766
+ background: rgba(var(--editor-selected-rgb), 1);
767
+ }
768
+
769
+ .editor-list-item-delete:disabled,
770
+ .editor-list-item-move:disabled {
771
+ opacity: 0.45;
772
+ cursor: not-allowed;
773
+ }
774
+
775
+ .editor-list-item-delete:focus,
776
+ .editor-list-item-move:focus,
777
+ .editor-list-item-add:focus {
778
+ outline: none;
779
+ }
780
+
781
+ .editor-list-item-delete:focus-visible,
782
+ .editor-list-item-move:focus-visible,
783
+ .editor-list-item-add:focus-visible {
784
+ box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
785
+ }
786
+
787
+ /* Inline + button inside controls bar for horizontal lists (e.g. Tabs) */
788
+ .editor-list-item-add--inline {
789
+ position: static;
790
+ width: 24px;
791
+ height: 24px;
792
+ border-radius: 7px 7px 0 0;
793
+ box-shadow: none;
794
+ margin-right: 4px;
795
+ transform: none;
796
+ }
797
+
798
+ [data-editor-active] .editor-selectable [data-editable-label]:not([class*="absolute"]):not([class*="fixed"]) {
799
+ position: relative;
800
+ }
801
+
802
+ /* ::after labels hidden — keep only the blue ::before labels on hover */
803
+ [data-editor-active] .editor-selectable [data-editable-label]::after {
804
+ display: none;
805
+ }
806
+
807
+ .editor-highlight [data-editable-target]:not([class*="absolute"]):not([class*="fixed"]) {
808
+ position: relative;
809
+ }
810
+
811
+ .editor-highlight [data-editable-target]:not(.btn-primary):not(.btn-secondary):hover {
812
+ box-shadow: inset 0 0 0 1.5px rgba(var(--editor-selected-rgb), 0.4);
813
+ background: rgba(var(--editor-selected-rgb), 0.04);
814
+ }
815
+
816
+ .editor-highlight [data-editable-target].editor-inline-editing {
817
+ box-shadow: inset 0 0 0 2px rgba(var(--editor-focus-rgb), 0.95);
818
+ background: rgba(var(--editor-focus-rgb), 0.12);
819
+ cursor: text;
820
+ }
821
+
822
+ .editor-highlight [data-editable-target]::before {
823
+ content: attr(data-editable-target-label);
824
+ position: absolute;
825
+ top: 0;
826
+ left: 4px;
827
+ right: auto;
828
+ transform: translateY(calc(-100% - 4px));
829
+ background: rgba(var(--editor-accent-rgb), 0.95);
830
+ color: #f8fafc;
831
+ border-radius: 8px 8px 0 0;
832
+ padding: 6px 10px;
833
+ font-size: 12px;
834
+ font-weight: 600;
835
+ line-height: 1;
836
+ letter-spacing: 0.02em;
837
+ white-space: nowrap;
838
+ opacity: 0;
839
+ pointer-events: none;
840
+ transition: opacity 120ms ease;
841
+ z-index: 24;
842
+ }
843
+
844
+ .editor-highlight [data-editable-target]:hover::before {
845
+ opacity: 1;
846
+ }
847
+
848
+ /* Hide parent container labels when a nested child is being hovered */
849
+ .editor-highlight [data-editable-target]:has([data-editable-target]:hover)::before {
850
+ opacity: 0;
851
+ }
852
+ .editor-highlight [data-editable-label]:has([data-editable-label]:hover)::after {
853
+ opacity: 0;
854
+ }
855
+
856
+ .editor-hide-nested-labels .editor-highlight [data-editable-target]::before,
857
+ .editor-hide-nested-labels .editor-highlight [data-editable-label]::after {
858
+ display: none !important;
859
+ }
860
+
861
+ .editor-child-highlight,
862
+ .editor-item-selected {
863
+ outline: 1.5px solid rgba(var(--editor-selected-rgb), 0.5);
864
+ outline-offset: -1.5px;
865
+ }
866
+
867
+ .editor-child-highlight:not(a):not(.btn-primary):not(.btn-secondary),
868
+ .editor-item-selected:not(a):not(.btn-primary):not(.btn-secondary) {
869
+ background: rgba(var(--editor-selected-rgb), 0.04);
870
+ }
871
+
872
+ .editor-child-highlight::before {
873
+ opacity: 1 !important;
874
+ }
875
+
876
+ .editor-delete-confirm {
877
+ position: absolute;
878
+ top: 8px;
879
+ right: 40px;
880
+ background: #dc2626;
881
+ color: #fff;
882
+ border-radius: 6px;
883
+ height: 26px;
884
+ padding: 0 10px;
885
+ font-size: 11px;
886
+ font-weight: 600;
887
+ display: flex;
888
+ align-items: center;
889
+ gap: 8px;
890
+ z-index: 25;
891
+ white-space: nowrap;
892
+ }
893
+
894
+ .editor-delete-confirm--list {
895
+ position: static;
896
+ height: 24px;
897
+ border-radius: 7px;
898
+ font-size: 10px;
899
+ margin-left: 6px;
900
+ order: 99;
901
+ }
902
+
903
+ .editor-delete-confirm--list .editor-delete-confirm-btn {
904
+ height: 18px;
905
+ font-size: 10px;
906
+ }
907
+
908
+ .editor-delete-confirm-btn {
909
+ border: 1.5px solid rgba(255, 255, 255, 0.6);
910
+ background: transparent;
911
+ color: #fff;
912
+ border-radius: 4px;
913
+ height: 20px;
914
+ padding: 0 10px;
915
+ font-size: 11px;
916
+ font-weight: 700;
917
+ cursor: pointer;
918
+ font-family: inherit;
919
+ display: inline-flex;
920
+ align-items: center;
921
+ justify-content: center;
922
+ }
923
+
924
+ .editor-delete-confirm-btn:hover {
925
+ background: rgba(255, 255, 255, 0.2);
926
+ }
927
+
928
+ @media (hover: none), (pointer: coarse) {
929
+ .editor-selected-add,
930
+ .editor-selected-delete,
931
+ .editor-selected-edit,
932
+ .editor-selected-move {
933
+ opacity: 1;
934
+ visibility: visible;
935
+ pointer-events: auto;
936
+ }
937
+
938
+ .editor-list-item-controls,
939
+ .editor-list-item-delete,
940
+ .editor-list-item-move,
941
+ .editor-list-item-add {
942
+ opacity: 0;
943
+ visibility: hidden;
944
+ pointer-events: none;
945
+ }
946
+
947
+ .editor-item-has-delete.editor-item-selected > .editor-list-item-controls,
948
+ .editor-item-has-delete.editor-item-selected .editor-list-item-add,
949
+ .editor-item-has-delete.editor-item-selected .editor-list-item-delete,
950
+ .editor-item-has-delete.editor-item-selected .editor-list-item-move {
951
+ opacity: 1;
952
+ visibility: visible;
953
+ pointer-events: auto;
954
+ }
955
+
956
+ .editor-selected-add,
957
+ .editor-list-item-add {
958
+ width: 44px;
959
+ height: 44px;
960
+ }
961
+
962
+ .editor-selected-add-bottom {
963
+ bottom: -22px;
964
+ }
965
+
966
+ .editor-selected-add-top {
967
+ top: -22px;
968
+ }
969
+ }
970
+
971
+ .editor-flash {
972
+ animation: flash 600ms ease-out;
973
+ will-change: box-shadow, border-color;
974
+ }
975
+
976
+ .aifx-updated {
977
+ position: relative;
978
+ overflow: hidden;
979
+ }
980
+
981
+ .aifx-updated::before {
982
+ opacity: 0.55;
983
+ animation: aifx-sparkle 980ms ease-out;
984
+ }
985
+
986
+ .aifx-updated::after {
987
+ content: "";
988
+ position: absolute;
989
+ inset: -22%;
990
+ z-index: 23;
991
+ pointer-events: none;
992
+ background: linear-gradient(
993
+ 108deg,
994
+ transparent 22%,
995
+ rgba(var(--editor-selected-rgb), 0.05) 34%,
996
+ rgba(var(--editor-selected-rgb), 0.45) 49%,
997
+ rgba(var(--editor-selected-rgb), 0.05) 64%,
998
+ transparent 78%
999
+ );
1000
+ transform: translateX(-128%);
1001
+ animation: aifx-wave 920ms cubic-bezier(0.25, 0.95, 0.2, 1) 1;
1002
+ }
1003
+
1004
+ .aifx-updated > .editor-block-badge {
1005
+ animation: aifx-badge-pulse 1.2s ease-in-out 2;
1006
+ }
1007
+
1008
+ @keyframes aifx-badge-pulse {
1009
+ 0%, 100% { transform: translateY(calc(-100% + var(--editor-selected-border-width))) scale(1); }
1010
+ 50% { transform: translateY(calc(-100% + var(--editor-selected-border-width))) scale(1.08); }
1011
+ }
1012
+
1013
+ .editor-flash::before {
1014
+ opacity: 1;
1015
+ animation: sparkle-burst 520ms ease-out;
1016
+ }
1017
+
1018
+ .editor-enter {
1019
+ animation: block-enter 180ms cubic-bezier(0.2, 0.9, 0.2, 1);
1020
+ }
1021
+
1022
+ @keyframes flash {
1023
+ 0% {
1024
+ border-color: rgba(var(--editor-accent-rgb), 0.95);
1025
+ box-shadow:
1026
+ 0 0 0 3px rgba(var(--editor-accent-rgb), 0.45),
1027
+ 0 10px 40px rgba(var(--editor-accent-rgb), 0.30);
1028
+ }
1029
+ 40% {
1030
+ border-color: rgba(var(--editor-accent-rgb), 0.75);
1031
+ box-shadow:
1032
+ 0 0 0 2px rgba(var(--editor-accent-rgb), 0.28),
1033
+ 0 6px 24px rgba(var(--editor-accent-rgb), 0.18);
1034
+ }
1035
+ 100% {
1036
+ border-color: transparent;
1037
+ box-shadow: 0 0 0 0 rgba(var(--editor-accent-rgb), 0);
1038
+ }
1039
+ }
1040
+
1041
+ @keyframes block-enter {
1042
+ 0% {
1043
+ opacity: 0;
1044
+ transform: translateY(14px) scale(0.985);
1045
+ }
1046
+ 100% {
1047
+ opacity: 1;
1048
+ transform: translateY(0) scale(1);
1049
+ }
1050
+ }
1051
+
1052
+ @keyframes sparkle-burst {
1053
+ 0% {
1054
+ opacity: 0;
1055
+ transform: scale(0.92);
1056
+ filter: blur(0.4px);
1057
+ }
1058
+ 35% {
1059
+ opacity: 0.95;
1060
+ transform: scale(1.02);
1061
+ filter: blur(0);
1062
+ }
1063
+ 100% {
1064
+ opacity: 0;
1065
+ transform: scale(1.05);
1066
+ filter: blur(0.4px);
1067
+ }
1068
+ }
1069
+
1070
+ @keyframes aifx-wave {
1071
+ to {
1072
+ transform: translateX(128%);
1073
+ }
1074
+ }
1075
+
1076
+ @keyframes aifx-sparkle {
1077
+ 0% {
1078
+ opacity: 0.25;
1079
+ filter: blur(0.45px);
1080
+ transform: scale(0.985);
1081
+ }
1082
+ 42% {
1083
+ opacity: 0.9;
1084
+ filter: blur(0);
1085
+ transform: scale(1.01);
1086
+ }
1087
+ 100% {
1088
+ opacity: 0;
1089
+ filter: blur(0.4px);
1090
+ transform: scale(1.01);
1091
+ }
1092
+ }
1093
+
1094
+ /* View Transition crossfade for smooth refresh */
1095
+ ::view-transition-old(root) { animation: none; }
1096
+ ::view-transition-new(root) { animation: editor-crossfade 180ms ease-out; }
1097
+ @keyframes editor-crossfade { from { opacity: 0.6; } to { opacity: 1; } }
1098
+
1099
+ /* Progressive block entrance animation */
1100
+ .editor-block-entering {
1101
+ animation: editor-block-slide-in 320ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
1102
+ }
1103
+ @keyframes editor-block-slide-in {
1104
+ from { opacity: 0; transform: translateY(18px) scale(0.98); }
1105
+ to { opacity: 1; transform: translateY(0) scale(1); }
1106
+ }
1107
+
1108
+ /* Live typing cursor effect */
1109
+ .editor-live-typing {
1110
+ position: relative;
1111
+ }
1112
+ .editor-live-typing::after {
1113
+ content: "";
1114
+ display: inline-block;
1115
+ width: 2px;
1116
+ height: 1em;
1117
+ background: rgb(var(--editor-selected-rgb));
1118
+ animation: editor-cursor-blink 0.6s step-end infinite;
1119
+ vertical-align: text-bottom;
1120
+ margin-left: 1px;
1121
+ }
1122
+ @keyframes editor-cursor-blink { 50% { opacity: 0; } }
1123
+
1124
+ /* AI image reveal: blur→sharp transition when generated image replaces placeholder */
1125
+ .ai-image-reveal {
1126
+ animation: ai-image-reveal 1.2s cubic-bezier(0.2, 0.9, 0.2, 1) both;
1127
+ }
1128
+ @keyframes ai-image-reveal {
1129
+ from { filter: blur(20px) saturate(1.1); transform: scale(1.04); opacity: 0.6; }
1130
+ to { filter: blur(0) saturate(1); transform: scale(1); opacity: 1; }
1131
+ }
1132
+
1133
+ /* Image change hover button */
1134
+ .editor-image-change-btn {
1135
+ position: absolute;
1136
+ top: 8px;
1137
+ left: 8px;
1138
+ z-index: 24;
1139
+ width: 28px;
1140
+ height: 28px;
1141
+ border: 0;
1142
+ border-radius: 6px;
1143
+ background: rgba(var(--editor-accent-rgb), 0.92);
1144
+ color: #fff;
1145
+ cursor: pointer;
1146
+ display: inline-flex;
1147
+ align-items: center;
1148
+ justify-content: center;
1149
+ opacity: 0;
1150
+ pointer-events: none;
1151
+ transition: opacity 120ms ease;
1152
+ box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
1153
+ }
1154
+
1155
+ [data-editor-active] [data-editable-target]:hover > .editor-image-change-btn,
1156
+ [data-editor-active] [data-editable-target]:focus-within > .editor-image-change-btn {
1157
+ opacity: 1;
1158
+ pointer-events: auto;
1159
+ }
1160
+
1161
+ .editor-image-change-btn:hover {
1162
+ background: rgba(var(--editor-accent-rgb), 1);
1163
+ }
1164
+
1165
+ .editor-image-change-btn:focus {
1166
+ outline: none;
1167
+ }
1168
+
1169
+ .editor-image-change-btn:focus-visible {
1170
+ box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
1171
+ }
1172
+
1173
+ @media (prefers-reduced-motion: reduce) {
1174
+ .aifx-updated::before,
1175
+ .aifx-updated::after {
1176
+ animation: none !important;
1177
+ }
1178
+ .aifx-updated > .editor-block-badge {
1179
+ animation: none !important;
1180
+ }
1181
+ [data-editor-active] .editor-highlight.aifx-updated::before {
1182
+ animation: none !important;
1183
+ }
1184
+ .editor-flash {
1185
+ animation: none !important;
1186
+ }
1187
+ .aifx-shimmer-overlay,
1188
+ .aifx-shimmer-sparkle {
1189
+ animation: none !important;
1190
+ }
1191
+ .editor-block-entering {
1192
+ animation: none !important;
1193
+ }
1194
+ .editor-live-typing::after {
1195
+ animation: none !important;
1196
+ }
1197
+ .editor-skeleton-block {
1198
+ animation: none !important;
1199
+ }
1200
+ .ai-image-reveal {
1201
+ animation: none !important;
1202
+ }
1203
+ ::view-transition-old(root),
1204
+ ::view-transition-new(root) {
1205
+ animation: none !important;
1206
+ }
1207
+ }