nodebb-plugin-pdf-secure 1.2.7 → 1.2.8

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,1484 @@
1
+ /* Microsoft Edge / Dark Theme */
2
+ :root {
3
+ --bg-primary: #1f1f1f;
4
+ --bg-secondary: #2d2d2d;
5
+ --bg-tertiary: #3d3d3d;
6
+ --text-primary: #ffffff;
7
+ --text-secondary: #a0a0a0;
8
+ --accent: #0078d4;
9
+ --accent-hover: #1a86d9;
10
+ --border-color: #404040;
11
+ --toolbar-height: 48px;
12
+ --sidebar-width: 200px;
13
+ --toolbar-height-mobile: 44px;
14
+ --bottom-bar-height: 52px;
15
+ --safe-area-top: env(safe-area-inset-top, 0px);
16
+ --safe-area-bottom: env(safe-area-inset-bottom, 0px);
17
+ --safe-area-left: env(safe-area-inset-left, 0px);
18
+ --safe-area-right: env(safe-area-inset-right, 0px);
19
+ }
20
+
21
+ * {
22
+ margin: 0;
23
+ padding: 0;
24
+ box-sizing: border-box;
25
+ }
26
+
27
+ html,
28
+ body {
29
+ height: 100%;
30
+ background: var(--bg-primary);
31
+ font-family: "Segoe UI", system-ui, sans-serif;
32
+ font-size: 14px;
33
+ overflow: hidden;
34
+ color: var(--text-primary);
35
+ /* Security: prevent text selection globally */
36
+ -webkit-user-select: none;
37
+ -moz-user-select: none;
38
+ -ms-user-select: none;
39
+ user-select: none;
40
+ }
41
+
42
+ /* Print Protection - hide everything when printing */
43
+ @media print {
44
+
45
+ html,
46
+ body,
47
+ #viewerContainer,
48
+ #viewer,
49
+ .pdfViewer,
50
+ .page {
51
+ display: none !important;
52
+ visibility: hidden !important;
53
+ }
54
+
55
+ body::before {
56
+ content: 'Bu içeriğin yazdırılması engellenmiştir.' !important;
57
+ display: block !important;
58
+ font-size: 24px;
59
+ padding: 50px;
60
+ text-align: center;
61
+ color: #666;
62
+ }
63
+ }
64
+
65
+ /* Loading Spinner Animation */
66
+ @keyframes spin {
67
+ from {
68
+ transform: rotate(0deg);
69
+ }
70
+
71
+ to {
72
+ transform: rotate(360deg);
73
+ }
74
+ }
75
+
76
+ .spin {
77
+ animation: spin 1s linear infinite;
78
+ }
79
+
80
+ .dropzone svg.spin {
81
+ fill: var(--accent);
82
+ }
83
+
84
+ /* Toolbar - Edge Style */
85
+ #toolbar {
86
+ position: fixed;
87
+ top: 0;
88
+ left: 0;
89
+ right: 0;
90
+ height: var(--toolbar-height);
91
+ background: var(--bg-secondary);
92
+ border-bottom: 1px solid var(--border-color);
93
+ display: flex;
94
+ align-items: center;
95
+ padding: 0 12px;
96
+ gap: 4px;
97
+ z-index: 100;
98
+ }
99
+
100
+ .toolbarGroup {
101
+ display: flex;
102
+ align-items: center;
103
+ gap: 2px;
104
+ }
105
+
106
+ .toolbarBtn {
107
+ width: 36px;
108
+ height: 36px;
109
+ border: none;
110
+ background: transparent;
111
+ color: var(--text-primary);
112
+ border-radius: 4px;
113
+ cursor: pointer;
114
+ display: flex;
115
+ align-items: center;
116
+ justify-content: center;
117
+ transition: background 0.1s;
118
+ }
119
+
120
+ .toolbarBtn:hover {
121
+ background: var(--bg-tertiary);
122
+ }
123
+
124
+ .toolbarBtn.active {
125
+ background: var(--accent);
126
+ }
127
+
128
+ .toolbarBtn svg {
129
+ width: 18px;
130
+ height: 18px;
131
+ fill: currentColor;
132
+ }
133
+
134
+ .separator {
135
+ width: 1px;
136
+ height: 24px;
137
+ background: var(--border-color);
138
+ margin: 0 8px;
139
+ }
140
+
141
+ /* Enhanced Tooltips */
142
+ .toolbarBtn {
143
+ position: relative;
144
+ }
145
+
146
+ .toolbarBtn::after {
147
+ content: attr(data-tooltip);
148
+ position: absolute;
149
+ top: 100%;
150
+ left: 50%;
151
+ transform: translateX(-50%);
152
+ background: #1a1a1a;
153
+ color: #fff;
154
+ padding: 6px 10px;
155
+ border-radius: 6px;
156
+ font-size: 12px;
157
+ white-space: nowrap;
158
+ opacity: 0;
159
+ visibility: hidden;
160
+ transition: opacity 0.2s, visibility 0.2s;
161
+ z-index: 1000;
162
+ margin-top: 8px;
163
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
164
+ pointer-events: none;
165
+ }
166
+
167
+ .toolbarBtn::before {
168
+ content: '';
169
+ position: absolute;
170
+ top: 100%;
171
+ left: 50%;
172
+ transform: translateX(-50%);
173
+ border: 6px solid transparent;
174
+ border-bottom-color: #1a1a1a;
175
+ opacity: 0;
176
+ visibility: hidden;
177
+ transition: opacity 0.2s, visibility 0.2s;
178
+ z-index: 1001;
179
+ margin-top: -4px;
180
+ }
181
+
182
+ .toolbarBtn:hover::after,
183
+ .toolbarBtn:hover::before {
184
+ opacity: 1;
185
+ visibility: visible;
186
+ }
187
+
188
+ .toolbarBtn .shortcut {
189
+ display: inline;
190
+ opacity: 0.6;
191
+ margin-left: 8px;
192
+ padding: 2px 5px;
193
+ background: rgba(255, 255, 255, 0.15);
194
+ border-radius: 3px;
195
+ font-size: 10px;
196
+ }
197
+
198
+ /* Context Menu */
199
+ .contextMenu {
200
+ position: fixed;
201
+ background: #2d2d2d;
202
+ border: 1px solid var(--border-color);
203
+ border-radius: 8px;
204
+ padding: 6px 0;
205
+ min-width: 180px;
206
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
207
+ z-index: 2000;
208
+ display: none;
209
+ }
210
+
211
+ .contextMenu.visible {
212
+ display: block;
213
+ }
214
+
215
+ .contextMenuItem {
216
+ padding: 10px 16px;
217
+ cursor: pointer;
218
+ display: flex;
219
+ align-items: center;
220
+ gap: 12px;
221
+ color: var(--text-primary);
222
+ font-size: 13px;
223
+ transition: background 0.1s;
224
+ }
225
+
226
+ .contextMenuItem:hover {
227
+ background: var(--bg-tertiary);
228
+ }
229
+
230
+ .contextMenuItem svg {
231
+ width: 16px;
232
+ height: 16px;
233
+ fill: currentColor;
234
+ opacity: 0.8;
235
+ }
236
+
237
+ .contextMenuItem .shortcutHint {
238
+ margin-left: auto;
239
+ opacity: 0.5;
240
+ font-size: 11px;
241
+ }
242
+
243
+ .contextMenuDivider {
244
+ height: 1px;
245
+ background: var(--border-color);
246
+ margin: 6px 0;
247
+ }
248
+
249
+ /* Tool Dropdown Panel - Microsoft Edge Style */
250
+ .toolDropdown {
251
+ position: absolute;
252
+ top: calc(var(--toolbar-height) + 4px);
253
+ background: #2d2d2d;
254
+ border-radius: 8px;
255
+ padding: 16px;
256
+ min-width: 240px;
257
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
258
+ display: none;
259
+ z-index: 200;
260
+ }
261
+
262
+ .toolDropdown.visible {
263
+ display: block;
264
+ }
265
+
266
+ .dropdownSection {
267
+ margin-bottom: 16px;
268
+ }
269
+
270
+ .dropdownSection:last-child {
271
+ margin-bottom: 0;
272
+ }
273
+
274
+ .dropdownLabel {
275
+ font-size: 13px;
276
+ font-weight: 600;
277
+ color: var(--text-primary);
278
+ margin-bottom: 12px;
279
+ display: flex;
280
+ align-items: center;
281
+ gap: 6px;
282
+ }
283
+
284
+ .dropdownLabel svg {
285
+ width: 14px;
286
+ height: 14px;
287
+ fill: var(--text-secondary);
288
+ }
289
+
290
+ /* Color Grid */
291
+ .colorGrid {
292
+ display: grid;
293
+ grid-template-columns: repeat(6, 1fr);
294
+ gap: 8px;
295
+ }
296
+
297
+ .colorDot {
298
+ width: 28px;
299
+ height: 28px;
300
+ border-radius: 50%;
301
+ border: 2px solid transparent;
302
+ cursor: pointer;
303
+ transition: transform 0.1s, border-color 0.1s;
304
+ }
305
+
306
+ .colorDot:hover {
307
+ transform: scale(1.1);
308
+ }
309
+
310
+ .colorDot.active {
311
+ border-color: var(--text-primary);
312
+ }
313
+
314
+ /* Stroke Preview Wave */
315
+ .strokePreview {
316
+ height: 50px;
317
+ background: #1f1f1f;
318
+ border-radius: 8px;
319
+ display: flex;
320
+ align-items: center;
321
+ justify-content: center;
322
+ margin-bottom: 16px;
323
+ overflow: hidden;
324
+ }
325
+
326
+ .strokePreview svg {
327
+ width: 100%;
328
+ height: 100%;
329
+ }
330
+
331
+ /* Thickness Slider */
332
+ .thicknessSlider {
333
+ width: 100%;
334
+ display: flex;
335
+ flex-direction: column;
336
+ gap: 8px;
337
+ }
338
+
339
+ .thicknessSlider input[type="range"] {
340
+ -webkit-appearance: none;
341
+ appearance: none;
342
+ width: 100%;
343
+ height: 4px;
344
+ background: #555;
345
+ border-radius: 2px;
346
+ outline: none;
347
+ }
348
+
349
+ .thicknessSlider input[type="range"]::-webkit-slider-thumb {
350
+ -webkit-appearance: none;
351
+ appearance: none;
352
+ width: 16px;
353
+ height: 16px;
354
+ background: #fff;
355
+ border-radius: 50%;
356
+ cursor: pointer;
357
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
358
+ }
359
+
360
+ .thicknessSlider input[type="range"]::-moz-range-thumb {
361
+ width: 16px;
362
+ height: 16px;
363
+ background: #fff;
364
+ border-radius: 50%;
365
+ cursor: pointer;
366
+ border: none;
367
+ }
368
+
369
+ .thicknessLabels {
370
+ display: flex;
371
+ justify-content: space-between;
372
+ font-size: 12px;
373
+ color: var(--text-secondary);
374
+ }
375
+
376
+ /* Tool button with dropdown arrow */
377
+ .toolbarBtnWithDropdown {
378
+ position: relative;
379
+ display: flex;
380
+ align-items: center;
381
+ }
382
+
383
+ .toolbarBtnWithDropdown .toolbarBtn {
384
+ border-radius: 4px 0 0 4px;
385
+ }
386
+
387
+ .dropdownArrow {
388
+ width: 20px;
389
+ height: 36px;
390
+ border: none;
391
+ background: transparent;
392
+ color: var(--text-primary);
393
+ border-radius: 0 4px 4px 0;
394
+ cursor: pointer;
395
+ display: flex;
396
+ align-items: center;
397
+ justify-content: center;
398
+ }
399
+
400
+ .dropdownArrow:hover {
401
+ background: var(--bg-tertiary);
402
+ }
403
+
404
+ .toolbarBtnWithDropdown.active .toolbarBtn,
405
+ .toolbarBtnWithDropdown.active .dropdownArrow {
406
+ background: var(--accent);
407
+ }
408
+
409
+ .dropdownArrow svg {
410
+ width: 12px;
411
+ height: 12px;
412
+ fill: currentColor;
413
+ }
414
+
415
+ /* Overflow Menu Items */
416
+ .overflowItem {
417
+ display: flex;
418
+ align-items: center;
419
+ gap: 12px;
420
+ padding: 10px 16px;
421
+ background: none;
422
+ border: none;
423
+ color: var(--text-primary);
424
+ cursor: pointer;
425
+ width: 100%;
426
+ border-radius: 6px;
427
+ font-size: 14px;
428
+ white-space: nowrap;
429
+ }
430
+ .overflowItem:hover { background: var(--bg-tertiary); }
431
+ .overflowItem svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
432
+ .overflowItem.active { color: var(--accent); }
433
+ .overflowDivider { height: 1px; background: var(--border-color); margin: 6px 0; }
434
+
435
+ /* Overflow: visible on all screens, originals hidden */
436
+ #overflowWrapper { display: flex; }
437
+ .overflowSep { display: block; }
438
+
439
+ /* Hide rotate, sepia and their separators (children 3-8 of view group) */
440
+ .toolbarGroup:nth-child(5) > :nth-child(3),
441
+ .toolbarGroup:nth-child(5) > :nth-child(4),
442
+ .toolbarGroup:nth-child(5) > :nth-child(5),
443
+ .toolbarGroup:nth-child(5) > :nth-child(6),
444
+ .toolbarGroup:nth-child(5) > :nth-child(7),
445
+ .toolbarGroup:nth-child(5) > :nth-child(8) { display: none !important; }
446
+
447
+ /* Shape Grid */
448
+ .shapeGrid {
449
+ display: grid;
450
+ grid-template-columns: repeat(4, 1fr);
451
+ gap: 8px;
452
+ }
453
+
454
+ .shapeBtn {
455
+ width: 48px;
456
+ height: 48px;
457
+ background: #1f1f1f;
458
+ border: 2px solid transparent;
459
+ border-radius: 8px;
460
+ cursor: pointer;
461
+ display: flex;
462
+ align-items: center;
463
+ justify-content: center;
464
+ color: var(--text-primary);
465
+ transition: border-color 0.1s, background 0.1s;
466
+ }
467
+
468
+ .shapeBtn:hover {
469
+ background: #3d3d3d;
470
+ }
471
+
472
+ .shapeBtn.active {
473
+ border-color: var(--accent);
474
+ background: #3d3d3d;
475
+ }
476
+
477
+ .shapeBtn svg {
478
+ width: 28px;
479
+ height: 28px;
480
+ }
481
+
482
+ /* Page Info */
483
+ .pageInfo {
484
+ display: flex;
485
+ align-items: center;
486
+ gap: 8px;
487
+ margin-left: auto;
488
+ }
489
+
490
+ #pageInput {
491
+ width: 40px;
492
+ height: 28px;
493
+ background: var(--bg-tertiary);
494
+ border: 1px solid var(--border-color);
495
+ border-radius: 4px;
496
+ color: var(--text-primary);
497
+ text-align: center;
498
+ font-size: 13px;
499
+ }
500
+
501
+ #pageCount {
502
+ color: var(--text-secondary);
503
+ font-size: 13px;
504
+ }
505
+
506
+ /* Sidebar - Thumbnails */
507
+ #sidebar {
508
+ position: fixed;
509
+ top: var(--toolbar-height);
510
+ left: 0;
511
+ bottom: 0;
512
+ width: var(--sidebar-width);
513
+ background: var(--bg-secondary);
514
+ border-right: 1px solid var(--border-color);
515
+ overflow-y: auto;
516
+ display: none;
517
+ z-index: 50;
518
+ }
519
+
520
+ #sidebar.open {
521
+ display: block;
522
+ }
523
+
524
+ .sidebarHeader {
525
+ padding: 12px 16px;
526
+ font-size: 13px;
527
+ font-weight: 600;
528
+ border-bottom: 1px solid var(--border-color);
529
+ display: flex;
530
+ justify-content: space-between;
531
+ align-items: center;
532
+ }
533
+
534
+ .closeBtn {
535
+ background: none;
536
+ border: none;
537
+ color: var(--text-primary);
538
+ cursor: pointer;
539
+ font-size: 18px;
540
+ }
541
+
542
+ #thumbnailContainer {
543
+ padding: 12px;
544
+ display: flex;
545
+ flex-direction: column;
546
+ gap: 12px;
547
+ }
548
+
549
+ .thumbnail {
550
+ background: var(--bg-tertiary);
551
+ border: 2px solid transparent;
552
+ border-radius: 4px;
553
+ cursor: pointer;
554
+ padding: 4px;
555
+ transition: border-color 0.15s;
556
+ }
557
+
558
+ .thumbnail:hover {
559
+ border-color: var(--accent);
560
+ }
561
+
562
+ .thumbnail.active {
563
+ border-color: var(--accent);
564
+ }
565
+
566
+ .thumbnail canvas {
567
+ width: 100%;
568
+ display: block;
569
+ }
570
+
571
+ .thumbnailNum {
572
+ text-align: center;
573
+ font-size: 11px;
574
+ color: var(--text-secondary);
575
+ margin-top: 4px;
576
+ }
577
+
578
+ /* Viewer Container */
579
+ #viewerContainer {
580
+ position: fixed;
581
+ top: var(--toolbar-height);
582
+ left: 0;
583
+ right: 0;
584
+ bottom: 0;
585
+ overflow: auto;
586
+ background: #525659;
587
+ z-index: 1;
588
+ }
589
+
590
+ #viewerContainer.withSidebar {
591
+ left: var(--sidebar-width);
592
+ }
593
+
594
+ .pdfViewer .page {
595
+ margin: 8px auto;
596
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
597
+ position: relative;
598
+ transition: filter 0.3s ease;
599
+ }
600
+
601
+ /* Sepia Reading Mode */
602
+ .pdfViewer.sepia .page canvas {
603
+ filter: sepia(40%) brightness(0.95) contrast(0.9);
604
+ }
605
+
606
+ .pdfViewer.sepia .page {
607
+ background: #f4ecd8 !important;
608
+ }
609
+
610
+ #viewerContainer.sepia {
611
+ background: #d4c9a8;
612
+ }
613
+
614
+ /* Annotation Layer */
615
+ .annotationLayer {
616
+ position: absolute;
617
+ top: 0;
618
+ left: 0;
619
+ right: 0;
620
+ bottom: 0;
621
+ pointer-events: none;
622
+ z-index: 10;
623
+ }
624
+
625
+ .annotationLayer.active {
626
+ pointer-events: auto;
627
+ cursor: crosshair;
628
+ }
629
+
630
+ .annotationLayer path {
631
+ fill: none;
632
+ stroke-linecap: round;
633
+ stroke-linejoin: round;
634
+ }
635
+
636
+ /* Select tool cursor */
637
+ .annotationLayer.select-mode {
638
+ cursor: default;
639
+ }
640
+
641
+ .annotationLayer.select-mode path,
642
+ .annotationLayer.select-mode rect,
643
+ .annotationLayer.select-mode ellipse,
644
+ .annotationLayer.select-mode line,
645
+ .annotationLayer.select-mode text {
646
+ cursor: grab;
647
+ pointer-events: all;
648
+ transition: transform 0.1s ease, opacity 0.1s ease;
649
+ }
650
+
651
+ /* Invisible hit area for easier selection */
652
+ .annotationLayer.select-mode path,
653
+ .annotationLayer.select-mode line {
654
+ stroke-linecap: round;
655
+ }
656
+
657
+ .annotationLayer.select-mode path:hover,
658
+ .annotationLayer.select-mode rect:hover,
659
+ .annotationLayer.select-mode ellipse:hover,
660
+ .annotationLayer.select-mode line:hover,
661
+ .annotationLayer.select-mode text:hover {
662
+ opacity: 0.8;
663
+ cursor: grab;
664
+ }
665
+
666
+ /* Selected annotation element - use filter for SVG compatibility */
667
+ .annotation-selected {
668
+ filter: drop-shadow(0 0 4px #0078d4) !important;
669
+ opacity: 1 !important;
670
+ }
671
+
672
+ /* Marquee selection rectangle */
673
+ .annotationLayer .marquee-rect {
674
+ fill: rgba(0, 120, 212, 0.1) !important;
675
+ stroke: #0078d4 !important;
676
+ stroke-width: 1 !important;
677
+ stroke-dasharray: 4 2 !important;
678
+ pointer-events: none !important;
679
+ cursor: default !important;
680
+ opacity: 1 !important;
681
+ filter: none !important;
682
+ transition: none !important;
683
+ }
684
+
685
+ /* Multi-selected annotations */
686
+ .annotation-multi-selected {
687
+ filter: drop-shadow(0 0 3px #0078d4) !important;
688
+ opacity: 0.9 !important;
689
+ }
690
+
691
+ /* Touch feedback */
692
+ .annotation-dragging {
693
+ opacity: 0.6;
694
+ cursor: grabbing !important;
695
+ filter: drop-shadow(0 4px 12px rgba(0, 120, 212, 0.5));
696
+ }
697
+
698
+ /* Tablet/Touch optimizations for select mode */
699
+ @media (pointer: coarse),
700
+ (max-width: 1024px) {
701
+
702
+ .annotationLayer.select-mode path,
703
+ .annotationLayer.select-mode rect,
704
+ .annotationLayer.select-mode ellipse,
705
+ .annotationLayer.select-mode line,
706
+ .annotationLayer.select-mode text {
707
+ /* Ensure touch-friendly interaction */
708
+ cursor: pointer;
709
+ }
710
+
711
+ /* Bigger toolbar buttons for touch */
712
+ .toolbarBtn {
713
+ width: 44px;
714
+ height: 44px;
715
+ min-width: 44px;
716
+ }
717
+ }
718
+
719
+ /* Touch selection ring animation */
720
+ @keyframes selectionPulse {
721
+ 0% {
722
+ outline-color: rgba(0, 120, 212, 1);
723
+ }
724
+
725
+ 50% {
726
+ outline-color: rgba(0, 120, 212, 0.5);
727
+ }
728
+
729
+ 100% {
730
+ outline-color: rgba(0, 120, 212, 1);
731
+ }
732
+ }
733
+
734
+ .annotation-selected.just-selected {
735
+ animation: selectionPulse 0.6s ease-out;
736
+ }
737
+
738
+ /* Move handle for touch devices */
739
+ .annotation-move-handle {
740
+ position: absolute;
741
+ width: 36px;
742
+ height: 36px;
743
+ background: rgba(0, 120, 212, 0.9);
744
+ border-radius: 50%;
745
+ display: none;
746
+ align-items: center;
747
+ justify-content: center;
748
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
749
+ cursor: grab;
750
+ z-index: 100;
751
+ touch-action: none;
752
+ }
753
+
754
+ .annotation-move-handle svg {
755
+ width: 20px;
756
+ height: 20px;
757
+ fill: white;
758
+ }
759
+
760
+ @media (pointer: coarse) {
761
+ .annotation-move-handle {
762
+ display: flex;
763
+ }
764
+ }
765
+
766
+ /* Ghost element while dragging */
767
+ .annotation-ghost {
768
+ opacity: 0.3;
769
+ pointer-events: none;
770
+ }
771
+
772
+ /* Selection toolbar for touch - action buttons */
773
+ .selection-toolbar {
774
+ position: fixed;
775
+ bottom: 24px;
776
+ left: 50%;
777
+ transform: translateX(-50%) translateY(100px);
778
+ background: linear-gradient(135deg, #363636 0%, #2d2d2d 100%);
779
+ border: 1px solid rgba(255, 255, 255, 0.1);
780
+ border-radius: 16px;
781
+ padding: 12px 16px;
782
+ display: flex;
783
+ align-items: center;
784
+ gap: 12px;
785
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
786
+ z-index: 2000;
787
+ opacity: 0;
788
+ transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
789
+ pointer-events: none;
790
+ }
791
+
792
+ .selection-toolbar.visible {
793
+ transform: translateX(-50%) translateY(0);
794
+ opacity: 1;
795
+ pointer-events: auto;
796
+ }
797
+
798
+ .selection-toolbar::before {
799
+ content: 'Seçili Öğe';
800
+ position: absolute;
801
+ top: -28px;
802
+ left: 50%;
803
+ transform: translateX(-50%);
804
+ font-size: 11px;
805
+ color: rgba(255, 255, 255, 0.6);
806
+ white-space: nowrap;
807
+ text-transform: uppercase;
808
+ letter-spacing: 0.5px;
809
+ }
810
+
811
+ .selection-toolbar button {
812
+ width: 52px;
813
+ height: 52px;
814
+ border: none;
815
+ background: rgba(255, 255, 255, 0.08);
816
+ color: white;
817
+ border-radius: 12px;
818
+ cursor: pointer;
819
+ display: flex;
820
+ flex-direction: column;
821
+ align-items: center;
822
+ justify-content: center;
823
+ gap: 4px;
824
+ transition: all 0.15s ease;
825
+ position: relative;
826
+ }
827
+
828
+ .selection-toolbar button:hover {
829
+ background: rgba(255, 255, 255, 0.15);
830
+ transform: translateY(-2px);
831
+ }
832
+
833
+ .selection-toolbar button:active {
834
+ transform: translateY(0);
835
+ background: rgba(255, 255, 255, 0.2);
836
+ }
837
+
838
+ .selection-toolbar button.delete {
839
+ background: rgba(196, 43, 28, 0.8);
840
+ }
841
+
842
+ .selection-toolbar button.delete:hover {
843
+ background: #e03e2f;
844
+ transform: translateY(-2px);
845
+ }
846
+
847
+ .selection-toolbar button svg {
848
+ width: 22px;
849
+ height: 22px;
850
+ fill: currentColor;
851
+ }
852
+
853
+ .selection-toolbar button span {
854
+ font-size: 9px;
855
+ opacity: 0.8;
856
+ text-transform: uppercase;
857
+ letter-spacing: 0.3px;
858
+ }
859
+
860
+ /* Toast notification for copy/paste */
861
+ .toast-notification {
862
+ position: fixed;
863
+ bottom: 80px;
864
+ left: 50%;
865
+ transform: translateX(-50%);
866
+ background: #323232;
867
+ color: white;
868
+ padding: 12px 24px;
869
+ border-radius: 8px;
870
+ font-size: 14px;
871
+ z-index: 3000;
872
+ animation: toastIn 0.3s ease, toastOut 0.3s ease 1.7s forwards;
873
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
874
+ }
875
+
876
+ @keyframes toastIn {
877
+ from {
878
+ opacity: 0;
879
+ transform: translateX(-50%) translateY(20px);
880
+ }
881
+
882
+ to {
883
+ opacity: 1;
884
+ transform: translateX(-50%) translateY(0);
885
+ }
886
+ }
887
+
888
+ @keyframes toastOut {
889
+ from {
890
+ opacity: 1;
891
+ transform: translateX(-50%) translateY(0);
892
+ }
893
+
894
+ to {
895
+ opacity: 0;
896
+ transform: translateX(-50%) translateY(-20px);
897
+ }
898
+ }
899
+
900
+ /* Text Selection Highlight */
901
+ .textHighlight {
902
+ position: absolute;
903
+ pointer-events: none;
904
+ border-radius: 2px;
905
+ }
906
+
907
+ /* Selection Popup Button */
908
+ .highlightPopup {
909
+ position: absolute;
910
+ background: var(--bg-secondary);
911
+ border: 1px solid var(--border-color);
912
+ border-radius: 8px;
913
+ padding: 6px;
914
+ display: flex;
915
+ gap: 4px;
916
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
917
+ z-index: 500;
918
+ }
919
+
920
+ .highlightPopup button {
921
+ width: 28px;
922
+ height: 28px;
923
+ border: none;
924
+ border-radius: 50%;
925
+ cursor: pointer;
926
+ transition: transform 0.1s;
927
+ }
928
+
929
+ .highlightPopup button:hover {
930
+ transform: scale(1.15);
931
+ }
932
+
933
+ /* Upload Overlay */
934
+ #uploadOverlay {
935
+ position: fixed;
936
+ top: var(--toolbar-height);
937
+ left: 0;
938
+ right: 0;
939
+ bottom: 0;
940
+ background: var(--bg-primary);
941
+ display: flex;
942
+ align-items: center;
943
+ justify-content: center;
944
+ z-index: 40;
945
+ }
946
+
947
+ .dropzone {
948
+ width: 400px;
949
+ padding: 60px 40px;
950
+ background: var(--bg-secondary);
951
+ border: 2px dashed var(--border-color);
952
+ border-radius: 12px;
953
+ text-align: center;
954
+ cursor: pointer;
955
+ transition: all 0.2s;
956
+ }
957
+
958
+ .dropzone:hover {
959
+ border-color: var(--accent);
960
+ background: var(--bg-tertiary);
961
+ }
962
+
963
+ .dropzone svg {
964
+ width: 64px;
965
+ height: 64px;
966
+ fill: var(--text-secondary);
967
+ margin-bottom: 16px;
968
+ }
969
+
970
+ .dropzone h2 {
971
+ font-size: 18px;
972
+ font-weight: 500;
973
+ margin-bottom: 8px;
974
+ }
975
+
976
+ .dropzone p {
977
+ color: var(--text-secondary);
978
+ font-size: 13px;
979
+ }
980
+
981
+ /* Inline Text Editor */
982
+ .textEditorOverlay {
983
+ position: fixed;
984
+ top: 0;
985
+ left: 0;
986
+ right: 0;
987
+ bottom: 0;
988
+ z-index: 1000;
989
+ }
990
+
991
+ .textEditorBox {
992
+ position: absolute;
993
+ background: white;
994
+ border: 2px solid var(--accent);
995
+ border-radius: 4px;
996
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
997
+ min-width: 200px;
998
+ max-width: 400px;
999
+ }
1000
+
1001
+ .textEditorInput {
1002
+ padding: 12px 16px;
1003
+ font-size: 14px;
1004
+ font-family: 'Segoe UI', system-ui, sans-serif;
1005
+ color: #333;
1006
+ outline: none;
1007
+ min-height: 40px;
1008
+ word-wrap: break-word;
1009
+ }
1010
+
1011
+ .textEditorInput:empty:before {
1012
+ content: 'Buraya yazmaya başla...';
1013
+ color: #999;
1014
+ }
1015
+
1016
+ .textEditorToolbar {
1017
+ display: flex;
1018
+ align-items: center;
1019
+ gap: 6px;
1020
+ padding: 8px 12px;
1021
+ border-top: 1px solid #e0e0e0;
1022
+ background: #f5f5f5;
1023
+ flex-wrap: wrap;
1024
+ }
1025
+
1026
+ .textEditorColors {
1027
+ display: flex;
1028
+ align-items: center;
1029
+ gap: 4px;
1030
+ }
1031
+
1032
+ .textEditorSizeGroup {
1033
+ display: flex;
1034
+ align-items: center;
1035
+ gap: 2px;
1036
+ margin-left: 4px;
1037
+ }
1038
+
1039
+ .textEditorSizeLabel {
1040
+ font-size: 12px;
1041
+ font-weight: 600;
1042
+ color: #333;
1043
+ min-width: 24px;
1044
+ text-align: center;
1045
+ user-select: none;
1046
+ }
1047
+
1048
+ .textEditorBtn {
1049
+ width: 28px;
1050
+ height: 28px;
1051
+ border: none;
1052
+ background: transparent;
1053
+ border-radius: 4px;
1054
+ cursor: pointer;
1055
+ display: flex;
1056
+ align-items: center;
1057
+ justify-content: center;
1058
+ color: #333;
1059
+ font-size: 12px;
1060
+ font-weight: 600;
1061
+ }
1062
+
1063
+ .textEditorBtn:hover {
1064
+ background: #e0e0e0;
1065
+ }
1066
+
1067
+ .textEditorBtn.delete {
1068
+ color: #d32f2f;
1069
+ margin-left: auto;
1070
+ }
1071
+
1072
+ .textEditorColorDot {
1073
+ width: 18px;
1074
+ height: 18px;
1075
+ border-radius: 50%;
1076
+ border: 2px solid transparent;
1077
+ cursor: pointer;
1078
+ flex-shrink: 0;
1079
+ }
1080
+
1081
+ .textEditorColorDot:hover {
1082
+ transform: scale(1.15);
1083
+ }
1084
+
1085
+ .textEditorColorDot.active {
1086
+ border-color: var(--accent);
1087
+ }
1088
+
1089
+ /* Draggable text annotations */
1090
+ .annotationLayer svg text {
1091
+ cursor: move;
1092
+ user-select: none;
1093
+ }
1094
+
1095
+ .annotationLayer svg text.dragging {
1096
+ opacity: 0.7;
1097
+ }
1098
+
1099
+ .hidden {
1100
+ display: none !important;
1101
+ }
1102
+
1103
+ /* Scrollbar */
1104
+ ::-webkit-scrollbar {
1105
+ width: 8px;
1106
+ height: 8px;
1107
+ }
1108
+
1109
+ ::-webkit-scrollbar-track {
1110
+ background: var(--bg-secondary);
1111
+ }
1112
+
1113
+ ::-webkit-scrollbar-thumb {
1114
+ background: var(--bg-tertiary);
1115
+ border-radius: 4px;
1116
+ }
1117
+
1118
+ ::-webkit-scrollbar-thumb:hover {
1119
+ background: #555;
1120
+ }
1121
+
1122
+ /* ==========================================
1123
+ BOTTOM TOOLBAR (Mobile Only)
1124
+ ========================================== */
1125
+ #bottomToolbar {
1126
+ display: none;
1127
+ position: fixed;
1128
+ bottom: 0;
1129
+ left: 0;
1130
+ right: 0;
1131
+ height: calc(var(--bottom-bar-height) + var(--safe-area-bottom));
1132
+ background: var(--bg-secondary);
1133
+ border-top: 1px solid var(--border-color);
1134
+ z-index: 100;
1135
+ padding: 0 8px;
1136
+ padding-bottom: var(--safe-area-bottom);
1137
+ }
1138
+
1139
+ .bottomToolbarInner {
1140
+ display: flex;
1141
+ align-items: center;
1142
+ gap: 2px;
1143
+ height: var(--bottom-bar-height);
1144
+ overflow-x: auto;
1145
+ overflow-y: hidden;
1146
+ -webkit-overflow-scrolling: touch;
1147
+ scrollbar-width: none;
1148
+ -ms-overflow-style: none;
1149
+ }
1150
+
1151
+ .bottomToolbarInner::-webkit-scrollbar {
1152
+ display: none;
1153
+ }
1154
+
1155
+ /* Dropdown backdrop overlay */
1156
+ #dropdownBackdrop {
1157
+ display: none;
1158
+ position: fixed;
1159
+ top: 0;
1160
+ left: 0;
1161
+ right: 0;
1162
+ bottom: 0;
1163
+ background: rgba(0, 0, 0, 0.5);
1164
+ z-index: 250;
1165
+ }
1166
+
1167
+ #dropdownBackdrop.visible {
1168
+ display: block;
1169
+ }
1170
+
1171
+ /* Bottom sheet drag handle */
1172
+ .bottomSheetHandle {
1173
+ width: 40px;
1174
+ height: 4px;
1175
+ background: rgba(255, 255, 255, 0.3);
1176
+ border-radius: 2px;
1177
+ margin: 8px auto 4px;
1178
+ }
1179
+
1180
+ /* ==========================================
1181
+ MOBILE BREAKPOINT (max-width: 599px)
1182
+ ========================================== */
1183
+ @media (max-width: 599px) {
1184
+
1185
+ /* Top toolbar - compact mobile layout */
1186
+ #toolbar {
1187
+ height: calc(var(--toolbar-height-mobile) + var(--safe-area-top));
1188
+ padding-top: var(--safe-area-top);
1189
+ padding-left: calc(8px + var(--safe-area-left));
1190
+ padding-right: calc(8px + var(--safe-area-right));
1191
+ gap: 2px;
1192
+ }
1193
+
1194
+ /* Hide annotation tools from top bar on mobile (they go to bottom bar) */
1195
+ #toolbar>.toolbarGroup:nth-child(3) {
1196
+ display: none;
1197
+ }
1198
+
1199
+ /* Hide separators adjacent to hidden group */
1200
+ #toolbar>.separator:nth-child(2),
1201
+ #toolbar>.separator:nth-child(4) {
1202
+ display: none;
1203
+ }
1204
+
1205
+ /* Show bottom toolbar */
1206
+ #bottomToolbar {
1207
+ display: block;
1208
+ }
1209
+
1210
+ /* Viewer container adjusted for mobile toolbars */
1211
+ #viewerContainer {
1212
+ top: calc(var(--toolbar-height-mobile) + var(--safe-area-top));
1213
+ bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom));
1214
+ }
1215
+
1216
+ /* Upload overlay adjusted */
1217
+ #uploadOverlay {
1218
+ top: calc(var(--toolbar-height-mobile) + var(--safe-area-top));
1219
+ bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom));
1220
+ }
1221
+
1222
+ /* Sidebar - full width overlay on mobile */
1223
+ #sidebar {
1224
+ width: 100%;
1225
+ z-index: 150;
1226
+ top: calc(var(--toolbar-height-mobile) + var(--safe-area-top));
1227
+ bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom));
1228
+ }
1229
+
1230
+ #viewerContainer.withSidebar {
1231
+ left: 0;
1232
+ }
1233
+
1234
+ /* Dropdowns become bottom sheets on mobile */
1235
+ .toolDropdown {
1236
+ position: fixed !important;
1237
+ bottom: 0 !important;
1238
+ left: 0 !important;
1239
+ right: 0 !important;
1240
+ top: auto !important;
1241
+ border-radius: 16px 16px 0 0;
1242
+ padding: 8px 16px calc(16px + var(--safe-area-bottom));
1243
+ max-height: 60vh;
1244
+ overflow-y: auto;
1245
+ z-index: 300;
1246
+ transform: translateY(100%);
1247
+ transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
1248
+ display: block !important;
1249
+ min-width: unset;
1250
+ box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
1251
+ }
1252
+
1253
+ .toolDropdown.visible {
1254
+ transform: translateY(0);
1255
+ }
1256
+
1257
+ /* Responsive dropzone */
1258
+ .dropzone {
1259
+ width: 90%;
1260
+ padding: 40px 20px;
1261
+ }
1262
+
1263
+ .dropzone svg {
1264
+ width: 48px;
1265
+ height: 48px;
1266
+ }
1267
+
1268
+ .dropzone h2 {
1269
+ font-size: 16px;
1270
+ }
1271
+
1272
+ /* Text editor bounds */
1273
+ .textEditorBox {
1274
+ max-width: calc(100vw - 32px);
1275
+ max-height: calc(100vh - 120px);
1276
+ }
1277
+
1278
+ /* Selection toolbar above bottom bar */
1279
+ .selection-toolbar {
1280
+ bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom) + 12px);
1281
+ }
1282
+
1283
+ /* Toast above bottom bar */
1284
+ .toast-notification {
1285
+ bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom) + 16px);
1286
+ }
1287
+
1288
+ /* Page info compact */
1289
+ .pageInfo {
1290
+ margin-left: auto;
1291
+ gap: 4px;
1292
+ }
1293
+
1294
+ #pageInput {
1295
+ width: 32px;
1296
+ font-size: 12px;
1297
+ }
1298
+
1299
+ #pageCount {
1300
+ font-size: 12px;
1301
+ }
1302
+
1303
+ /* Hide tooltips on mobile (no hover) */
1304
+ .toolbarBtn::after,
1305
+ .toolbarBtn::before {
1306
+ display: none;
1307
+ }
1308
+ }
1309
+
1310
+ /* ==========================================
1311
+ TABLET BREAKPOINT (600px - 1024px)
1312
+ ========================================== */
1313
+
1314
+ /* --- Tablet shared (both orientations) --- */
1315
+ @media (min-width: 600px) and (max-width: 1024px) {
1316
+
1317
+ /* Scrollable toolbar */
1318
+ #toolbar {
1319
+ overflow-x: auto;
1320
+ overflow-y: hidden;
1321
+ scrollbar-width: none;
1322
+ -ms-overflow-style: none;
1323
+ }
1324
+
1325
+ #toolbar::-webkit-scrollbar {
1326
+ display: none;
1327
+ }
1328
+
1329
+ /* Hide tooltips on touch tablets */
1330
+ .toolbarBtn::after,
1331
+ .toolbarBtn::before {
1332
+ display: none;
1333
+ }
1334
+
1335
+ /* Safe area insets for modern tablets */
1336
+ #toolbar {
1337
+ padding-top: var(--safe-area-top);
1338
+ padding-left: calc(12px + var(--safe-area-left));
1339
+ padding-right: calc(12px + var(--safe-area-right));
1340
+ }
1341
+
1342
+ /* Text editor bounds check */
1343
+ .textEditorBox {
1344
+ max-width: calc(100vw - 48px);
1345
+ max-height: calc(100vh - 140px);
1346
+ }
1347
+
1348
+ /* Dropzone slightly smaller */
1349
+ .dropzone {
1350
+ width: 70%;
1351
+ }
1352
+ }
1353
+
1354
+ /* --- Tablet PORTRAIT --- */
1355
+ @media (min-width: 600px) and (max-width: 1024px) and (orientation: portrait) {
1356
+
1357
+ /* Top toolbar compact — height includes safe area (like mobile) */
1358
+ #toolbar {
1359
+ height: calc(var(--toolbar-height) + var(--safe-area-top));
1360
+ gap: 2px;
1361
+ }
1362
+
1363
+ /* Hide annotation tools group from top bar (CSS hides, JS moves) */
1364
+ #toolbar>.toolbarGroup:nth-child(3) {
1365
+ display: none;
1366
+ }
1367
+
1368
+ #toolbar>.separator:nth-child(2),
1369
+ #toolbar>.separator:nth-child(4) {
1370
+ display: none;
1371
+ }
1372
+
1373
+ /* Show bottom toolbar */
1374
+ #bottomToolbar {
1375
+ display: block;
1376
+ }
1377
+
1378
+ /* Viewer container adjusted for both toolbars */
1379
+ #viewerContainer {
1380
+ top: calc(var(--toolbar-height) + var(--safe-area-top));
1381
+ bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom));
1382
+ }
1383
+
1384
+ #uploadOverlay {
1385
+ top: calc(var(--toolbar-height) + var(--safe-area-top));
1386
+ bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom));
1387
+ }
1388
+
1389
+ /* Sidebar as overlay (don't push content) */
1390
+ #sidebar {
1391
+ width: 280px;
1392
+ z-index: 150;
1393
+ top: calc(var(--toolbar-height) + var(--safe-area-top));
1394
+ bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom));
1395
+ }
1396
+
1397
+ #viewerContainer.withSidebar {
1398
+ left: 0;
1399
+ }
1400
+
1401
+ /* Dropdowns become bottom sheets */
1402
+ .toolDropdown {
1403
+ position: fixed !important;
1404
+ bottom: 0 !important;
1405
+ left: 0 !important;
1406
+ right: 0 !important;
1407
+ top: auto !important;
1408
+ border-radius: 16px 16px 0 0;
1409
+ padding: 12px 20px calc(16px + var(--safe-area-bottom));
1410
+ max-height: 55vh;
1411
+ overflow-y: auto;
1412
+ z-index: 300;
1413
+ transform: translateY(100%);
1414
+ transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
1415
+ display: block !important;
1416
+ min-width: unset;
1417
+ box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
1418
+ }
1419
+
1420
+ .toolDropdown.visible {
1421
+ transform: translateY(0);
1422
+ }
1423
+
1424
+ /* Selection toolbar & toast above bottom bar */
1425
+ .selection-toolbar {
1426
+ bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom) + 12px);
1427
+ }
1428
+
1429
+ .toast-notification {
1430
+ bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom) + 16px);
1431
+ }
1432
+ }
1433
+
1434
+ /* --- Tablet LANDSCAPE --- */
1435
+ @media (min-width: 600px) and (max-width: 1024px) and (orientation: landscape) {
1436
+
1437
+ /* Toolbar stays single row, compact gaps */
1438
+ #toolbar {
1439
+ gap: 2px;
1440
+ }
1441
+
1442
+ .separator {
1443
+ margin: 0 4px;
1444
+ }
1445
+
1446
+ /* Sidebar narrower to save space */
1447
+ #sidebar {
1448
+ width: 180px;
1449
+ }
1450
+
1451
+ #viewerContainer.withSidebar {
1452
+ left: 180px;
1453
+ }
1454
+
1455
+ /* Dropdowns get wider min-width */
1456
+ .toolDropdown {
1457
+ min-width: 280px;
1458
+ }
1459
+ }
1460
+
1461
+ /* ==========================================
1462
+ TOUCH-FRIENDLY SIZES (pointer: coarse)
1463
+ ========================================== */
1464
+ @media (pointer: coarse) {
1465
+ .thicknessSlider input[type="range"]::-webkit-slider-thumb {
1466
+ width: 24px;
1467
+ height: 24px;
1468
+ }
1469
+
1470
+ .thicknessSlider input[type="range"]::-moz-range-thumb {
1471
+ width: 24px;
1472
+ height: 24px;
1473
+ }
1474
+
1475
+ .colorDot {
1476
+ width: 36px;
1477
+ height: 36px;
1478
+ }
1479
+
1480
+ .shapeBtn {
1481
+ width: 56px;
1482
+ height: 56px;
1483
+ }
1484
+ }