react-web-pdf-editor 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2934 @@
1
+ .rpe-root {
2
+ --rpe-bg: #f3f4f6;
3
+ --rpe-white: #ffffff;
4
+ --rpe-ink: #111827;
5
+ --rpe-muted: #6b7280;
6
+ --rpe-border: #e5e7eb;
7
+ --rpe-accent: #2563eb;
8
+ --rpe-accent-hover: #1d4ed8;
9
+ position: relative;
10
+ box-sizing: border-box;
11
+ display: flex;
12
+ flex-direction: column;
13
+ width: 100%;
14
+ height: 100%;
15
+ max-height: 100%;
16
+ min-height: 0;
17
+ overflow: hidden;
18
+ overscroll-behavior: none;
19
+ color: var(--rpe-ink);
20
+ background: var(--rpe-bg);
21
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
22
+ font-size: 14px;
23
+ }
24
+
25
+ .rpe-root *,
26
+ .rpe-root *::before,
27
+ .rpe-root *::after {
28
+ box-sizing: border-box;
29
+ }
30
+
31
+ /* Toolbar */
32
+ .rpe-toolbar {
33
+ display: flex;
34
+ align-items: center;
35
+ gap: 12px;
36
+ padding: 8px 16px;
37
+ background: var(--rpe-white);
38
+ border-bottom: 1px solid var(--rpe-border);
39
+ flex-shrink: 0;
40
+ }
41
+
42
+ .rpe-toolbar-main {
43
+ display: flex;
44
+ align-items: center;
45
+ gap: 8px;
46
+ min-width: 0;
47
+ flex: 1;
48
+ overflow-x: auto;
49
+ }
50
+
51
+ .rpe-toolbar-brand {
52
+ display: inline-flex;
53
+ align-items: center;
54
+ gap: 8px;
55
+ min-width: 0;
56
+ max-width: 220px;
57
+ height: 32px;
58
+ padding: 0 6px 0 4px;
59
+ margin-right: 4px;
60
+ border: 1px solid transparent;
61
+ border-radius: 6px;
62
+ background: transparent;
63
+ font-weight: 600;
64
+ font-size: 15px;
65
+ color: var(--rpe-ink);
66
+ white-space: nowrap;
67
+ }
68
+
69
+ .rpe-toolbar-brand-button {
70
+ appearance: none;
71
+ font: inherit;
72
+ font-weight: 600;
73
+ font-size: 15px;
74
+ color: inherit;
75
+ text-align: left;
76
+ cursor: text;
77
+ }
78
+
79
+ .rpe-toolbar-brand-button:hover,
80
+ .rpe-toolbar-brand-button:focus-visible {
81
+ background: var(--rpe-bg);
82
+ }
83
+
84
+ .rpe-toolbar-brand-button:focus-visible {
85
+ outline: none;
86
+ border-color: var(--rpe-accent);
87
+ }
88
+
89
+ .rpe-toolbar-brand svg {
90
+ flex-shrink: 0;
91
+ }
92
+
93
+ .rpe-toolbar-brand-editing {
94
+ width: 280px;
95
+ max-width: min(280px, 40vw);
96
+ border-color: var(--rpe-accent);
97
+ background: var(--rpe-white);
98
+ }
99
+
100
+ .rpe-toolbar-brand-name {
101
+ overflow: hidden;
102
+ text-overflow: ellipsis;
103
+ min-width: 0;
104
+ }
105
+
106
+ .rpe-toolbar-brand-input {
107
+ min-width: 0;
108
+ width: 100%;
109
+ height: 28px;
110
+ padding: 0;
111
+ border: none;
112
+ background: transparent;
113
+ color: inherit;
114
+ font: inherit;
115
+ font-weight: 600;
116
+ font-size: 15px;
117
+ outline: none;
118
+ }
119
+
120
+ .rpe-toolbar-group,
121
+ .rpe-find-group {
122
+ display: flex;
123
+ align-items: center;
124
+ gap: 2px;
125
+ flex-shrink: 0;
126
+ }
127
+
128
+ .rpe-toolbar-divider {
129
+ width: 1px;
130
+ height: 20px;
131
+ background: var(--rpe-border);
132
+ margin: 0 6px;
133
+ flex-shrink: 0;
134
+ }
135
+
136
+ .rpe-find-input {
137
+ height: 32px;
138
+ padding: 0 10px;
139
+ border: 1px solid var(--rpe-border);
140
+ border-radius: 6px;
141
+ background: var(--rpe-white);
142
+ color: var(--rpe-ink);
143
+ font-size: 13px;
144
+ font-family: inherit;
145
+ outline: none;
146
+ width: 168px;
147
+ transition: border-color 0.15s;
148
+ }
149
+
150
+ .rpe-find-input:focus {
151
+ border-color: var(--rpe-accent);
152
+ }
153
+
154
+ .rpe-find-input::placeholder {
155
+ color: var(--rpe-muted);
156
+ }
157
+
158
+ .rpe-find-input:disabled {
159
+ opacity: 0.5;
160
+ cursor: not-allowed;
161
+ }
162
+
163
+ .rpe-find-count {
164
+ min-width: 44px;
165
+ padding: 0 4px;
166
+ text-align: center;
167
+ color: var(--rpe-muted);
168
+ font-size: 12px;
169
+ white-space: nowrap;
170
+ }
171
+
172
+ .rpe-tool-button,
173
+ .rpe-toolbar-button {
174
+ display: inline-flex;
175
+ align-items: center;
176
+ justify-content: center;
177
+ width: 32px;
178
+ height: 32px;
179
+ padding: 0;
180
+ border: 1px solid transparent;
181
+ border-radius: 6px;
182
+ background: transparent;
183
+ color: var(--rpe-ink);
184
+ cursor: pointer;
185
+ transition: all 0.15s;
186
+ }
187
+
188
+ .rpe-tool-button:hover:not(:disabled),
189
+ .rpe-toolbar-button:hover:not(:disabled) {
190
+ background: var(--rpe-bg);
191
+ border-color: var(--rpe-border);
192
+ }
193
+
194
+ .rpe-tool-button:disabled,
195
+ .rpe-toolbar-button:disabled {
196
+ opacity: 0.4;
197
+ cursor: not-allowed;
198
+ }
199
+
200
+ .rpe-tool-button-active {
201
+ background: var(--rpe-accent);
202
+ color: white;
203
+ border-color: var(--rpe-accent);
204
+ }
205
+
206
+ .rpe-tool-button-active:hover:not(:disabled) {
207
+ background: var(--rpe-accent-hover);
208
+ border-color: var(--rpe-accent-hover);
209
+ }
210
+
211
+ .rpe-zoom-field {
212
+ display: inline-flex;
213
+ align-items: center;
214
+ height: 32px;
215
+ margin: 0 2px;
216
+ padding: 0 2px 0 6px;
217
+ border: 1px solid var(--rpe-border);
218
+ border-radius: 6px;
219
+ background: var(--rpe-white);
220
+ transition: border-color 0.15s;
221
+ }
222
+
223
+ .rpe-zoom-field:focus-within,
224
+ .rpe-zoom-field-open {
225
+ border-color: var(--rpe-accent);
226
+ }
227
+
228
+ .rpe-zoom-field-invalid {
229
+ border-color: #dc2626;
230
+ }
231
+
232
+ .rpe-zoom-field-invalid:focus-within {
233
+ border-color: #dc2626;
234
+ }
235
+
236
+ .rpe-zoom-field:has(:disabled) {
237
+ opacity: 0.5;
238
+ }
239
+
240
+ .rpe-zoom-input {
241
+ width: 4ch;
242
+ min-width: 0;
243
+ height: 28px;
244
+ padding: 0;
245
+ border: none;
246
+ background: transparent;
247
+ color: var(--rpe-ink);
248
+ font-size: 13px;
249
+ font-family: inherit;
250
+ text-align: right;
251
+ outline: none;
252
+ }
253
+
254
+ .rpe-zoom-input:disabled {
255
+ cursor: not-allowed;
256
+ }
257
+
258
+ .rpe-zoom-suffix {
259
+ color: var(--rpe-ink);
260
+ font-size: 13px;
261
+ padding: 0 2px 0 1px;
262
+ user-select: none;
263
+ }
264
+
265
+ .rpe-zoom-chevron {
266
+ display: inline-flex;
267
+ align-items: center;
268
+ justify-content: center;
269
+ width: 22px;
270
+ height: 26px;
271
+ padding: 0;
272
+ border: none;
273
+ border-radius: 4px;
274
+ background: transparent;
275
+ color: var(--rpe-muted);
276
+ cursor: pointer;
277
+ flex-shrink: 0;
278
+ }
279
+
280
+ .rpe-zoom-chevron:hover:not(:disabled),
281
+ .rpe-zoom-chevron-open {
282
+ color: var(--rpe-ink);
283
+ background: var(--rpe-bg);
284
+ }
285
+
286
+ .rpe-zoom-chevron:disabled {
287
+ cursor: not-allowed;
288
+ }
289
+
290
+ .rpe-zoom-chevron svg {
291
+ transition: transform 0.15s;
292
+ }
293
+
294
+ .rpe-zoom-chevron-open svg {
295
+ transform: rotate(180deg);
296
+ }
297
+
298
+ .rpe-zoom-menu {
299
+ position: fixed;
300
+ z-index: 40;
301
+ min-width: 112px;
302
+ padding: 6px;
303
+ background: var(--rpe-white);
304
+ border: 1px solid var(--rpe-border);
305
+ border-radius: 10px;
306
+ box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
307
+ }
308
+
309
+ .rpe-zoom-option {
310
+ display: flex;
311
+ align-items: center;
312
+ justify-content: space-between;
313
+ gap: 12px;
314
+ width: 100%;
315
+ height: 32px;
316
+ padding: 0 10px;
317
+ border: none;
318
+ border-radius: 6px;
319
+ background: transparent;
320
+ color: var(--rpe-ink);
321
+ font-size: 13px;
322
+ font-family: inherit;
323
+ cursor: pointer;
324
+ text-align: left;
325
+ }
326
+
327
+ .rpe-zoom-option:hover {
328
+ background: var(--rpe-bg);
329
+ }
330
+
331
+ .rpe-zoom-option-active {
332
+ background: rgba(37, 99, 235, 0.08);
333
+ color: var(--rpe-accent);
334
+ font-weight: 600;
335
+ }
336
+
337
+ .rpe-zoom-option-active:hover {
338
+ background: rgba(37, 99, 235, 0.12);
339
+ }
340
+
341
+ .rpe-page-nav {
342
+ display: inline-flex;
343
+ align-items: center;
344
+ gap: 6px;
345
+ padding: 0 4px;
346
+ color: var(--rpe-ink);
347
+ font-size: 13px;
348
+ white-space: nowrap;
349
+ }
350
+
351
+ .rpe-page-nav-label {
352
+ color: var(--rpe-muted);
353
+ user-select: none;
354
+ }
355
+
356
+ .rpe-page-field {
357
+ display: inline-flex;
358
+ align-items: center;
359
+ height: 32px;
360
+ padding: 0 6px;
361
+ border: 1px solid var(--rpe-border);
362
+ border-radius: 6px;
363
+ background: var(--rpe-white);
364
+ transition: border-color 0.15s;
365
+ }
366
+
367
+ .rpe-page-field:focus-within {
368
+ border-color: var(--rpe-accent);
369
+ }
370
+
371
+ .rpe-page-field-invalid,
372
+ .rpe-page-field-invalid:focus-within {
373
+ border-color: #dc2626;
374
+ }
375
+
376
+ .rpe-page-field:has(:disabled) {
377
+ opacity: 0.5;
378
+ }
379
+
380
+ .rpe-page-input {
381
+ min-width: 0;
382
+ height: 28px;
383
+ padding: 0;
384
+ border: none;
385
+ background: transparent;
386
+ color: var(--rpe-ink);
387
+ font-size: 13px;
388
+ font-family: inherit;
389
+ text-align: center;
390
+ outline: none;
391
+ }
392
+
393
+ .rpe-page-input:disabled {
394
+ cursor: not-allowed;
395
+ }
396
+
397
+ .rpe-export-button {
398
+ display: inline-flex;
399
+ align-items: center;
400
+ justify-content: center;
401
+ gap: 6px;
402
+ height: 32px;
403
+ padding: 0 14px;
404
+ border: 1px solid var(--rpe-accent);
405
+ border-radius: 6px;
406
+ background: var(--rpe-accent);
407
+ color: white;
408
+ font-size: 13px;
409
+ font-weight: 500;
410
+ cursor: pointer;
411
+ transition: background 0.15s;
412
+ white-space: nowrap;
413
+ flex-shrink: 0;
414
+ }
415
+
416
+ .rpe-export-button:hover:not(:disabled) {
417
+ background: var(--rpe-accent-hover);
418
+ }
419
+
420
+ .rpe-export-button:disabled {
421
+ opacity: 0.5;
422
+ cursor: not-allowed;
423
+ }
424
+
425
+ .rpe-export {
426
+ display: flex;
427
+ flex-direction: column;
428
+ align-items: flex-end;
429
+ gap: 4px;
430
+ flex-shrink: 0;
431
+ }
432
+
433
+ .rpe-export-button[aria-busy="true"] {
434
+ cursor: progress;
435
+ }
436
+
437
+ .rpe-export-error {
438
+ max-width: 220px;
439
+ font-size: 11px;
440
+ line-height: 1.3;
441
+ color: #dc2626;
442
+ text-align: right;
443
+ }
444
+
445
+ /* Body - 3 column layout */
446
+ .rpe-body {
447
+ display: grid;
448
+ grid-template-columns: 220px 1fr 260px;
449
+ grid-template-rows: minmax(0, 1fr);
450
+ flex: 1;
451
+ min-height: 0;
452
+ overflow: hidden;
453
+ }
454
+
455
+ .rpe-body-no-sidebar {
456
+ grid-template-columns: 1fr 260px;
457
+ }
458
+
459
+ /* Pages Sidebar */
460
+ .rpe-pages-sidebar {
461
+ display: flex;
462
+ flex-direction: column;
463
+ min-width: 0;
464
+ min-height: 0;
465
+ background: var(--rpe-white);
466
+ border-right: 1px solid var(--rpe-border);
467
+ overflow: hidden;
468
+ }
469
+
470
+ .rpe-pages-list {
471
+ flex: 1;
472
+ overflow-y: auto;
473
+ padding: 12px;
474
+ min-height: 0;
475
+ }
476
+
477
+ .rpe-pages-list-inner {
478
+ display: flex;
479
+ flex-direction: column;
480
+ gap: 0;
481
+ }
482
+
483
+ .rpe-page-card {
484
+ position: relative;
485
+ display: flex;
486
+ flex-direction: column;
487
+ align-items: center;
488
+ gap: 8px;
489
+ padding: 8px;
490
+ border: 2px solid transparent;
491
+ border-radius: 8px;
492
+ background: var(--rpe-bg);
493
+ cursor: grab;
494
+ touch-action: none;
495
+ user-select: none;
496
+ transition:
497
+ border-color 0.15s ease,
498
+ background 0.15s ease,
499
+ box-shadow 0.15s ease,
500
+ transform 0.15s ease,
501
+ opacity 0.15s ease;
502
+ }
503
+
504
+ .rpe-page-card:hover,
505
+ .rpe-page-card-selected {
506
+ border-color: var(--rpe-accent);
507
+ background: rgba(37, 99, 235, 0.05);
508
+ }
509
+
510
+ .rpe-page-card:focus-visible {
511
+ outline: 2px solid var(--rpe-accent);
512
+ outline-offset: 2px;
513
+ }
514
+
515
+ .rpe-page-thumbnail {
516
+ position: relative;
517
+ width: 100%;
518
+ aspect-ratio: 160 / 207;
519
+ min-height: 0;
520
+ display: flex;
521
+ align-items: center;
522
+ justify-content: center;
523
+ overflow: hidden;
524
+ background: var(--rpe-white);
525
+ border: 1px solid var(--rpe-border);
526
+ border-radius: 4px;
527
+ }
528
+
529
+ .rpe-page-thumbnail-stack {
530
+ position: absolute;
531
+ inset: 0;
532
+ width: 100%;
533
+ height: 100%;
534
+ }
535
+
536
+ .rpe-page-thumbnail-image {
537
+ display: block;
538
+ width: 100%;
539
+ height: 100%;
540
+ object-fit: contain;
541
+ pointer-events: none;
542
+ }
543
+
544
+ .rpe-page-thumbnail-overlay {
545
+ position: absolute;
546
+ inset: 0;
547
+ overflow: hidden;
548
+ pointer-events: none;
549
+ }
550
+
551
+ .rpe-page-thumbnail-highlight {
552
+ position: absolute;
553
+ border-radius: 1px;
554
+ opacity: 0.38;
555
+ mix-blend-mode: multiply;
556
+ }
557
+
558
+ .rpe-page-thumbnail-draw {
559
+ position: absolute;
560
+ inset: 0;
561
+ width: 100%;
562
+ height: 100%;
563
+ overflow: visible;
564
+ }
565
+
566
+ .rpe-page-thumbnail-text-item {
567
+ position: absolute;
568
+ max-width: 100%;
569
+ overflow: hidden;
570
+ transform-origin: center center;
571
+ }
572
+
573
+ .rpe-page-thumbnail-text-content {
574
+ box-sizing: border-box;
575
+ width: calc(100% / var(--rpe-thumb-scale, 1));
576
+ min-height: 100%;
577
+ margin: 0;
578
+ white-space: pre-wrap;
579
+ overflow-wrap: break-word;
580
+ word-break: break-word;
581
+ transform: scale(var(--rpe-thumb-scale, 1));
582
+ transform-origin: top left;
583
+ }
584
+
585
+ .rpe-page-thumbnail-media {
586
+ position: absolute;
587
+ display: block;
588
+ object-fit: contain;
589
+ transform-origin: center center;
590
+ }
591
+
592
+ .rpe-page-thumbnail-image-in {
593
+ animation: rpe-thumbnail-in 0.28s ease both;
594
+ }
595
+
596
+ @keyframes rpe-thumbnail-in {
597
+ from {
598
+ opacity: 0;
599
+ }
600
+ to {
601
+ opacity: 1;
602
+ }
603
+ }
604
+
605
+ .rpe-page-thumbnail-text {
606
+ color: var(--rpe-muted);
607
+ font-size: 12px;
608
+ }
609
+
610
+ .rpe-page-label {
611
+ font-size: 12px;
612
+ color: var(--rpe-ink);
613
+ }
614
+
615
+ .rpe-page-insert-rail {
616
+ position: relative;
617
+ display: flex;
618
+ align-items: center;
619
+ justify-content: center;
620
+ height: 14px;
621
+ flex-shrink: 0;
622
+ }
623
+
624
+ .rpe-page-insert-rail::before {
625
+ content: "";
626
+ position: absolute;
627
+ left: 20px;
628
+ right: 20px;
629
+ height: 1px;
630
+ background: transparent;
631
+ transition: background 0.15s ease;
632
+ }
633
+
634
+ .rpe-page-insert-rail:hover::before,
635
+ .rpe-page-insert-rail:focus-within::before {
636
+ background: var(--rpe-accent);
637
+ }
638
+
639
+ .rpe-page-insert-rail-button {
640
+ position: relative;
641
+ z-index: 1;
642
+ display: flex;
643
+ align-items: center;
644
+ justify-content: center;
645
+ width: 22px;
646
+ height: 22px;
647
+ padding: 0;
648
+ border: 1px solid var(--rpe-border);
649
+ border-radius: 999px;
650
+ background: var(--rpe-white);
651
+ color: var(--rpe-muted);
652
+ box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08);
653
+ opacity: 0;
654
+ transform: scale(0.86);
655
+ cursor: pointer;
656
+ transition:
657
+ opacity 0.15s ease,
658
+ transform 0.15s ease,
659
+ border-color 0.15s ease,
660
+ color 0.15s ease,
661
+ background 0.15s ease;
662
+ }
663
+
664
+ .rpe-page-insert-rail:hover .rpe-page-insert-rail-button,
665
+ .rpe-page-insert-rail-button:focus-visible {
666
+ opacity: 1;
667
+ transform: scale(1);
668
+ }
669
+
670
+ .rpe-page-insert-rail-button:hover:not(:disabled),
671
+ .rpe-page-insert-rail-button:focus-visible {
672
+ border-color: var(--rpe-accent);
673
+ color: var(--rpe-accent);
674
+ background: #eff6ff;
675
+ }
676
+
677
+ .rpe-page-insert-rail-button:focus-visible {
678
+ outline: 2px solid var(--rpe-accent);
679
+ outline-offset: 2px;
680
+ }
681
+
682
+ .rpe-page-insert-rail-button:disabled {
683
+ cursor: not-allowed;
684
+ opacity: 0;
685
+ }
686
+
687
+ .rpe-page-card-added {
688
+ animation: rpe-page-added 0.8s ease both;
689
+ }
690
+
691
+ @keyframes rpe-page-added {
692
+ 0% {
693
+ opacity: 0;
694
+ transform: translateY(-8px);
695
+ box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
696
+ }
697
+ 40% {
698
+ opacity: 1;
699
+ transform: translateY(0);
700
+ }
701
+ 100% {
702
+ box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
703
+ }
704
+ }
705
+
706
+ .rpe-page-card-removing {
707
+ animation: rpe-page-remove 0.18s ease forwards;
708
+ pointer-events: none;
709
+ }
710
+
711
+ @keyframes rpe-page-remove {
712
+ to {
713
+ opacity: 0;
714
+ transform: scale(0.94);
715
+ }
716
+ }
717
+
718
+ .rpe-page-grip,
719
+ .rpe-page-delete {
720
+ position: absolute;
721
+ z-index: 2;
722
+ display: flex;
723
+ align-items: center;
724
+ justify-content: center;
725
+ opacity: 0;
726
+ transition:
727
+ opacity 0.15s ease,
728
+ transform 0.15s ease,
729
+ border-color 0.15s ease,
730
+ color 0.15s ease,
731
+ background 0.15s ease;
732
+ }
733
+
734
+ .rpe-page-grip {
735
+ top: 12px;
736
+ left: 12px;
737
+ width: 18px;
738
+ height: 22px;
739
+ color: var(--rpe-muted);
740
+ pointer-events: none;
741
+ }
742
+
743
+ .rpe-page-delete {
744
+ top: 12px;
745
+ right: 12px;
746
+ width: 22px;
747
+ height: 22px;
748
+ padding: 0;
749
+ border: 1px solid var(--rpe-border);
750
+ border-radius: 999px;
751
+ background: var(--rpe-white);
752
+ color: var(--rpe-muted);
753
+ box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08);
754
+ cursor: pointer;
755
+ transform: scale(0.86);
756
+ }
757
+
758
+ .rpe-page-card:hover .rpe-page-grip,
759
+ .rpe-page-card:focus-within .rpe-page-grip,
760
+ .rpe-page-card-selected .rpe-page-grip,
761
+ .rpe-page-card:hover .rpe-page-delete,
762
+ .rpe-page-card:focus-within .rpe-page-delete,
763
+ .rpe-page-card-selected .rpe-page-delete {
764
+ opacity: 1;
765
+ }
766
+
767
+ .rpe-page-card:hover .rpe-page-delete,
768
+ .rpe-page-card:focus-within .rpe-page-delete,
769
+ .rpe-page-card-selected .rpe-page-delete {
770
+ transform: scale(1);
771
+ }
772
+
773
+ .rpe-page-delete:hover:not(:disabled),
774
+ .rpe-page-delete:focus-visible {
775
+ border-color: #dc2626;
776
+ color: #dc2626;
777
+ background: #fef2f2;
778
+ }
779
+
780
+ .rpe-page-delete:focus-visible {
781
+ outline: 2px solid #dc2626;
782
+ outline-offset: 2px;
783
+ opacity: 1;
784
+ transform: scale(1);
785
+ }
786
+
787
+ .rpe-page-delete:disabled {
788
+ cursor: not-allowed;
789
+ opacity: 0.35;
790
+ }
791
+
792
+ .rpe-page-card-placeholder {
793
+ border-style: dashed;
794
+ border-color: var(--rpe-border);
795
+ background: rgba(17, 24, 39, 0.03);
796
+ pointer-events: none;
797
+ }
798
+
799
+ .rpe-page-card-ghost {
800
+ position: fixed;
801
+ z-index: 30;
802
+ margin: 0;
803
+ cursor: grabbing;
804
+ pointer-events: none;
805
+ border-color: var(--rpe-accent);
806
+ background: var(--rpe-white);
807
+ box-shadow:
808
+ 0 18px 40px rgba(17, 24, 39, 0.18),
809
+ 0 2px 6px rgba(17, 24, 39, 0.08);
810
+ transform: scale(1.03) rotate(0.6deg);
811
+ opacity: 0.97;
812
+ }
813
+
814
+ .rpe-page-card-ghost .rpe-page-delete,
815
+ .rpe-page-card-ghost .rpe-page-grip {
816
+ opacity: 0;
817
+ }
818
+
819
+ .rpe-page-drop-line {
820
+ position: relative;
821
+ height: 0;
822
+ z-index: 3;
823
+ pointer-events: none;
824
+ }
825
+
826
+ .rpe-page-drop-line::before {
827
+ content: "";
828
+ position: absolute;
829
+ left: 16px;
830
+ right: 16px;
831
+ top: -8px;
832
+ height: 2px;
833
+ border-radius: 999px;
834
+ background: var(--rpe-accent);
835
+ box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
836
+ }
837
+
838
+ .rpe-page-drop-line::after {
839
+ content: "";
840
+ position: absolute;
841
+ left: 10px;
842
+ top: -11px;
843
+ width: 8px;
844
+ height: 8px;
845
+ border-radius: 999px;
846
+ background: var(--rpe-accent);
847
+ box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
848
+ }
849
+
850
+ .rpe-page-drop-line-end::before {
851
+ top: 6px;
852
+ }
853
+
854
+ .rpe-page-drop-line-end::after {
855
+ top: 3px;
856
+ }
857
+
858
+ .rpe-pages-sidebar-dragging,
859
+ .rpe-pages-sidebar-dragging .rpe-page-card {
860
+ cursor: grabbing;
861
+ user-select: none;
862
+ }
863
+
864
+ .rpe-pages-sidebar-dragging .rpe-page-insert-rail-button,
865
+ .rpe-pages-sidebar-dragging .rpe-page-delete,
866
+ .rpe-pages-sidebar-dragging .rpe-page-grip {
867
+ opacity: 0 !important;
868
+ pointer-events: none;
869
+ }
870
+
871
+ .rpe-sr-only {
872
+ position: absolute;
873
+ width: 1px;
874
+ height: 1px;
875
+ padding: 0;
876
+ margin: -1px;
877
+ overflow: hidden;
878
+ clip: rect(0, 0, 0, 0);
879
+ white-space: nowrap;
880
+ border: 0;
881
+ }
882
+
883
+ .rpe-add-page {
884
+ display: flex;
885
+ flex-direction: column;
886
+ gap: 6px;
887
+ margin: 12px;
888
+ flex-shrink: 0;
889
+ }
890
+
891
+ .rpe-add-page-button {
892
+ display: flex;
893
+ align-items: center;
894
+ justify-content: center;
895
+ gap: 6px;
896
+ width: 100%;
897
+ padding: 10px 12px;
898
+ border: 1px dashed var(--rpe-border);
899
+ border-radius: 8px;
900
+ background: var(--rpe-white);
901
+ color: var(--rpe-ink);
902
+ font-size: 13px;
903
+ font-weight: 500;
904
+ cursor: pointer;
905
+ transition:
906
+ border-color 0.15s ease,
907
+ color 0.15s ease,
908
+ background 0.15s ease,
909
+ box-shadow 0.15s ease;
910
+ }
911
+
912
+ .rpe-add-page-button:hover:not(:disabled) {
913
+ border-color: var(--rpe-accent);
914
+ color: var(--rpe-accent);
915
+ background: rgba(37, 99, 235, 0.05);
916
+ }
917
+
918
+ .rpe-add-page-button:focus-visible {
919
+ outline: 2px solid var(--rpe-accent);
920
+ outline-offset: 2px;
921
+ }
922
+
923
+ .rpe-add-page-button:active:not(:disabled) {
924
+ transform: translateY(0.5px);
925
+ }
926
+
927
+ .rpe-add-page-button:disabled:not(.rpe-add-page-button-busy) {
928
+ opacity: 0.5;
929
+ cursor: not-allowed;
930
+ }
931
+
932
+ .rpe-add-page-button-busy {
933
+ cursor: wait;
934
+ color: var(--rpe-muted);
935
+ }
936
+
937
+ .rpe-add-page-spinner {
938
+ width: 14px;
939
+ height: 14px;
940
+ border: 2px solid currentColor;
941
+ border-right-color: transparent;
942
+ border-radius: 50%;
943
+ animation: rpe-spin 0.6s linear infinite;
944
+ }
945
+
946
+ @keyframes rpe-spin {
947
+ to {
948
+ transform: rotate(360deg);
949
+ }
950
+ }
951
+
952
+ .rpe-add-page-error {
953
+ margin: 0;
954
+ color: #b91c1c;
955
+ font-size: 12px;
956
+ line-height: 1.4;
957
+ }
958
+
959
+ .rpe-stage-wrap {
960
+ position: relative;
961
+ display: flex;
962
+ flex-direction: column;
963
+ min-width: 0;
964
+ min-height: 0;
965
+ overflow: hidden;
966
+ }
967
+
968
+ /* Stage */
969
+ .rpe-stage {
970
+ display: flex;
971
+ flex-direction: column;
972
+ align-items: safe center;
973
+ justify-content: flex-start;
974
+ flex: 1;
975
+ min-width: 0;
976
+ min-height: 0;
977
+ overflow-x: auto;
978
+ overflow-y: scroll;
979
+ overscroll-behavior: contain;
980
+ padding: 32px 24px;
981
+ background: var(--rpe-bg);
982
+ outline: none;
983
+ scrollbar-gutter: stable;
984
+ scrollbar-width: thin;
985
+ scrollbar-color: #9ca3af #e5e7eb;
986
+ }
987
+
988
+ .rpe-stage::-webkit-scrollbar {
989
+ width: 12px;
990
+ height: 12px;
991
+ }
992
+
993
+ .rpe-stage::-webkit-scrollbar-track {
994
+ background: #e5e7eb;
995
+ }
996
+
997
+ .rpe-stage::-webkit-scrollbar-thumb {
998
+ background: #9ca3af;
999
+ border-radius: 6px;
1000
+ }
1001
+
1002
+ .rpe-stage::-webkit-scrollbar-thumb:hover {
1003
+ background: #6b7280;
1004
+ }
1005
+
1006
+ .rpe-stage-pages {
1007
+ display: flex;
1008
+ flex-direction: column;
1009
+ align-items: center;
1010
+ gap: 16px;
1011
+ width: max-content;
1012
+ min-width: 100%;
1013
+ padding-bottom: 24px;
1014
+ }
1015
+
1016
+ .rpe-page-slot {
1017
+ flex-shrink: 0;
1018
+ }
1019
+
1020
+ .rpe-page-slot-added {
1021
+ animation: rpe-page-enter 0.4s ease both;
1022
+ }
1023
+
1024
+ @keyframes rpe-page-enter {
1025
+ from {
1026
+ opacity: 0;
1027
+ transform: translateY(-12px);
1028
+ }
1029
+ to {
1030
+ opacity: 1;
1031
+ transform: translateY(0);
1032
+ }
1033
+ }
1034
+
1035
+ .rpe-page {
1036
+ position: relative;
1037
+ padding: 0;
1038
+ background: var(--rpe-white);
1039
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
1040
+ }
1041
+
1042
+ .rpe-page-canvas {
1043
+ display: block;
1044
+ }
1045
+
1046
+ /* Text Layer */
1047
+ .textLayer {
1048
+ position: absolute;
1049
+ inset: 0;
1050
+ overflow: clip;
1051
+ opacity: 1;
1052
+ line-height: 1;
1053
+ text-align: initial;
1054
+ forced-color-adjust: none;
1055
+ transform-origin: 0 0;
1056
+ caret-color: CanvasText;
1057
+ z-index: 1;
1058
+ }
1059
+
1060
+ .textLayer :is(span, br) {
1061
+ color: transparent;
1062
+ position: absolute;
1063
+ white-space: pre;
1064
+ cursor: text;
1065
+ transform-origin: 0% 0%;
1066
+ }
1067
+
1068
+ .textLayer {
1069
+ --min-font-size: 1;
1070
+ --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size));
1071
+ --min-font-size-inv: calc(1 / var(--min-font-size));
1072
+ }
1073
+
1074
+ .textLayer > :not(.markedContent),
1075
+ .textLayer .markedContent span:not(.markedContent) {
1076
+ z-index: 1;
1077
+ --font-height: 0;
1078
+ font-size: calc(var(--text-scale-factor) * var(--font-height));
1079
+ --scale-x: 1;
1080
+ --rotate: 0deg;
1081
+ transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));
1082
+ }
1083
+
1084
+ .textLayer .markedContent {
1085
+ display: contents;
1086
+ }
1087
+
1088
+ .textLayer span[role="img"] {
1089
+ user-select: none;
1090
+ cursor: default;
1091
+ }
1092
+
1093
+ .textLayer ::selection {
1094
+ background: rgba(0, 0, 255, 0.25);
1095
+ }
1096
+
1097
+ .rpe-page-highlighting {
1098
+ cursor: text;
1099
+ --rpe-highlight-color: #facc15;
1100
+ }
1101
+
1102
+ .rpe-page-highlighting .textLayer {
1103
+ user-select: text;
1104
+ cursor: text;
1105
+ }
1106
+
1107
+ .rpe-page-highlighting .textLayer ::selection {
1108
+ background: color-mix(in srgb, var(--rpe-highlight-color) 42%, transparent);
1109
+ }
1110
+
1111
+ .textLayer br::selection {
1112
+ background: transparent;
1113
+ }
1114
+
1115
+ .textLayer .endOfContent {
1116
+ display: block;
1117
+ position: absolute;
1118
+ inset: 100% 0 0;
1119
+ z-index: 0;
1120
+ cursor: default;
1121
+ user-select: none;
1122
+ }
1123
+
1124
+ .textLayer.selecting .endOfContent {
1125
+ top: 0;
1126
+ }
1127
+
1128
+ /* Search Highlights */
1129
+ .rpe-search-highlights {
1130
+ position: absolute;
1131
+ inset: 0;
1132
+ pointer-events: none;
1133
+ z-index: 2;
1134
+ }
1135
+
1136
+ .rpe-search-highlight {
1137
+ position: absolute;
1138
+ background: rgba(255, 255, 0, 0.3);
1139
+ border-radius: 2px;
1140
+ pointer-events: none;
1141
+ }
1142
+
1143
+ .rpe-search-highlight-current {
1144
+ background: rgba(255, 140, 0, 0.5);
1145
+ box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.8);
1146
+ }
1147
+
1148
+ .rpe-highlight-layer {
1149
+ position: absolute;
1150
+ inset: 0;
1151
+ pointer-events: none;
1152
+ }
1153
+
1154
+ .rpe-highlight-marks {
1155
+ position: absolute;
1156
+ inset: 0;
1157
+ z-index: 0;
1158
+ pointer-events: none;
1159
+ }
1160
+
1161
+ .rpe-highlight-mark {
1162
+ position: absolute;
1163
+ border-radius: 2px;
1164
+ opacity: 0.38;
1165
+ mix-blend-mode: multiply;
1166
+ pointer-events: none;
1167
+ }
1168
+
1169
+ .rpe-highlight-mark-live {
1170
+ opacity: 0.26;
1171
+ }
1172
+
1173
+ .rpe-highlight-mark-selected {
1174
+ box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18);
1175
+ }
1176
+
1177
+ .rpe-highlight-chrome {
1178
+ position: absolute;
1179
+ inset: 0;
1180
+ z-index: 5;
1181
+ pointer-events: none;
1182
+ }
1183
+
1184
+ .rpe-highlight-hit {
1185
+ position: absolute;
1186
+ padding: 0;
1187
+ border: 0;
1188
+ background: transparent;
1189
+ pointer-events: auto;
1190
+ cursor: move;
1191
+ }
1192
+
1193
+ .rpe-highlight-frame {
1194
+ position: absolute;
1195
+ pointer-events: auto;
1196
+ outline: 1.5px solid var(--rpe-accent);
1197
+ outline-offset: 3px;
1198
+ border-radius: 2px;
1199
+ cursor: move;
1200
+ touch-action: none;
1201
+ }
1202
+
1203
+ .rpe-highlight-item-toolbar {
1204
+ gap: 4px;
1205
+ padding: 5px 6px;
1206
+ }
1207
+
1208
+ .rpe-draw-layer {
1209
+ position: absolute;
1210
+ inset: 0;
1211
+ z-index: 3;
1212
+ pointer-events: none;
1213
+ }
1214
+
1215
+ .rpe-draw-layer-active {
1216
+ pointer-events: auto;
1217
+ cursor: crosshair;
1218
+ touch-action: none;
1219
+ user-select: none;
1220
+ }
1221
+
1222
+ .rpe-draw-svg {
1223
+ position: absolute;
1224
+ inset: 0;
1225
+ width: 100%;
1226
+ height: 100%;
1227
+ overflow: visible;
1228
+ pointer-events: none;
1229
+ }
1230
+
1231
+ .rpe-draw-layer-active .rpe-draw-svg {
1232
+ pointer-events: auto;
1233
+ }
1234
+
1235
+ .rpe-draw-layer:not(.rpe-draw-layer-active) .rpe-draw-svg {
1236
+ pointer-events: visibleStroke;
1237
+ }
1238
+
1239
+ .rpe-draw-hit {
1240
+ pointer-events: stroke;
1241
+ cursor: move;
1242
+ }
1243
+
1244
+ .rpe-draw-layer-active .rpe-draw-hit {
1245
+ cursor: crosshair;
1246
+ }
1247
+
1248
+ .rpe-draw-stroke-selected {
1249
+ filter: drop-shadow(0 0 0.5px var(--rpe-accent));
1250
+ }
1251
+
1252
+ .rpe-draw-frame {
1253
+ position: absolute;
1254
+ pointer-events: auto;
1255
+ outline: 1.5px solid var(--rpe-accent);
1256
+ outline-offset: 3px;
1257
+ border-radius: 2px;
1258
+ cursor: move;
1259
+ touch-action: none;
1260
+ }
1261
+
1262
+ .rpe-draw-toolbar {
1263
+ pointer-events: auto;
1264
+ }
1265
+
1266
+ .rpe-ink-toolbar {
1267
+ position: absolute;
1268
+ top: 16px;
1269
+ left: 50%;
1270
+ transform: translateX(-50%);
1271
+ z-index: 6;
1272
+ display: flex;
1273
+ align-items: center;
1274
+ gap: 8px;
1275
+ padding: 6px 8px;
1276
+ background: var(--rpe-white);
1277
+ border: 1px solid var(--rpe-border);
1278
+ border-radius: 8px;
1279
+ box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
1280
+ }
1281
+
1282
+ .rpe-ink-swatches,
1283
+ .rpe-ink-widths {
1284
+ display: flex;
1285
+ align-items: center;
1286
+ gap: 4px;
1287
+ }
1288
+
1289
+ .rpe-ink-divider {
1290
+ width: 1px;
1291
+ height: 18px;
1292
+ background: var(--rpe-border);
1293
+ }
1294
+
1295
+ .rpe-ink-swatch,
1296
+ .rpe-ink-picker-chip {
1297
+ width: 18px;
1298
+ height: 18px;
1299
+ border: 2px solid transparent;
1300
+ border-radius: 999px;
1301
+ padding: 0;
1302
+ cursor: pointer;
1303
+ box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
1304
+ }
1305
+
1306
+ .rpe-ink-swatch-active,
1307
+ .rpe-ink-picker:focus-within .rpe-ink-picker-chip {
1308
+ border-color: var(--rpe-accent);
1309
+ }
1310
+
1311
+ .rpe-ink-picker {
1312
+ position: relative;
1313
+ width: 18px;
1314
+ height: 18px;
1315
+ display: inline-flex;
1316
+ cursor: pointer;
1317
+ }
1318
+
1319
+ .rpe-ink-picker input {
1320
+ position: absolute;
1321
+ inset: 0;
1322
+ opacity: 0;
1323
+ cursor: pointer;
1324
+ }
1325
+
1326
+ .rpe-ink-width {
1327
+ display: inline-flex;
1328
+ align-items: center;
1329
+ justify-content: center;
1330
+ width: 28px;
1331
+ height: 28px;
1332
+ padding: 0;
1333
+ border: 1px solid transparent;
1334
+ border-radius: 6px;
1335
+ background: transparent;
1336
+ cursor: pointer;
1337
+ }
1338
+
1339
+ .rpe-ink-width:hover {
1340
+ background: var(--rpe-bg);
1341
+ }
1342
+
1343
+ .rpe-ink-width-active {
1344
+ background: rgba(37, 99, 235, 0.1);
1345
+ border-color: var(--rpe-accent);
1346
+ }
1347
+
1348
+ .rpe-ink-width-dot {
1349
+ display: block;
1350
+ border-radius: 999px;
1351
+ background: var(--rpe-ink);
1352
+ }
1353
+
1354
+ .rpe-page-texting .textLayer,
1355
+ .rpe-page-texting .rpe-draw-layer,
1356
+ .rpe-page-texting .rpe-draw-svg,
1357
+ .rpe-page-texting .rpe-highlight-layer {
1358
+ pointer-events: none !important;
1359
+ }
1360
+
1361
+ .rpe-text-hit-layer {
1362
+ position: absolute;
1363
+ inset: 0;
1364
+ z-index: 6;
1365
+ cursor: text;
1366
+ }
1367
+
1368
+ .rpe-text-annotations {
1369
+ position: absolute;
1370
+ inset: 0;
1371
+ z-index: 7;
1372
+ pointer-events: none;
1373
+ }
1374
+
1375
+ .rpe-text-frame {
1376
+ --rpe-rotation: 0deg;
1377
+ position: absolute;
1378
+ pointer-events: auto;
1379
+ min-width: 28px;
1380
+ min-height: 28px;
1381
+ outline: 1px solid transparent;
1382
+ outline-offset: 0;
1383
+ border-radius: 1px;
1384
+ transform: rotate(var(--rpe-rotation));
1385
+ transform-origin: center center;
1386
+ }
1387
+
1388
+ .rpe-text-frame-hover {
1389
+ outline-color: rgba(37, 99, 235, 0.45);
1390
+ }
1391
+
1392
+ .rpe-text-frame-selected {
1393
+ z-index: 2;
1394
+ outline-color: var(--rpe-accent);
1395
+ outline-width: 1.5px;
1396
+ }
1397
+
1398
+ .rpe-text-frame-editing {
1399
+ outline-color: var(--rpe-accent);
1400
+ }
1401
+
1402
+ .rpe-text-frame-dragging,
1403
+ .rpe-text-frame-resizing,
1404
+ .rpe-text-frame-rotating {
1405
+ outline-color: var(--rpe-accent);
1406
+ user-select: none;
1407
+ }
1408
+
1409
+ .rpe-draw-frame.rpe-text-frame-dragging,
1410
+ .rpe-highlight-frame.rpe-text-frame-dragging {
1411
+ cursor: grabbing;
1412
+ }
1413
+
1414
+ .rpe-text-frame-dragging .rpe-text-toolbar,
1415
+ .rpe-text-frame-dragging .rpe-text-handle,
1416
+ .rpe-text-frame-dragging .rpe-rotate-handle,
1417
+ .rpe-text-frame-resizing .rpe-text-toolbar,
1418
+ .rpe-text-frame-resizing .rpe-rotate-handle,
1419
+ .rpe-text-frame-rotating .rpe-text-toolbar {
1420
+ opacity: 0;
1421
+ pointer-events: none;
1422
+ }
1423
+
1424
+ .rpe-text-content {
1425
+ box-sizing: border-box;
1426
+ width: 100%;
1427
+ height: 100%;
1428
+ min-width: 1ch;
1429
+ min-height: 1em;
1430
+ padding: 4px 8px;
1431
+ margin: 0;
1432
+ outline: none;
1433
+ background: transparent;
1434
+ white-space: pre-wrap;
1435
+ overflow-wrap: break-word;
1436
+ word-break: break-word;
1437
+ line-height: 1.25;
1438
+ caret-color: var(--rpe-accent);
1439
+ overflow: hidden;
1440
+ }
1441
+
1442
+ .rpe-text-content div,
1443
+ .rpe-text-content p {
1444
+ margin: 0;
1445
+ padding: 0;
1446
+ }
1447
+
1448
+ .rpe-text-frame:not(.rpe-text-frame-editing) .rpe-text-content {
1449
+ user-select: none;
1450
+ }
1451
+
1452
+ .rpe-text-content:empty::before {
1453
+ content: attr(data-placeholder);
1454
+ color: #9ca3af;
1455
+ }
1456
+
1457
+ .rpe-text-handle {
1458
+ position: absolute;
1459
+ width: 8px;
1460
+ height: 8px;
1461
+ background: var(--rpe-white);
1462
+ border: 1.5px solid var(--rpe-accent);
1463
+ border-radius: 1px;
1464
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
1465
+ z-index: 3;
1466
+ }
1467
+
1468
+ .rpe-text-handle-nw { top: -5px; left: -5px; cursor: nwse-resize; }
1469
+ .rpe-text-handle-n { top: -5px; left: 50%; margin-left: -4px; cursor: ns-resize; }
1470
+ .rpe-text-handle-ne { top: -5px; right: -5px; cursor: nesw-resize; }
1471
+ .rpe-text-handle-e { top: 50%; right: -5px; margin-top: -4px; cursor: ew-resize; }
1472
+ .rpe-text-handle-se { bottom: -5px; right: -5px; cursor: nwse-resize; }
1473
+ .rpe-text-handle-s { bottom: -5px; left: 50%; margin-left: -4px; cursor: ns-resize; }
1474
+ .rpe-text-handle-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
1475
+ .rpe-text-handle-w { top: 50%; left: -5px; margin-top: -4px; cursor: ew-resize; }
1476
+
1477
+ .rpe-rotate-handle {
1478
+ position: absolute;
1479
+ left: 50%;
1480
+ top: -28px;
1481
+ width: 12px;
1482
+ height: 12px;
1483
+ margin-left: -6px;
1484
+ background: var(--rpe-white);
1485
+ border: 1.5px solid var(--rpe-accent);
1486
+ border-radius: 50%;
1487
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
1488
+ cursor: grab;
1489
+ z-index: 4;
1490
+ touch-action: none;
1491
+ }
1492
+
1493
+ .rpe-rotate-handle::before {
1494
+ content: "";
1495
+ position: absolute;
1496
+ left: 50%;
1497
+ top: 100%;
1498
+ width: 1.5px;
1499
+ height: 16px;
1500
+ margin-left: -0.75px;
1501
+ background: var(--rpe-accent);
1502
+ }
1503
+
1504
+ .rpe-text-frame-rotating .rpe-rotate-handle {
1505
+ cursor: grabbing;
1506
+ }
1507
+
1508
+ .rpe-rotate-badge {
1509
+ position: absolute;
1510
+ left: 50%;
1511
+ top: -52px;
1512
+ transform: translateX(-50%) rotate(calc(-1 * var(--rpe-rotation)));
1513
+ padding: 2px 6px;
1514
+ border-radius: 4px;
1515
+ background: var(--rpe-ink);
1516
+ color: var(--rpe-white);
1517
+ font-size: 11px;
1518
+ font-weight: 600;
1519
+ line-height: 1.2;
1520
+ pointer-events: none;
1521
+ z-index: 5;
1522
+ white-space: nowrap;
1523
+ }
1524
+
1525
+ .rpe-text-toolbar {
1526
+ position: absolute;
1527
+ left: 50%;
1528
+ bottom: calc(100% + 36px);
1529
+ transform: translateX(-50%) rotate(calc(-1 * var(--rpe-rotation)));
1530
+ display: flex;
1531
+ flex-wrap: nowrap;
1532
+ align-items: center;
1533
+ width: max-content;
1534
+ min-width: max-content;
1535
+ gap: 2px;
1536
+ padding: 4px;
1537
+ background: var(--rpe-white);
1538
+ border: 1px solid var(--rpe-border);
1539
+ border-radius: 8px;
1540
+ box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
1541
+ z-index: 5;
1542
+ white-space: nowrap;
1543
+ }
1544
+
1545
+ .rpe-text-toolbar-below {
1546
+ bottom: auto;
1547
+ top: calc(100% + 12px);
1548
+ }
1549
+
1550
+ .rpe-text-toolbar-button {
1551
+ display: inline-flex;
1552
+ align-items: center;
1553
+ justify-content: center;
1554
+ width: 28px;
1555
+ height: 28px;
1556
+ padding: 0;
1557
+ border: 1px solid transparent;
1558
+ border-radius: 6px;
1559
+ background: transparent;
1560
+ color: var(--rpe-ink);
1561
+ font-size: 13px;
1562
+ font-weight: 700;
1563
+ cursor: pointer;
1564
+ }
1565
+
1566
+ .rpe-text-toolbar-button:hover {
1567
+ background: var(--rpe-bg);
1568
+ }
1569
+
1570
+ .rpe-text-toolbar-button-active {
1571
+ background: rgba(37, 99, 235, 0.1);
1572
+ color: var(--rpe-accent);
1573
+ }
1574
+
1575
+ .rpe-text-toolbar-danger:hover {
1576
+ background: #fef2f2;
1577
+ color: #dc2626;
1578
+ }
1579
+
1580
+ .rpe-text-toolbar-divider {
1581
+ width: 1px;
1582
+ height: 16px;
1583
+ margin: 0 4px;
1584
+ background: var(--rpe-border);
1585
+ }
1586
+
1587
+ .rpe-text-toolbar-button:disabled {
1588
+ opacity: 0.4;
1589
+ cursor: not-allowed;
1590
+ }
1591
+
1592
+ .rpe-text-toolbar-size {
1593
+ width: 38px;
1594
+ height: 28px;
1595
+ padding: 0 4px;
1596
+ border: 1px solid var(--rpe-border);
1597
+ border-radius: 6px;
1598
+ background: var(--rpe-white);
1599
+ color: var(--rpe-ink);
1600
+ font-size: 12px;
1601
+ font-weight: 600;
1602
+ font-family: inherit;
1603
+ text-align: center;
1604
+ outline: none;
1605
+ }
1606
+
1607
+ .rpe-text-toolbar-size:focus {
1608
+ border-color: var(--rpe-accent);
1609
+ }
1610
+
1611
+ .rpe-text-toolbar-size-invalid {
1612
+ border-color: #dc2626;
1613
+ color: #dc2626;
1614
+ }
1615
+
1616
+ .rpe-text-toolbar-color {
1617
+ width: 28px;
1618
+ height: 28px;
1619
+ display: inline-flex;
1620
+ align-items: center;
1621
+ justify-content: center;
1622
+ cursor: pointer;
1623
+ }
1624
+
1625
+ .rpe-text-toolbar-color input {
1626
+ width: 16px;
1627
+ height: 16px;
1628
+ padding: 0;
1629
+ border: 1px solid var(--rpe-border);
1630
+ border-radius: 999px;
1631
+ background: transparent;
1632
+ cursor: pointer;
1633
+ }
1634
+
1635
+ .rpe-message {
1636
+ margin: auto;
1637
+ color: var(--rpe-muted);
1638
+ font-size: 14px;
1639
+ }
1640
+
1641
+ .rpe-message-error {
1642
+ color: #dc2626;
1643
+ }
1644
+
1645
+ .rpe-load-status {
1646
+ margin: auto;
1647
+ display: flex;
1648
+ flex-direction: column;
1649
+ align-items: center;
1650
+ gap: 10px;
1651
+ color: var(--rpe-muted);
1652
+ font-size: 14px;
1653
+ }
1654
+
1655
+ .rpe-load-status-row {
1656
+ display: flex;
1657
+ align-items: center;
1658
+ gap: 10px;
1659
+ }
1660
+
1661
+ .rpe-load-spinner {
1662
+ width: 16px;
1663
+ height: 16px;
1664
+ border: 2px solid currentColor;
1665
+ border-right-color: transparent;
1666
+ border-radius: 50%;
1667
+ animation: rpe-spin 0.6s linear infinite;
1668
+ flex-shrink: 0;
1669
+ }
1670
+
1671
+ .rpe-load-percent {
1672
+ font-variant-numeric: tabular-nums;
1673
+ }
1674
+
1675
+ .rpe-load-bar {
1676
+ width: 180px;
1677
+ height: 4px;
1678
+ border-radius: 999px;
1679
+ background: #e5e7eb;
1680
+ overflow: hidden;
1681
+ }
1682
+
1683
+ .rpe-load-bar > div {
1684
+ height: 100%;
1685
+ border-radius: inherit;
1686
+ background: var(--rpe-accent);
1687
+ transition: width 0.15s linear;
1688
+ }
1689
+
1690
+ /* Properties Panel */
1691
+ .rpe-properties-panel {
1692
+ display: flex;
1693
+ flex-direction: column;
1694
+ min-width: 0;
1695
+ min-height: 0;
1696
+ background: var(--rpe-white);
1697
+ border-left: 1px solid var(--rpe-border);
1698
+ overflow-y: auto;
1699
+ }
1700
+
1701
+ .rpe-properties-header {
1702
+ display: flex;
1703
+ align-items: center;
1704
+ justify-content: space-between;
1705
+ gap: 8px;
1706
+ padding: 12px 16px;
1707
+ border-bottom: 1px solid var(--rpe-border);
1708
+ font-weight: 600;
1709
+ font-size: 14px;
1710
+ color: var(--rpe-ink);
1711
+ flex-shrink: 0;
1712
+ }
1713
+
1714
+ .rpe-properties-close,
1715
+ .rpe-drawer-close {
1716
+ display: inline-flex;
1717
+ align-items: center;
1718
+ justify-content: center;
1719
+ width: 32px;
1720
+ height: 32px;
1721
+ margin: -4px -4px 0 0;
1722
+ padding: 0;
1723
+ border: none;
1724
+ border-radius: 8px;
1725
+ background: transparent;
1726
+ color: var(--rpe-muted);
1727
+ cursor: pointer;
1728
+ }
1729
+
1730
+ .rpe-properties-close:hover,
1731
+ .rpe-drawer-close:hover {
1732
+ background: var(--rpe-bg);
1733
+ color: var(--rpe-ink);
1734
+ }
1735
+
1736
+ .rpe-properties-empty {
1737
+ padding: 24px 16px;
1738
+ color: var(--rpe-muted);
1739
+ font-size: 13px;
1740
+ text-align: center;
1741
+ line-height: 1.5;
1742
+ }
1743
+
1744
+ .rpe-properties-form {
1745
+ display: flex;
1746
+ flex-direction: column;
1747
+ gap: 14px;
1748
+ padding: 16px;
1749
+ }
1750
+
1751
+ .rpe-properties-field {
1752
+ display: flex;
1753
+ flex-direction: column;
1754
+ gap: 6px;
1755
+ }
1756
+
1757
+ .rpe-properties-label {
1758
+ font-size: 12px;
1759
+ font-weight: 500;
1760
+ color: var(--rpe-muted);
1761
+ }
1762
+
1763
+ .rpe-properties-input,
1764
+ .rpe-properties-select,
1765
+ .rpe-properties-textarea {
1766
+ width: 100%;
1767
+ border: 1px solid var(--rpe-border);
1768
+ border-radius: 6px;
1769
+ background: var(--rpe-white);
1770
+ color: var(--rpe-ink);
1771
+ font-size: 13px;
1772
+ font-family: inherit;
1773
+ outline: none;
1774
+ }
1775
+
1776
+ .rpe-properties-input,
1777
+ .rpe-properties-select {
1778
+ height: 32px;
1779
+ padding: 0 8px;
1780
+ }
1781
+
1782
+ .rpe-properties-textarea {
1783
+ padding: 8px;
1784
+ resize: vertical;
1785
+ min-height: 72px;
1786
+ line-height: 1.4;
1787
+ }
1788
+
1789
+ .rpe-properties-input:focus,
1790
+ .rpe-properties-select:focus,
1791
+ .rpe-properties-textarea:focus {
1792
+ border-color: var(--rpe-accent);
1793
+ }
1794
+
1795
+ .rpe-properties-color {
1796
+ width: 44px;
1797
+ height: 32px;
1798
+ padding: 2px;
1799
+ border: 1px solid var(--rpe-border);
1800
+ border-radius: 6px;
1801
+ background: var(--rpe-white);
1802
+ cursor: pointer;
1803
+ }
1804
+
1805
+ .rpe-properties-row {
1806
+ display: flex;
1807
+ gap: 6px;
1808
+ }
1809
+
1810
+ .rpe-properties-row .rpe-properties-input {
1811
+ flex: 1;
1812
+ min-width: 0;
1813
+ }
1814
+
1815
+ .rpe-properties-toggle {
1816
+ display: inline-flex;
1817
+ align-items: center;
1818
+ justify-content: center;
1819
+ min-width: 32px;
1820
+ height: 32px;
1821
+ padding: 0 8px;
1822
+ border: 1px solid var(--rpe-border);
1823
+ border-radius: 6px;
1824
+ background: var(--rpe-white);
1825
+ color: var(--rpe-ink);
1826
+ font-size: 12px;
1827
+ font-weight: 600;
1828
+ cursor: pointer;
1829
+ }
1830
+
1831
+ .rpe-properties-toggle:hover {
1832
+ background: var(--rpe-bg);
1833
+ }
1834
+
1835
+ .rpe-properties-toggle-active {
1836
+ background: var(--rpe-accent);
1837
+ border-color: var(--rpe-accent);
1838
+ color: white;
1839
+ }
1840
+
1841
+ .rpe-properties-toggle-active:hover {
1842
+ background: var(--rpe-accent-hover);
1843
+ border-color: var(--rpe-accent-hover);
1844
+ }
1845
+
1846
+ /* Responsive */
1847
+ @media (max-width: 1024px) {
1848
+ .rpe-body {
1849
+ grid-template-columns: 180px 1fr 220px;
1850
+ }
1851
+
1852
+ .rpe-body-no-sidebar {
1853
+ grid-template-columns: 1fr 220px;
1854
+ }
1855
+ }
1856
+
1857
+ @media (max-width: 768px) {
1858
+ .rpe-root:not(.rpe-root-compact) .rpe-toolbar,
1859
+ .rpe-root:not(.rpe-root-compact) .rpe-toolbar-main {
1860
+ flex-wrap: wrap;
1861
+ }
1862
+ }
1863
+
1864
+ /* Signature */
1865
+ .rpe-page-signing .textLayer,
1866
+ .rpe-page-signing .rpe-draw-layer,
1867
+ .rpe-page-signing .rpe-draw-svg,
1868
+ .rpe-page-signing .rpe-highlight-layer,
1869
+ .rpe-page-imaging .textLayer,
1870
+ .rpe-page-imaging .rpe-draw-layer,
1871
+ .rpe-page-imaging .rpe-draw-svg,
1872
+ .rpe-page-imaging .rpe-highlight-layer {
1873
+ pointer-events: none !important;
1874
+ }
1875
+
1876
+ .rpe-signature-hit-layer {
1877
+ position: absolute;
1878
+ inset: 0;
1879
+ z-index: 8;
1880
+ cursor: copy;
1881
+ }
1882
+
1883
+ .rpe-signature-annotations {
1884
+ position: absolute;
1885
+ inset: 0;
1886
+ z-index: 4;
1887
+ pointer-events: none;
1888
+ }
1889
+
1890
+ .rpe-signature-frame {
1891
+ pointer-events: auto;
1892
+ }
1893
+
1894
+ .rpe-signature-image {
1895
+ display: block;
1896
+ width: 100%;
1897
+ height: 100%;
1898
+ object-fit: contain;
1899
+ pointer-events: none;
1900
+ user-select: none;
1901
+ }
1902
+
1903
+ .rpe-signature-place-hint {
1904
+ color: var(--rpe-ink);
1905
+ font-size: 13px;
1906
+ font-weight: 500;
1907
+ white-space: nowrap;
1908
+ }
1909
+
1910
+ .rpe-signature-place-button {
1911
+ height: 28px;
1912
+ padding: 0 10px;
1913
+ border: 1px solid transparent;
1914
+ border-radius: 6px;
1915
+ background: transparent;
1916
+ color: var(--rpe-ink);
1917
+ font-size: 12px;
1918
+ font-weight: 600;
1919
+ font-family: inherit;
1920
+ cursor: pointer;
1921
+ }
1922
+
1923
+ .rpe-signature-place-button:hover {
1924
+ background: var(--rpe-bg);
1925
+ }
1926
+
1927
+ .rpe-modal-backdrop {
1928
+ position: absolute;
1929
+ inset: 0;
1930
+ z-index: 20;
1931
+ display: flex;
1932
+ align-items: center;
1933
+ justify-content: center;
1934
+ padding: 24px;
1935
+ background: rgba(15, 23, 42, 0.42);
1936
+ }
1937
+
1938
+ .rpe-modal {
1939
+ width: min(560px, 100%);
1940
+ max-height: min(720px, 100%);
1941
+ display: flex;
1942
+ flex-direction: column;
1943
+ background: var(--rpe-white);
1944
+ border: 1px solid var(--rpe-border);
1945
+ border-radius: 16px;
1946
+ box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
1947
+ overflow: hidden;
1948
+ outline: none;
1949
+ }
1950
+
1951
+ .rpe-modal-header {
1952
+ display: flex;
1953
+ align-items: flex-start;
1954
+ justify-content: space-between;
1955
+ gap: 16px;
1956
+ padding: 20px 20px 12px;
1957
+ }
1958
+
1959
+ .rpe-modal-title {
1960
+ margin: 0;
1961
+ font-size: 18px;
1962
+ font-weight: 650;
1963
+ letter-spacing: -0.02em;
1964
+ }
1965
+
1966
+ .rpe-modal-subtitle {
1967
+ margin: 4px 0 0;
1968
+ color: var(--rpe-muted);
1969
+ font-size: 13px;
1970
+ }
1971
+
1972
+ .rpe-modal-close {
1973
+ display: inline-flex;
1974
+ align-items: center;
1975
+ justify-content: center;
1976
+ width: 32px;
1977
+ height: 32px;
1978
+ margin: -4px -4px 0 0;
1979
+ border: none;
1980
+ border-radius: 8px;
1981
+ background: transparent;
1982
+ color: var(--rpe-muted);
1983
+ cursor: pointer;
1984
+ }
1985
+
1986
+ .rpe-modal-close:hover {
1987
+ background: var(--rpe-bg);
1988
+ color: var(--rpe-ink);
1989
+ }
1990
+
1991
+ .rpe-modal-footer {
1992
+ display: flex;
1993
+ justify-content: flex-end;
1994
+ gap: 8px;
1995
+ padding: 14px 20px 18px;
1996
+ border-top: 1px solid var(--rpe-border);
1997
+ }
1998
+
1999
+ .rpe-modal-primary,
2000
+ .rpe-modal-secondary {
2001
+ display: inline-flex;
2002
+ align-items: center;
2003
+ justify-content: center;
2004
+ gap: 6px;
2005
+ height: 36px;
2006
+ padding: 0 14px;
2007
+ border-radius: 8px;
2008
+ font-size: 13px;
2009
+ font-weight: 600;
2010
+ font-family: inherit;
2011
+ cursor: pointer;
2012
+ }
2013
+
2014
+ .rpe-modal-primary {
2015
+ border: 1px solid var(--rpe-accent);
2016
+ background: var(--rpe-accent);
2017
+ color: #ffffff;
2018
+ }
2019
+
2020
+ .rpe-modal-primary:hover:not(:disabled) {
2021
+ background: var(--rpe-accent-hover);
2022
+ border-color: var(--rpe-accent-hover);
2023
+ }
2024
+
2025
+ .rpe-modal-primary:disabled {
2026
+ opacity: 0.45;
2027
+ cursor: not-allowed;
2028
+ }
2029
+
2030
+ .rpe-modal-secondary {
2031
+ border: 1px solid var(--rpe-border);
2032
+ background: var(--rpe-white);
2033
+ color: var(--rpe-ink);
2034
+ }
2035
+
2036
+ .rpe-modal-secondary:hover:not(:disabled) {
2037
+ background: var(--rpe-bg);
2038
+ }
2039
+
2040
+ .rpe-modal-secondary:disabled {
2041
+ opacity: 0.45;
2042
+ cursor: not-allowed;
2043
+ }
2044
+
2045
+ .rpe-signature-saved {
2046
+ padding: 0 20px 12px;
2047
+ }
2048
+
2049
+ .rpe-signature-saved-label {
2050
+ margin-bottom: 8px;
2051
+ color: var(--rpe-muted);
2052
+ font-size: 11px;
2053
+ font-weight: 650;
2054
+ letter-spacing: 0.04em;
2055
+ text-transform: uppercase;
2056
+ }
2057
+
2058
+ .rpe-signature-saved-row {
2059
+ display: flex;
2060
+ gap: 8px;
2061
+ overflow-x: auto;
2062
+ }
2063
+
2064
+ .rpe-signature-saved-item {
2065
+ position: relative;
2066
+ flex: 0 0 auto;
2067
+ }
2068
+
2069
+ .rpe-signature-saved-button {
2070
+ width: 96px;
2071
+ height: 48px;
2072
+ padding: 6px;
2073
+ border: 1px solid var(--rpe-border);
2074
+ border-radius: 8px;
2075
+ background: #fafafa;
2076
+ cursor: pointer;
2077
+ }
2078
+
2079
+ .rpe-signature-saved-button:hover {
2080
+ border-color: var(--rpe-accent);
2081
+ }
2082
+
2083
+ .rpe-signature-saved-button img {
2084
+ display: block;
2085
+ width: 100%;
2086
+ height: 100%;
2087
+ object-fit: contain;
2088
+ }
2089
+
2090
+ .rpe-signature-saved-remove {
2091
+ position: absolute;
2092
+ top: -6px;
2093
+ right: -6px;
2094
+ display: inline-flex;
2095
+ align-items: center;
2096
+ justify-content: center;
2097
+ width: 18px;
2098
+ height: 18px;
2099
+ border: 1px solid var(--rpe-border);
2100
+ border-radius: 999px;
2101
+ background: var(--rpe-white);
2102
+ color: var(--rpe-muted);
2103
+ cursor: pointer;
2104
+ }
2105
+
2106
+ .rpe-signature-saved-remove:hover {
2107
+ color: #dc2626;
2108
+ border-color: #fecaca;
2109
+ background: #fef2f2;
2110
+ }
2111
+
2112
+ .rpe-signature-tabs {
2113
+ display: grid;
2114
+ grid-template-columns: repeat(3, 1fr);
2115
+ gap: 4px;
2116
+ margin: 0 20px 14px;
2117
+ padding: 4px;
2118
+ background: var(--rpe-bg);
2119
+ border-radius: 10px;
2120
+ }
2121
+
2122
+ .rpe-signature-tab {
2123
+ display: inline-flex;
2124
+ align-items: center;
2125
+ justify-content: center;
2126
+ gap: 6px;
2127
+ height: 34px;
2128
+ border: none;
2129
+ border-radius: 8px;
2130
+ background: transparent;
2131
+ color: var(--rpe-muted);
2132
+ font-size: 13px;
2133
+ font-weight: 600;
2134
+ font-family: inherit;
2135
+ cursor: pointer;
2136
+ }
2137
+
2138
+ .rpe-signature-tab-active {
2139
+ background: var(--rpe-white);
2140
+ color: var(--rpe-ink);
2141
+ box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
2142
+ }
2143
+
2144
+ .rpe-signature-body {
2145
+ display: flex;
2146
+ flex-direction: column;
2147
+ gap: 12px;
2148
+ min-height: 0;
2149
+ padding: 0 20px 4px;
2150
+ overflow: auto;
2151
+ }
2152
+
2153
+ .rpe-signature-sheet {
2154
+ position: relative;
2155
+ height: 168px;
2156
+ overflow: hidden;
2157
+ background:
2158
+ linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
2159
+ border: 1px solid var(--rpe-border);
2160
+ border-radius: 12px;
2161
+ }
2162
+
2163
+ .rpe-signature-sheet-type {
2164
+ display: flex;
2165
+ align-items: center;
2166
+ padding: 0 20px;
2167
+ }
2168
+
2169
+ .rpe-signature-pad-canvas {
2170
+ display: block;
2171
+ width: 100%;
2172
+ height: 100%;
2173
+ touch-action: none;
2174
+ cursor: crosshair;
2175
+ }
2176
+
2177
+ .rpe-signature-baseline {
2178
+ position: absolute;
2179
+ left: 20px;
2180
+ right: 20px;
2181
+ bottom: 44px;
2182
+ height: 1px;
2183
+ background: repeating-linear-gradient(
2184
+ 90deg,
2185
+ #d1d5db 0 8px,
2186
+ transparent 8px 12px
2187
+ );
2188
+ pointer-events: none;
2189
+ }
2190
+
2191
+ .rpe-signature-sheet-hint {
2192
+ position: absolute;
2193
+ left: 20px;
2194
+ bottom: 52px;
2195
+ color: #9ca3af;
2196
+ font-family: Georgia, "Times New Roman", serif;
2197
+ font-style: italic;
2198
+ font-size: 15px;
2199
+ pointer-events: none;
2200
+ }
2201
+
2202
+ .rpe-signature-controls,
2203
+ .rpe-signature-control-actions {
2204
+ display: flex;
2205
+ align-items: center;
2206
+ justify-content: space-between;
2207
+ gap: 8px;
2208
+ }
2209
+
2210
+ .rpe-signature-type,
2211
+ .rpe-signature-draw,
2212
+ .rpe-signature-upload {
2213
+ position: relative;
2214
+ display: flex;
2215
+ flex-direction: column;
2216
+ gap: 12px;
2217
+ }
2218
+
2219
+ .rpe-signature-field {
2220
+ display: flex;
2221
+ flex-direction: column;
2222
+ gap: 6px;
2223
+ }
2224
+
2225
+ .rpe-signature-field-label {
2226
+ color: var(--rpe-muted);
2227
+ font-size: 12px;
2228
+ font-weight: 600;
2229
+ }
2230
+
2231
+ .rpe-signature-input {
2232
+ height: 38px;
2233
+ padding: 0 12px;
2234
+ border: 1px solid var(--rpe-border);
2235
+ border-radius: 8px;
2236
+ background: var(--rpe-white);
2237
+ color: var(--rpe-ink);
2238
+ font-size: 14px;
2239
+ font-family: inherit;
2240
+ outline: none;
2241
+ }
2242
+
2243
+ .rpe-signature-input:focus {
2244
+ border-color: var(--rpe-accent);
2245
+ box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
2246
+ }
2247
+
2248
+ .rpe-signature-type-preview {
2249
+ width: 100%;
2250
+ overflow: hidden;
2251
+ }
2252
+
2253
+ .rpe-signature-type-text {
2254
+ display: block;
2255
+ font-size: 44px;
2256
+ line-height: 1.1;
2257
+ white-space: nowrap;
2258
+ overflow: hidden;
2259
+ text-overflow: ellipsis;
2260
+ }
2261
+
2262
+ .rpe-signature-type-placeholder {
2263
+ color: #d1d5db !important;
2264
+ }
2265
+
2266
+ .rpe-signature-fonts {
2267
+ display: grid;
2268
+ grid-template-columns: repeat(4, 1fr);
2269
+ gap: 6px;
2270
+ }
2271
+
2272
+ .rpe-signature-font {
2273
+ height: 36px;
2274
+ border: 1px solid var(--rpe-border);
2275
+ border-radius: 8px;
2276
+ background: var(--rpe-white);
2277
+ color: var(--rpe-ink);
2278
+ font-size: 16px;
2279
+ cursor: pointer;
2280
+ }
2281
+
2282
+ .rpe-signature-font-active {
2283
+ border-color: var(--rpe-accent);
2284
+ background: rgba(37, 99, 235, 0.06);
2285
+ color: var(--rpe-accent);
2286
+ }
2287
+
2288
+ .rpe-signature-file {
2289
+ position: absolute;
2290
+ width: 1px;
2291
+ height: 1px;
2292
+ opacity: 0;
2293
+ pointer-events: none;
2294
+ }
2295
+
2296
+ .rpe-signature-dropzone {
2297
+ display: flex;
2298
+ align-items: center;
2299
+ justify-content: center;
2300
+ min-height: 168px;
2301
+ padding: 16px;
2302
+ border: 1.5px dashed #cbd5e1;
2303
+ border-radius: 12px;
2304
+ background: #fafafa;
2305
+ cursor: pointer;
2306
+ }
2307
+
2308
+ .rpe-signature-dropzone-active,
2309
+ .rpe-signature-dropzone:hover {
2310
+ border-color: var(--rpe-accent);
2311
+ background: rgba(37, 99, 235, 0.04);
2312
+ }
2313
+
2314
+ .rpe-signature-dropzone-filled {
2315
+ background: #ffffff;
2316
+ }
2317
+
2318
+ .rpe-signature-dropzone img {
2319
+ max-width: 100%;
2320
+ max-height: 140px;
2321
+ object-fit: contain;
2322
+ }
2323
+
2324
+ .rpe-signature-dropzone-copy {
2325
+ display: flex;
2326
+ flex-direction: column;
2327
+ align-items: center;
2328
+ gap: 6px;
2329
+ color: var(--rpe-muted);
2330
+ text-align: center;
2331
+ }
2332
+
2333
+ .rpe-signature-dropzone-copy strong {
2334
+ color: var(--rpe-ink);
2335
+ font-size: 14px;
2336
+ }
2337
+
2338
+ .rpe-signature-dropzone-copy span {
2339
+ font-size: 12px;
2340
+ }
2341
+
2342
+ .rpe-signature-error {
2343
+ color: #dc2626;
2344
+ font-size: 12px;
2345
+ }
2346
+
2347
+ .rpe-properties-preview {
2348
+ width: 100%;
2349
+ height: 72px;
2350
+ padding: 8px;
2351
+ border: 1px solid var(--rpe-border);
2352
+ border-radius: 8px;
2353
+ background: #fafafa;
2354
+ object-fit: contain;
2355
+ }
2356
+
2357
+ .rpe-properties-image-preview {
2358
+ overflow: hidden;
2359
+ border-radius: 8px;
2360
+ background:
2361
+ linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
2362
+ linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
2363
+ linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
2364
+ linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
2365
+ background-size: 12px 12px;
2366
+ background-position: 0 0, 0 6px, 6px -6px, -6px 0;
2367
+ }
2368
+
2369
+ .rpe-properties-image-preview .rpe-properties-preview {
2370
+ border: none;
2371
+ background: transparent;
2372
+ }
2373
+
2374
+ .rpe-properties-range {
2375
+ width: 100%;
2376
+ accent-color: var(--rpe-accent);
2377
+ cursor: pointer;
2378
+ }
2379
+
2380
+ .rpe-properties-replace {
2381
+ height: 32px;
2382
+ border: 1px solid var(--rpe-border);
2383
+ border-radius: 8px;
2384
+ background: var(--rpe-white);
2385
+ color: var(--rpe-ink);
2386
+ font-size: 12px;
2387
+ font-weight: 600;
2388
+ font-family: inherit;
2389
+ cursor: pointer;
2390
+ }
2391
+
2392
+ .rpe-properties-replace:hover {
2393
+ background: var(--rpe-bg);
2394
+ border-color: var(--rpe-accent);
2395
+ color: var(--rpe-accent);
2396
+ }
2397
+
2398
+ .rpe-image-hit-layer {
2399
+ position: absolute;
2400
+ inset: 0;
2401
+ z-index: 8;
2402
+ cursor: copy;
2403
+ }
2404
+
2405
+ .rpe-image-ghost {
2406
+ position: absolute;
2407
+ overflow: hidden;
2408
+ border: 1.5px dashed rgba(37, 99, 235, 0.7);
2409
+ border-radius: 6px;
2410
+ background: rgba(255, 255, 255, 0.42);
2411
+ box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
2412
+ pointer-events: none;
2413
+ }
2414
+
2415
+ .rpe-image-ghost img {
2416
+ display: block;
2417
+ width: 100%;
2418
+ height: 100%;
2419
+ object-fit: contain;
2420
+ opacity: 0.72;
2421
+ }
2422
+
2423
+ .rpe-image-annotations {
2424
+ position: absolute;
2425
+ inset: 0;
2426
+ z-index: 5;
2427
+ pointer-events: none;
2428
+ }
2429
+
2430
+ .rpe-image-frame {
2431
+ pointer-events: auto;
2432
+ }
2433
+
2434
+ .rpe-image-modal {
2435
+ width: min(520px, 100%);
2436
+ }
2437
+
2438
+ .rpe-image-modal-body {
2439
+ display: flex;
2440
+ flex-direction: column;
2441
+ gap: 12px;
2442
+ min-height: 0;
2443
+ padding: 0 20px 8px;
2444
+ }
2445
+
2446
+ .rpe-image-dropzone {
2447
+ display: flex;
2448
+ align-items: center;
2449
+ justify-content: center;
2450
+ min-height: 220px;
2451
+ padding: 20px;
2452
+ border: 1.5px dashed #cbd5e1;
2453
+ border-radius: 14px;
2454
+ background: linear-gradient(180deg, #fbfbfc 0%, #f8fafc 100%);
2455
+ cursor: pointer;
2456
+ }
2457
+
2458
+ .rpe-image-dropzone-active,
2459
+ .rpe-image-dropzone:hover {
2460
+ border-color: var(--rpe-accent);
2461
+ background: rgba(37, 99, 235, 0.04);
2462
+ }
2463
+
2464
+ .rpe-image-dropzone-filled {
2465
+ background:
2466
+ linear-gradient(45deg, #eef0f3 25%, transparent 25%),
2467
+ linear-gradient(-45deg, #eef0f3 25%, transparent 25%),
2468
+ linear-gradient(45deg, transparent 75%, #eef0f3 75%),
2469
+ linear-gradient(-45deg, transparent 75%, #eef0f3 75%);
2470
+ background-size: 16px 16px;
2471
+ background-position: 0 0, 0 8px, 8px -8px, -8px 0;
2472
+ }
2473
+
2474
+ .rpe-image-dropzone-copy {
2475
+ display: flex;
2476
+ flex-direction: column;
2477
+ align-items: center;
2478
+ gap: 8px;
2479
+ color: var(--rpe-muted);
2480
+ text-align: center;
2481
+ }
2482
+
2483
+ .rpe-image-dropzone-icon {
2484
+ display: inline-flex;
2485
+ align-items: center;
2486
+ justify-content: center;
2487
+ width: 44px;
2488
+ height: 44px;
2489
+ border-radius: 12px;
2490
+ background: var(--rpe-white);
2491
+ border: 1px solid var(--rpe-border);
2492
+ color: var(--rpe-accent);
2493
+ box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
2494
+ }
2495
+
2496
+ .rpe-image-dropzone-copy strong {
2497
+ color: var(--rpe-ink);
2498
+ font-size: 15px;
2499
+ }
2500
+
2501
+ .rpe-image-dropzone-copy span {
2502
+ font-size: 12px;
2503
+ }
2504
+
2505
+ .rpe-image-preview-frame {
2506
+ display: flex;
2507
+ align-items: center;
2508
+ justify-content: center;
2509
+ width: 100%;
2510
+ max-height: 240px;
2511
+ }
2512
+
2513
+ .rpe-image-preview-frame img {
2514
+ max-width: 100%;
2515
+ max-height: 240px;
2516
+ object-fit: contain;
2517
+ border-radius: 8px;
2518
+ box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
2519
+ }
2520
+
2521
+ .rpe-image-meta {
2522
+ display: flex;
2523
+ align-items: center;
2524
+ justify-content: space-between;
2525
+ gap: 12px;
2526
+ }
2527
+
2528
+ .rpe-image-meta-copy {
2529
+ display: flex;
2530
+ flex-direction: column;
2531
+ gap: 2px;
2532
+ min-width: 0;
2533
+ }
2534
+
2535
+ .rpe-image-meta-copy strong {
2536
+ overflow: hidden;
2537
+ font-size: 13px;
2538
+ text-overflow: ellipsis;
2539
+ white-space: nowrap;
2540
+ }
2541
+
2542
+ .rpe-image-meta-copy span {
2543
+ color: var(--rpe-muted);
2544
+ font-size: 12px;
2545
+ }
2546
+
2547
+ /* Compact / mobile chrome */
2548
+ .rpe-root-compact .rpe-body,
2549
+ .rpe-root-compact .rpe-body-no-sidebar,
2550
+ .rpe-body-compact,
2551
+ .rpe-body-compact.rpe-body-no-sidebar {
2552
+ grid-template-columns: minmax(0, 1fr);
2553
+ }
2554
+
2555
+ .rpe-toolbar-compact {
2556
+ gap: 8px;
2557
+ padding: 6px 10px;
2558
+ padding-top: max(6px, env(safe-area-inset-top));
2559
+ }
2560
+
2561
+ .rpe-toolbar-compact .rpe-toolbar-main {
2562
+ position: relative;
2563
+ gap: 6px;
2564
+ }
2565
+
2566
+ .rpe-toolbar-compact .rpe-toolbar-brand {
2567
+ max-width: min(112px, 28vw);
2568
+ }
2569
+
2570
+ .rpe-toolbar-compact .rpe-export,
2571
+ .rpe-toolbar-compact .rpe-export-button {
2572
+ flex-shrink: 0;
2573
+ }
2574
+
2575
+ .rpe-toolbar-compact .rpe-toolbar-brand-editing {
2576
+ width: min(220px, 58vw);
2577
+ max-width: min(220px, 58vw);
2578
+ }
2579
+
2580
+ .rpe-toolbar-compact .rpe-toolbar-button,
2581
+ .rpe-toolbar-compact .rpe-tool-button,
2582
+ .rpe-tool-dock .rpe-toolbar-button,
2583
+ .rpe-tool-dock .rpe-tool-button {
2584
+ width: 40px;
2585
+ height: 40px;
2586
+ }
2587
+
2588
+ .rpe-toolbar-compact .rpe-export-button {
2589
+ width: 40px;
2590
+ height: 40px;
2591
+ padding: 0;
2592
+ gap: 0;
2593
+ }
2594
+
2595
+ .rpe-toolbar-compact .rpe-export-label,
2596
+ .rpe-toolbar-compact .rpe-export-error {
2597
+ display: none;
2598
+ }
2599
+
2600
+ .rpe-toolbar-compact .rpe-find-group {
2601
+ position: absolute;
2602
+ inset: 0;
2603
+ z-index: 2;
2604
+ display: flex;
2605
+ align-items: center;
2606
+ gap: 4px;
2607
+ padding: 0 2px;
2608
+ background: var(--rpe-white);
2609
+ opacity: 0;
2610
+ pointer-events: none;
2611
+ }
2612
+
2613
+ .rpe-toolbar-search-open .rpe-find-group {
2614
+ opacity: 1;
2615
+ pointer-events: auto;
2616
+ }
2617
+
2618
+ .rpe-toolbar-compact .rpe-find-input {
2619
+ flex: 1;
2620
+ width: auto;
2621
+ min-width: 0;
2622
+ }
2623
+
2624
+ .rpe-tool-dock {
2625
+ position: absolute;
2626
+ left: 10px;
2627
+ right: 10px;
2628
+ bottom: max(10px, env(safe-area-inset-bottom));
2629
+ z-index: 15;
2630
+ display: flex;
2631
+ align-items: center;
2632
+ justify-content: flex-start;
2633
+ flex-wrap: nowrap;
2634
+ gap: 6px 8px;
2635
+ min-height: 56px;
2636
+ padding: 8px 10px;
2637
+ overflow-x: auto;
2638
+ background: rgba(255, 255, 255, 0.92);
2639
+ border: 1px solid var(--rpe-border);
2640
+ border-radius: 16px;
2641
+ box-shadow:
2642
+ 0 12px 36px rgba(15, 23, 42, 0.16),
2643
+ 0 2px 6px rgba(15, 23, 42, 0.06);
2644
+ backdrop-filter: blur(16px);
2645
+ scrollbar-width: none;
2646
+ }
2647
+
2648
+ .rpe-tool-dock::-webkit-scrollbar {
2649
+ display: none;
2650
+ }
2651
+
2652
+ @media (min-width: 520px) {
2653
+ .rpe-tool-dock {
2654
+ justify-content: center;
2655
+ }
2656
+ }
2657
+
2658
+ @media (max-width: 519px) {
2659
+ .rpe-tool-dock {
2660
+ flex-wrap: wrap;
2661
+ justify-content: center;
2662
+ overflow-x: hidden;
2663
+ }
2664
+
2665
+ .rpe-root-compact .rpe-stage {
2666
+ padding-bottom: 128px;
2667
+ }
2668
+
2669
+ .rpe-root-compact .rpe-ink-toolbar,
2670
+ .rpe-sheet-panel,
2671
+ .rpe-sheet-handle {
2672
+ bottom: calc(128px + env(safe-area-inset-bottom));
2673
+ }
2674
+
2675
+ .rpe-sheet-panel {
2676
+ max-height: min(52%, 400px);
2677
+ }
2678
+ }
2679
+
2680
+ .rpe-tool-dock .rpe-toolbar-divider {
2681
+ height: 24px;
2682
+ }
2683
+
2684
+ .rpe-root-compact .rpe-stage {
2685
+ padding: 12px 12px 96px;
2686
+ scrollbar-width: thin;
2687
+ }
2688
+
2689
+ .rpe-root-compact .rpe-ink-toolbar {
2690
+ top: auto;
2691
+ bottom: calc(76px + env(safe-area-inset-bottom));
2692
+ max-width: calc(100% - 24px);
2693
+ flex-wrap: wrap;
2694
+ justify-content: center;
2695
+ }
2696
+
2697
+ .rpe-root-compact .rpe-signature-place-hint {
2698
+ white-space: normal;
2699
+ text-align: center;
2700
+ }
2701
+
2702
+ .rpe-drawer,
2703
+ .rpe-sheet {
2704
+ position: absolute;
2705
+ inset: 0;
2706
+ z-index: 25;
2707
+ pointer-events: none;
2708
+ }
2709
+
2710
+ .rpe-sheet {
2711
+ z-index: 24;
2712
+ }
2713
+
2714
+ .rpe-sheet:not(.rpe-sheet-open) {
2715
+ visibility: hidden;
2716
+ }
2717
+
2718
+ .rpe-drawer-open,
2719
+ .rpe-sheet-open {
2720
+ pointer-events: auto;
2721
+ }
2722
+
2723
+ .rpe-drawer-backdrop,
2724
+ .rpe-sheet-backdrop {
2725
+ position: absolute;
2726
+ inset: 0;
2727
+ padding: 0;
2728
+ border: 0;
2729
+ background: rgba(15, 23, 42, 0.36);
2730
+ opacity: 0;
2731
+ cursor: pointer;
2732
+ transition: opacity 0.2s ease;
2733
+ }
2734
+
2735
+ .rpe-drawer-open .rpe-drawer-backdrop,
2736
+ .rpe-sheet-open .rpe-sheet-backdrop {
2737
+ opacity: 1;
2738
+ }
2739
+
2740
+ .rpe-drawer-panel {
2741
+ position: absolute;
2742
+ top: 0;
2743
+ left: 0;
2744
+ bottom: 0;
2745
+ display: flex;
2746
+ flex-direction: column;
2747
+ width: min(320px, 86%);
2748
+ background: var(--rpe-white);
2749
+ box-shadow: 8px 0 32px rgba(15, 23, 42, 0.16);
2750
+ transform: translateX(-105%);
2751
+ transition: transform 0.22s ease;
2752
+ }
2753
+
2754
+ .rpe-drawer-open .rpe-drawer-panel {
2755
+ transform: none;
2756
+ }
2757
+
2758
+ .rpe-drawer-header {
2759
+ display: flex;
2760
+ align-items: center;
2761
+ justify-content: space-between;
2762
+ gap: 8px;
2763
+ padding: 12px 16px;
2764
+ padding-top: max(12px, env(safe-area-inset-top));
2765
+ border-bottom: 1px solid var(--rpe-border);
2766
+ font-weight: 600;
2767
+ font-size: 14px;
2768
+ flex-shrink: 0;
2769
+ }
2770
+
2771
+ .rpe-drawer-panel .rpe-pages-sidebar {
2772
+ flex: 1;
2773
+ min-height: 0;
2774
+ border-right: none;
2775
+ }
2776
+
2777
+ .rpe-sheet-panel {
2778
+ position: absolute;
2779
+ left: 10px;
2780
+ right: 10px;
2781
+ bottom: calc(76px + env(safe-area-inset-bottom));
2782
+ display: flex;
2783
+ flex-direction: column;
2784
+ max-height: min(62%, 480px);
2785
+ overflow: hidden;
2786
+ background: var(--rpe-white);
2787
+ border: 1px solid var(--rpe-border);
2788
+ border-radius: 16px;
2789
+ box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
2790
+ transform: translateY(calc(100% + 120px));
2791
+ transition: transform 0.22s ease;
2792
+ }
2793
+
2794
+ .rpe-sheet-open .rpe-sheet-panel {
2795
+ transform: none;
2796
+ }
2797
+
2798
+ .rpe-sheet-panel .rpe-properties-panel {
2799
+ border-left: none;
2800
+ min-height: 0;
2801
+ }
2802
+
2803
+ .rpe-pages-fab {
2804
+ position: absolute;
2805
+ top: max(12px, env(safe-area-inset-top));
2806
+ left: 10px;
2807
+ z-index: 16;
2808
+ display: inline-flex;
2809
+ align-items: center;
2810
+ justify-content: center;
2811
+ width: 40px;
2812
+ height: 40px;
2813
+ padding: 0;
2814
+ border: 1px solid var(--rpe-border);
2815
+ border-radius: 12px;
2816
+ background: rgba(255, 255, 255, 0.94);
2817
+ box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
2818
+ color: var(--rpe-ink);
2819
+ cursor: pointer;
2820
+ }
2821
+
2822
+ .rpe-sheet-handle {
2823
+ position: absolute;
2824
+ left: 50%;
2825
+ bottom: calc(76px + env(safe-area-inset-bottom));
2826
+ z-index: 16;
2827
+ display: inline-flex;
2828
+ align-items: center;
2829
+ justify-content: center;
2830
+ height: 32px;
2831
+ padding: 0 14px;
2832
+ border: 1px solid var(--rpe-border);
2833
+ border-radius: 999px;
2834
+ background: rgba(255, 255, 255, 0.94);
2835
+ box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
2836
+ color: var(--rpe-ink);
2837
+ font: inherit;
2838
+ font-size: 12px;
2839
+ font-weight: 600;
2840
+ transform: translateX(-50%);
2841
+ cursor: pointer;
2842
+ }
2843
+
2844
+ .rpe-root-compact .rpe-modal-backdrop {
2845
+ align-items: flex-end;
2846
+ padding: 0;
2847
+ }
2848
+
2849
+ .rpe-root-compact .rpe-modal {
2850
+ width: 100%;
2851
+ max-width: none;
2852
+ max-height: min(92dvh, 100%);
2853
+ border-radius: 16px 16px 0 0;
2854
+ padding-bottom: env(safe-area-inset-bottom);
2855
+ }
2856
+
2857
+ .rpe-root-compact .rpe-signature-fonts {
2858
+ grid-template-columns: repeat(2, 1fr);
2859
+ }
2860
+
2861
+ .rpe-root-compact .rpe-signature-tabs {
2862
+ margin-left: 12px;
2863
+ margin-right: 12px;
2864
+ }
2865
+
2866
+ @media (max-width: 480px) {
2867
+ .rpe-text-toolbar {
2868
+ flex-wrap: wrap;
2869
+ width: min(220px, calc(100vw - 24px));
2870
+ min-width: 0;
2871
+ max-width: min(220px, calc(100vw - 24px));
2872
+ justify-content: center;
2873
+ }
2874
+
2875
+ .rpe-text-toolbar-divider {
2876
+ width: 100%;
2877
+ height: 1px;
2878
+ margin: 2px 0;
2879
+ }
2880
+ }
2881
+
2882
+ @media (hover: none) {
2883
+ .rpe-page-insert-rail-button,
2884
+ .rpe-page-delete,
2885
+ .rpe-page-grip {
2886
+ opacity: 1;
2887
+ transform: scale(1);
2888
+ }
2889
+ }
2890
+
2891
+ .rpe-root-compact .rpe-page-insert-rail-button,
2892
+ .rpe-root-compact .rpe-page-delete,
2893
+ .rpe-root-compact .rpe-page-grip {
2894
+ opacity: 1;
2895
+ transform: scale(1);
2896
+ }
2897
+
2898
+ @media (pointer: coarse) {
2899
+ .rpe-text-handle {
2900
+ width: 14px;
2901
+ height: 14px;
2902
+ }
2903
+
2904
+ .rpe-text-handle-nw { top: -8px; left: -8px; }
2905
+ .rpe-text-handle-n { top: -8px; margin-left: -7px; }
2906
+ .rpe-text-handle-ne { top: -8px; right: -8px; }
2907
+ .rpe-text-handle-e { right: -8px; margin-top: -7px; }
2908
+ .rpe-text-handle-se { bottom: -8px; right: -8px; }
2909
+ .rpe-text-handle-s { bottom: -8px; margin-left: -7px; }
2910
+ .rpe-text-handle-sw { bottom: -8px; left: -8px; }
2911
+ .rpe-text-handle-w { left: -8px; margin-top: -7px; }
2912
+
2913
+ .rpe-rotate-handle {
2914
+ width: 16px;
2915
+ height: 16px;
2916
+ margin-left: -8px;
2917
+ top: -32px;
2918
+ }
2919
+ }
2920
+
2921
+ @media (prefers-reduced-motion: reduce) {
2922
+ .rpe-page-card-added,
2923
+ .rpe-page-slot-added,
2924
+ .rpe-page-thumbnail-image-in {
2925
+ animation: none;
2926
+ }
2927
+
2928
+ .rpe-drawer-backdrop,
2929
+ .rpe-sheet-backdrop,
2930
+ .rpe-drawer-panel,
2931
+ .rpe-sheet-panel {
2932
+ transition: none;
2933
+ }
2934
+ }