maplibre-gl-layer-control-tidop 0.0.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,1088 @@
1
+ /* Layer Control Styles */
2
+
3
+ /* Control button */
4
+ .maplibregl-ctrl-layer-control {
5
+ background: #fff;
6
+ border-radius: 4px;
7
+ box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
8
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
9
+ }
10
+
11
+ .maplibregl-ctrl-layer-control button {
12
+ background: none;
13
+ border: none;
14
+ padding: 0;
15
+ width: 29px;
16
+ height: 29px;
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: center;
20
+ cursor: pointer;
21
+ outline: none;
22
+ color: #1f2a37;
23
+ }
24
+
25
+ .maplibregl-ctrl-layer-control button:hover {
26
+ background-color: rgba(0, 0, 0, 0.05);
27
+ }
28
+
29
+ .maplibregl-ctrl-layer-control .layer-control-icon {
30
+ width: 100%;
31
+ height: 100%;
32
+ position: relative;
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ line-height: 0;
37
+ }
38
+
39
+ .maplibregl-ctrl-layer-control .layer-control-icon svg {
40
+ width: 22px;
41
+ height: 22px;
42
+ display: block;
43
+ stroke: currentColor;
44
+ fill: none;
45
+ }
46
+
47
+ /* Panel - positioned dynamically by JavaScript for floating behavior */
48
+ .layer-control-panel {
49
+ position: absolute;
50
+ /* Position is set dynamically by updatePanelPosition() */
51
+ background: #fff;
52
+ border-radius: 4px;
53
+ box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
54
+ min-width: 240px;
55
+ max-width: 420px;
56
+ max-height: 600px;
57
+ overflow-y: auto;
58
+ z-index: 1000;
59
+ padding: 8px;
60
+ font-size: 12px;
61
+ line-height: 1.4;
62
+ display: none;
63
+ }
64
+
65
+ .layer-control-panel.expanded {
66
+ display: block;
67
+ }
68
+
69
+ /* Panel header */
70
+ .layer-control-panel-header {
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: space-between;
74
+ gap: 10px;
75
+ font-weight: 600;
76
+ color: #333;
77
+ padding: 4px 0 8px 0;
78
+ border-bottom: 1px solid #e0e0e0;
79
+ margin-bottom: 8px;
80
+ }
81
+
82
+ .layer-control-panel-title {
83
+ flex: 1 1 auto;
84
+ font-size: 13px;
85
+ }
86
+
87
+ /* Width control */
88
+ .layer-control-width-control {
89
+ display: flex;
90
+ align-items: center;
91
+ gap: 6px;
92
+ font-weight: 500;
93
+ font-size: 11px;
94
+ color: #5c6a7d;
95
+ flex-shrink: 0;
96
+ margin-left: auto;
97
+ }
98
+
99
+ .layer-control-width-slider {
100
+ position: relative;
101
+ width: 130px;
102
+ height: 16px;
103
+ border-radius: 8px;
104
+ cursor: ew-resize;
105
+ display: flex;
106
+ align-items: center;
107
+ justify-content: center;
108
+ touch-action: none;
109
+ background: transparent;
110
+ padding: 0 8px;
111
+ box-sizing: border-box;
112
+ }
113
+
114
+ .layer-control-width-value {
115
+ min-width: 44px;
116
+ text-align: right;
117
+ font-feature-settings: 'tnum';
118
+ color: #3a4756;
119
+ }
120
+
121
+ .layer-control-width-track {
122
+ position: absolute;
123
+ left: 8px;
124
+ right: 8px;
125
+ height: 4px;
126
+ border-radius: 2px;
127
+ background: linear-gradient(90deg, #d0d7e2, #2f6fed);
128
+ pointer-events: none;
129
+ }
130
+
131
+ .layer-control-width-thumb {
132
+ position: absolute;
133
+ top: 50%;
134
+ width: 14px;
135
+ height: 14px;
136
+ border-radius: 50%;
137
+ background: #fff;
138
+ border: 2px solid #2f6fed;
139
+ transform: translateY(-50%);
140
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
141
+ pointer-events: none;
142
+ }
143
+
144
+ /* Action buttons (Show All / Hide All) */
145
+ .layer-control-actions {
146
+ display: flex;
147
+ gap: 8px;
148
+ padding-bottom: 6px;
149
+ border-bottom: 1px solid #e0e0e0;
150
+ margin-bottom: 4px;
151
+ }
152
+
153
+ .layer-control-action-btn {
154
+ flex: 1;
155
+ padding: 3px 8px;
156
+ font-size: 11px;
157
+ font-weight: 600;
158
+ color: #ffffff !important;
159
+ background: #2f6fed !important;
160
+ border: 1px solid #2f6fed !important;
161
+ border-radius: 4px;
162
+ cursor: pointer;
163
+ transition: all 0.15s ease;
164
+ width: auto;
165
+ height: auto;
166
+ }
167
+
168
+ .layer-control-action-btn:hover {
169
+ background: #1d5bd6 !important;
170
+ border-color: #1d5bd6 !important;
171
+ color: #ffffff !important;
172
+ }
173
+
174
+ .layer-control-action-btn:active {
175
+ background: #1a4fc2 !important;
176
+ border-color: #1a4fc2 !important;
177
+ }
178
+
179
+ /* Layer items */
180
+ .layer-control-item {
181
+ display: flex;
182
+ flex-direction: column;
183
+ gap: 6px;
184
+ padding: 4px 0;
185
+ border-bottom: 1px solid #f0f0f0;
186
+ box-sizing: border-box;
187
+ }
188
+
189
+ .layer-control-item:last-child {
190
+ border-bottom: none;
191
+ }
192
+
193
+ .layer-control-row {
194
+ display: flex;
195
+ align-items: center;
196
+ gap: 8px;
197
+ width: 100%;
198
+ box-sizing: border-box;
199
+ min-height: 20px;
200
+ }
201
+
202
+ .layer-control-checkbox {
203
+ margin: 0;
204
+ cursor: pointer;
205
+ }
206
+
207
+ .layer-control-name {
208
+ margin: 0;
209
+ flex: 1 1 0;
210
+ min-width: 0;
211
+ font-weight: 500;
212
+ color: #333;
213
+ overflow: hidden;
214
+ text-overflow: ellipsis;
215
+ white-space: nowrap;
216
+ }
217
+
218
+ /* Layer symbol/icon */
219
+ .layer-control-symbol {
220
+ display: inline-flex;
221
+ align-items: center;
222
+ justify-content: center;
223
+ width: 18px;
224
+ height: 18px;
225
+ flex-shrink: 0;
226
+ }
227
+
228
+ .layer-control-symbol svg {
229
+ width: 16px;
230
+ height: 16px;
231
+ display: block;
232
+ }
233
+
234
+ .layer-control-opacity {
235
+ flex: 0 0 auto;
236
+ width: 100px;
237
+ min-width: 100px;
238
+ max-width: 100px;
239
+ height: 16px;
240
+ margin: 0;
241
+ cursor: pointer;
242
+ background: linear-gradient(to right, #ddd 0%, #333 100%);
243
+ border-radius: 8px;
244
+ appearance: none;
245
+ outline: none;
246
+ }
247
+
248
+ .layer-control-opacity::-webkit-slider-thumb {
249
+ appearance: none;
250
+ width: 16px;
251
+ height: 16px;
252
+ background: #fff;
253
+ border: 2px solid #333;
254
+ border-radius: 50%;
255
+ cursor: pointer;
256
+ }
257
+
258
+ .layer-control-opacity::-moz-range-thumb {
259
+ width: 16px;
260
+ height: 16px;
261
+ background: #fff;
262
+ border: 2px solid #333;
263
+ border-radius: 50%;
264
+ cursor: pointer;
265
+ }
266
+
267
+ /* Style button */
268
+ .layer-control-style-button {
269
+ width: 20px;
270
+ height: 20px;
271
+ border-radius: 4px;
272
+ border: none;
273
+ background: none;
274
+ cursor: pointer;
275
+ font-size: 16px;
276
+ color: #444;
277
+ display: flex;
278
+ align-items: center;
279
+ justify-content: center;
280
+ transition: background-color 0.1s ease;
281
+ flex-shrink: 0;
282
+ }
283
+
284
+ .layer-control-style-button:hover {
285
+ background-color: rgba(0, 0, 0, 0.07);
286
+ }
287
+
288
+ .layer-control-style-button[disabled] {
289
+ cursor: not-allowed;
290
+ opacity: 0.45;
291
+ }
292
+
293
+ /* Style editor */
294
+ .layer-control-style-editor {
295
+ display: none;
296
+ width: 100%;
297
+ background: #f7f9fc;
298
+ border: 1px solid #dfe3eb;
299
+ border-radius: 6px;
300
+ padding: 10px;
301
+ margin-top: 6px;
302
+ box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
303
+ align-self: stretch;
304
+ box-sizing: border-box;
305
+ }
306
+
307
+ .layer-control-style-editor.expanded {
308
+ display: block;
309
+ }
310
+
311
+ .layer-control-style-header {
312
+ display: flex;
313
+ align-items: center;
314
+ justify-content: space-between;
315
+ font-weight: 600;
316
+ font-size: 12px;
317
+ margin-bottom: 8px;
318
+ color: #2f3c4a;
319
+ }
320
+
321
+ .layer-control-style-close,
322
+ .layer-control-style-close-secondary {
323
+ border: none;
324
+ background: none;
325
+ cursor: pointer;
326
+ color: #556372;
327
+ font-size: 14px;
328
+ }
329
+
330
+ .layer-control-style-controls {
331
+ display: flex;
332
+ flex-direction: column;
333
+ gap: 8px;
334
+ }
335
+
336
+ .layer-style-control {
337
+ display: flex;
338
+ flex-direction: column;
339
+ gap: 4px;
340
+ font-size: 11px;
341
+ }
342
+
343
+ .layer-style-control label {
344
+ font-weight: 500;
345
+ color: #3a4756;
346
+ }
347
+
348
+ .layer-style-color-group {
349
+ display: flex;
350
+ align-items: center;
351
+ gap: 6px;
352
+ }
353
+
354
+ .layer-style-color {
355
+ width: 36px;
356
+ height: 20px;
357
+ padding: 0;
358
+ border: none;
359
+ cursor: pointer;
360
+ }
361
+
362
+ .layer-style-color-text {
363
+ flex: 1;
364
+ height: 22px;
365
+ border: 1px solid #d0d7e2;
366
+ border-radius: 4px;
367
+ padding: 2px 6px;
368
+ font-family: monospace;
369
+ font-size: 11px;
370
+ background-color: #fff;
371
+ }
372
+
373
+ .layer-style-slider-wrapper {
374
+ display: flex;
375
+ align-items: center;
376
+ gap: 6px;
377
+ }
378
+
379
+ .layer-style-slider {
380
+ flex: 1;
381
+ cursor: pointer;
382
+ }
383
+
384
+ .layer-style-value {
385
+ min-width: 38px;
386
+ text-align: right;
387
+ font-family: monospace;
388
+ color: #3a4756;
389
+ }
390
+
391
+ .layer-control-style-actions {
392
+ display: flex;
393
+ justify-content: flex-end;
394
+ gap: 6px;
395
+ margin-top: 10px;
396
+ }
397
+
398
+ .layer-control-style-action {
399
+ border: none;
400
+ padding: 5px 12px;
401
+ border-radius: 4px;
402
+ cursor: pointer;
403
+ font-size: 11px;
404
+ font-weight: 500;
405
+ }
406
+
407
+ .layer-control-style-apply {
408
+ background-color: #2f6fed;
409
+ color: #fff;
410
+ }
411
+
412
+ .layer-control-style-apply:hover {
413
+ background-color: #2557b8;
414
+ }
415
+
416
+ .layer-control-style-reset {
417
+ background-color: #e4e8f1;
418
+ color: #2f3c4a;
419
+ border: 1px solid #c6cedd;
420
+ }
421
+
422
+ .layer-control-style-reset:hover {
423
+ background-color: #d7deed;
424
+ }
425
+
426
+ .layer-control-style-close-secondary {
427
+ background-color: #f7f9fc;
428
+ color: #2f3c4a;
429
+ border: 1px solid #d7deed;
430
+ }
431
+
432
+ .layer-control-style-close-secondary:hover {
433
+ background-color: #e9edf7;
434
+ }
435
+
436
+ .layer-control-style-empty {
437
+ margin: 0;
438
+ font-size: 11px;
439
+ color: #5c6a7d;
440
+ }
441
+
442
+ /* Style control groups */
443
+ .style-control-group {
444
+ display: flex;
445
+ flex-direction: column;
446
+ gap: 6px;
447
+ margin-bottom: 12px;
448
+ }
449
+
450
+ .style-control-group:last-child {
451
+ margin-bottom: 0;
452
+ }
453
+
454
+ .style-control-label {
455
+ font-size: 11px;
456
+ font-weight: 600;
457
+ color: #3a4756;
458
+ margin: 0;
459
+ }
460
+
461
+ .style-control-input-wrapper {
462
+ display: flex;
463
+ align-items: center;
464
+ gap: 8px;
465
+ }
466
+
467
+ .style-control-slider {
468
+ flex: 1;
469
+ height: 18px;
470
+ cursor: pointer;
471
+ background: linear-gradient(to right, #e0e6ed 0%, #2f6fed 100%);
472
+ border-radius: 9px;
473
+ outline: none;
474
+ appearance: none;
475
+ }
476
+
477
+ .style-control-slider::-webkit-slider-thumb {
478
+ appearance: none;
479
+ width: 16px;
480
+ height: 16px;
481
+ background: #fff;
482
+ border: 2px solid #2f6fed;
483
+ border-radius: 50%;
484
+ cursor: pointer;
485
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
486
+ }
487
+
488
+ .style-control-slider::-moz-range-thumb {
489
+ width: 16px;
490
+ height: 16px;
491
+ background: #fff;
492
+ border: 2px solid #2f6fed;
493
+ border-radius: 50%;
494
+ cursor: pointer;
495
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
496
+ }
497
+
498
+ .style-control-value {
499
+ min-width: 48px;
500
+ text-align: right;
501
+ font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
502
+ font-size: 11px;
503
+ color: #3a4756;
504
+ font-weight: 500;
505
+ }
506
+
507
+ .style-control-color-group {
508
+ display: flex;
509
+ align-items: center;
510
+ gap: 8px;
511
+ }
512
+
513
+ .style-control-color-picker {
514
+ width: 40px;
515
+ height: 28px;
516
+ padding: 2px;
517
+ border: 1px solid #d0d7e2;
518
+ border-radius: 4px;
519
+ cursor: pointer;
520
+ background: #fff;
521
+ }
522
+
523
+ .style-control-color-value {
524
+ flex: 1;
525
+ height: 28px;
526
+ padding: 4px 8px;
527
+ border: 1px solid #d0d7e2;
528
+ border-radius: 4px;
529
+ font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
530
+ font-size: 11px;
531
+ color: #3a4756;
532
+ background: #fff;
533
+ text-align: center;
534
+ font-weight: 500;
535
+ }
536
+
537
+ /* Custom scrollbar */
538
+ .layer-control-panel::-webkit-scrollbar {
539
+ width: 6px;
540
+ }
541
+
542
+ .layer-control-panel::-webkit-scrollbar-track {
543
+ background: #f1f1f1;
544
+ border-radius: 3px;
545
+ }
546
+
547
+ .layer-control-panel::-webkit-scrollbar-thumb {
548
+ background: #c1c1c1;
549
+ border-radius: 3px;
550
+ }
551
+
552
+ .layer-control-panel::-webkit-scrollbar-thumb:hover {
553
+ background: #a8a8a8;
554
+ }
555
+
556
+ /* Style button */
557
+ .layer-control-style-button {
558
+ flex: 0 0 auto;
559
+ width: 20px;
560
+ height: 20px;
561
+ border: 1px solid #ddd;
562
+ border-radius: 3px;
563
+ background: white;
564
+ color: #666;
565
+ cursor: pointer;
566
+ font-size: 16px;
567
+ padding: 0;
568
+ line-height: 1;
569
+ transition: all 0.2s ease;
570
+ }
571
+
572
+ .layer-control-style-button:hover {
573
+ background: #f5f5f5;
574
+ border-color: #2f6fed;
575
+ color: #2f6fed;
576
+ }
577
+
578
+ .layer-control-style-button:active {
579
+ background: #e8e8e8;
580
+ }
581
+
582
+ /* Style editor */
583
+ .layer-control-style-editor {
584
+ display: block;
585
+ margin-top: 8px;
586
+ padding: 12px;
587
+ background: #f7fafc;
588
+ border: 1px solid #e0e6ed;
589
+ border-radius: 4px;
590
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
591
+ }
592
+
593
+ .style-editor-header {
594
+ display: flex;
595
+ align-items: center;
596
+ justify-content: space-between;
597
+ margin-bottom: 12px;
598
+ padding-bottom: 8px;
599
+ border-bottom: 1px solid #e0e6ed;
600
+ }
601
+
602
+ .style-editor-title {
603
+ font-size: 13px;
604
+ font-weight: 600;
605
+ color: #333;
606
+ }
607
+
608
+ .style-editor-close {
609
+ width: 20px;
610
+ height: 20px;
611
+ border: none;
612
+ background: transparent;
613
+ color: #999;
614
+ font-size: 20px;
615
+ line-height: 1;
616
+ cursor: pointer;
617
+ padding: 0;
618
+ transition: color 0.2s ease;
619
+ }
620
+
621
+ .style-editor-close:hover {
622
+ color: #333;
623
+ }
624
+
625
+ .style-editor-controls {
626
+ margin-bottom: 12px;
627
+ min-height: 40px;
628
+ color: #666;
629
+ font-size: 12px;
630
+ }
631
+
632
+ .style-editor-section-header {
633
+ font-size: 12px;
634
+ font-weight: 600;
635
+ color: #555;
636
+ margin: 8px 0 4px;
637
+ padding-bottom: 2px;
638
+ border-bottom: 1px solid #e0e6ed;
639
+ }
640
+
641
+ .style-editor-section-header:first-child {
642
+ margin-top: 0;
643
+ }
644
+
645
+ .style-editor-actions {
646
+ display: flex;
647
+ gap: 8px;
648
+ justify-content: flex-end;
649
+ padding-top: 8px;
650
+ border-top: 1px solid #e0e6ed;
651
+ }
652
+
653
+ .style-editor-button {
654
+ padding: 8px 16px;
655
+ min-width: 70px;
656
+ border: 1px solid #ddd;
657
+ border-radius: 3px;
658
+ background: white;
659
+ color: #333;
660
+ font-size: 12px;
661
+ font-weight: 500;
662
+ cursor: pointer;
663
+ transition: all 0.2s ease;
664
+ white-space: nowrap;
665
+ }
666
+
667
+ .style-editor-button:hover {
668
+ background: #f5f5f5;
669
+ border-color: #bbb;
670
+ }
671
+
672
+ .style-editor-button:active {
673
+ background: #e0e0e0;
674
+ }
675
+
676
+ .layer-control-style-editor .style-editor-button-reset {
677
+ background: #fb923c !important;
678
+ color: #ffffff !important;
679
+ border-color: #f97316 !important;
680
+ font-weight: 600;
681
+ }
682
+
683
+ .layer-control-style-editor .style-editor-button-reset:hover {
684
+ background: #f97316 !important;
685
+ border-color: #ea580c !important;
686
+ color: #ffffff !important;
687
+ }
688
+
689
+ .layer-control-style-editor .style-editor-button-close {
690
+ background: #6b7280 !important;
691
+ color: #ffffff !important;
692
+ border-color: #4b5563 !important;
693
+ font-weight: 600;
694
+ }
695
+
696
+ .layer-control-style-editor .style-editor-button-close:hover {
697
+ background: #4b5563 !important;
698
+ border-color: #374151 !important;
699
+ color: #ffffff !important;
700
+ }
701
+
702
+ .layer-control-style-editor .style-editor-button-remove {
703
+ background: #ef4444 !important;
704
+ color: #ffffff !important;
705
+ border-color: #dc2626 !important;
706
+ font-weight: 600;
707
+ }
708
+
709
+ .layer-control-style-editor .style-editor-button-remove:hover {
710
+ background: #dc2626 !important;
711
+ border-color: #b91c1c !important;
712
+ color: #ffffff !important;
713
+ }
714
+
715
+ /* ===== Background Legend Panel ===== */
716
+ .layer-control-background-legend {
717
+ display: block;
718
+ margin-top: 8px;
719
+ padding: 10px;
720
+ background: #f7fafc;
721
+ border: 1px solid #e0e6ed;
722
+ border-radius: 4px;
723
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
724
+ }
725
+
726
+ .background-legend-header {
727
+ display: flex;
728
+ align-items: center;
729
+ justify-content: space-between;
730
+ margin-bottom: 8px;
731
+ padding-bottom: 6px;
732
+ border-bottom: 1px solid #e0e6ed;
733
+ }
734
+
735
+ .background-legend-title {
736
+ font-size: 12px;
737
+ font-weight: 600;
738
+ color: #333;
739
+ }
740
+
741
+ .background-legend-close {
742
+ width: 18px;
743
+ height: 18px;
744
+ border: none;
745
+ background: transparent;
746
+ color: #999;
747
+ font-size: 18px;
748
+ line-height: 1;
749
+ cursor: pointer;
750
+ padding: 0;
751
+ transition: color 0.2s ease;
752
+ }
753
+
754
+ .background-legend-close:hover {
755
+ color: #333;
756
+ }
757
+
758
+ /* Quick action buttons */
759
+ .background-legend-actions {
760
+ display: flex;
761
+ gap: 6px;
762
+ margin-bottom: 8px;
763
+ }
764
+
765
+ .layer-control-background-legend .background-legend-action-btn {
766
+ flex: 1;
767
+ padding: 5px 10px;
768
+ border: 1px solid #2f6fed;
769
+ border-radius: 3px;
770
+ background: #2f6fed;
771
+ color: #ffffff;
772
+ font-size: 10px;
773
+ font-weight: 600;
774
+ cursor: pointer;
775
+ transition: all 0.15s ease;
776
+ width: auto;
777
+ height: auto;
778
+ }
779
+
780
+ .layer-control-background-legend .background-legend-action-btn:hover {
781
+ background: #1d5bd6 !important;
782
+ background-color: #1d5bd6 !important;
783
+ border-color: #1d5bd6;
784
+ color: #ffffff;
785
+ }
786
+
787
+ .layer-control-background-legend .background-legend-action-btn:active {
788
+ background: #1a4fc2 !important;
789
+ background-color: #1a4fc2 !important;
790
+ border-color: #1a4fc2;
791
+ }
792
+
793
+ /* Filter row */
794
+ .background-legend-filter {
795
+ display: flex;
796
+ align-items: center;
797
+ gap: 6px;
798
+ margin-bottom: 8px;
799
+ padding: 6px 8px;
800
+ background: #eef2f7;
801
+ border-radius: 3px;
802
+ }
803
+
804
+ .background-legend-filter-checkbox {
805
+ margin: 0;
806
+ cursor: pointer;
807
+ }
808
+
809
+ .background-legend-filter-label {
810
+ font-size: 11px;
811
+ color: #444;
812
+ font-weight: 500;
813
+ cursor: pointer;
814
+ user-select: none;
815
+ }
816
+
817
+ /* Layer list container */
818
+ .background-legend-layer-list {
819
+ max-height: 200px;
820
+ overflow-y: auto;
821
+ padding-right: 4px;
822
+ }
823
+
824
+ /* Individual layer row */
825
+ .background-legend-layer-row {
826
+ display: flex;
827
+ align-items: center;
828
+ gap: 6px;
829
+ padding: 4px 0;
830
+ border-bottom: 1px solid #f0f4f8;
831
+ }
832
+
833
+ .background-legend-layer-row:last-child {
834
+ border-bottom: none;
835
+ }
836
+
837
+ .background-legend-checkbox {
838
+ margin: 0;
839
+ cursor: pointer;
840
+ flex-shrink: 0;
841
+ }
842
+
843
+ /* Layer symbol in background legend */
844
+ .background-legend-layer-symbol {
845
+ display: inline-flex;
846
+ align-items: center;
847
+ justify-content: center;
848
+ width: 14px;
849
+ height: 14px;
850
+ flex-shrink: 0;
851
+ }
852
+
853
+ .background-legend-layer-symbol svg {
854
+ width: 14px;
855
+ height: 14px;
856
+ display: block;
857
+ }
858
+
859
+ .background-legend-layer-name {
860
+ flex: 1;
861
+ font-size: 11px;
862
+ color: #333;
863
+ overflow: hidden;
864
+ text-overflow: ellipsis;
865
+ white-space: nowrap;
866
+ }
867
+
868
+ .background-legend-layer-type {
869
+ flex-shrink: 0;
870
+ font-size: 9px;
871
+ color: #888;
872
+ background: #e8ecf0;
873
+ padding: 2px 5px;
874
+ border-radius: 3px;
875
+ text-transform: uppercase;
876
+ font-weight: 500;
877
+ }
878
+
879
+ /* Empty state */
880
+ .background-legend-empty {
881
+ font-size: 11px;
882
+ color: #888;
883
+ text-align: center;
884
+ padding: 12px;
885
+ margin: 0;
886
+ }
887
+
888
+ /* Active state for legend button */
889
+ .layer-control-background-legend-button.active {
890
+ background: #e8ecf0;
891
+ border-color: #2f6fed;
892
+ color: #2f6fed;
893
+ }
894
+
895
+ /* Custom scrollbar for legend layer list */
896
+ .background-legend-layer-list::-webkit-scrollbar {
897
+ width: 4px;
898
+ }
899
+
900
+ .background-legend-layer-list::-webkit-scrollbar-track {
901
+ background: #f1f1f1;
902
+ border-radius: 2px;
903
+ }
904
+
905
+ .background-legend-layer-list::-webkit-scrollbar-thumb {
906
+ background: #c1c1c1;
907
+ border-radius: 2px;
908
+ }
909
+
910
+ .background-legend-layer-list::-webkit-scrollbar-thumb:hover {
911
+ background: #a8a8a8;
912
+ }
913
+
914
+ /* Custom layer info panel */
915
+ .layer-control-custom-info-text {
916
+ margin: 0;
917
+ padding: 8px;
918
+ font-size: 11px;
919
+ line-height: 1.5;
920
+ color: #666;
921
+ background: #f0f4f8;
922
+ border-radius: 4px;
923
+ border-left: 3px solid #2f6fed;
924
+ }
925
+
926
+ /* ===== Context Menu Styles ===== */
927
+ .layer-control-context-menu {
928
+ position: absolute;
929
+ z-index: 1001;
930
+ background: #fff;
931
+ border-radius: 6px;
932
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
933
+ min-width: 180px;
934
+ padding: 4px 0;
935
+ font-size: 12px;
936
+ user-select: none;
937
+ }
938
+
939
+ .context-menu-item {
940
+ display: flex;
941
+ align-items: center;
942
+ gap: 10px;
943
+ padding: 8px 14px;
944
+ cursor: pointer;
945
+ color: #333;
946
+ transition: background-color 0.1s ease;
947
+ }
948
+
949
+ .context-menu-item:hover {
950
+ background: #f5f7fa;
951
+ }
952
+
953
+ .context-menu-item:active {
954
+ background: #e8ecf0;
955
+ }
956
+
957
+ .context-menu-item-icon {
958
+ width: 16px;
959
+ height: 16px;
960
+ display: flex;
961
+ align-items: center;
962
+ justify-content: center;
963
+ color: #666;
964
+ font-size: 14px;
965
+ }
966
+
967
+ .context-menu-item-label {
968
+ flex: 1;
969
+ }
970
+
971
+ .context-menu-item-danger {
972
+ color: #dc3545;
973
+ }
974
+
975
+ .context-menu-item-danger:hover {
976
+ background: #fef2f2;
977
+ }
978
+
979
+ .context-menu-item-danger .context-menu-item-icon {
980
+ color: #dc3545;
981
+ }
982
+
983
+ .context-menu-item[disabled] {
984
+ color: #aaa;
985
+ cursor: not-allowed;
986
+ }
987
+
988
+ .context-menu-item[disabled]:hover {
989
+ background: transparent;
990
+ }
991
+
992
+ .context-menu-separator {
993
+ height: 1px;
994
+ background: #e8e8e8;
995
+ margin: 4px 0;
996
+ }
997
+
998
+ /* Layer name input for renaming */
999
+ .layer-control-name-input {
1000
+ flex: 1;
1001
+ min-width: 80px;
1002
+ padding: 2px 6px;
1003
+ font-size: 12px;
1004
+ font-weight: 500;
1005
+ border: 1px solid #2f6fed;
1006
+ border-radius: 3px;
1007
+ outline: none;
1008
+ background: #fff;
1009
+ color: #333;
1010
+ }
1011
+
1012
+ .layer-control-name-input:focus {
1013
+ box-shadow: 0 0 0 2px rgba(47, 111, 237, 0.2);
1014
+ }
1015
+
1016
+ /* ===== Drag and Drop Styles ===== */
1017
+ .layer-control-drag-handle {
1018
+ width: 16px;
1019
+ height: 20px;
1020
+ display: flex;
1021
+ align-items: center;
1022
+ justify-content: center;
1023
+ cursor: grab;
1024
+ color: #999;
1025
+ font-size: 12px;
1026
+ flex-shrink: 0;
1027
+ touch-action: none;
1028
+ transition: color 0.1s ease;
1029
+ }
1030
+
1031
+ .layer-control-drag-handle:hover {
1032
+ color: #666;
1033
+ }
1034
+
1035
+ .layer-control-drag-handle:active {
1036
+ cursor: grabbing;
1037
+ }
1038
+
1039
+ .layer-control-drag-handle-disabled {
1040
+ color: #ddd;
1041
+ cursor: default;
1042
+ pointer-events: none;
1043
+ }
1044
+
1045
+ .layer-control-drag-handle-disabled:hover {
1046
+ color: #ddd;
1047
+ }
1048
+
1049
+ .layer-control-drag-handle svg {
1050
+ width: 12px;
1051
+ height: 12px;
1052
+ }
1053
+
1054
+ /* Dragging state for the item */
1055
+ .layer-control-item.dragging {
1056
+ opacity: 0.5;
1057
+ }
1058
+
1059
+ /* Floating dragged element */
1060
+ .layer-control-item-dragging {
1061
+ position: fixed;
1062
+ z-index: 1002;
1063
+ background: #fff;
1064
+ border-radius: 4px;
1065
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
1066
+ pointer-events: none;
1067
+ padding: 4px 8px;
1068
+ opacity: 0.95;
1069
+ }
1070
+
1071
+ /* Drop placeholder */
1072
+ .layer-control-drop-placeholder {
1073
+ background: #e8f0fe;
1074
+ border: 2px dashed #2f6fed;
1075
+ border-radius: 4px;
1076
+ margin: 2px 0;
1077
+ min-height: 32px;
1078
+ box-sizing: border-box;
1079
+ }
1080
+
1081
+ /* Prevent text selection during drag */
1082
+ .layer-control-panel.dragging-active {
1083
+ user-select: none;
1084
+ }
1085
+
1086
+ .layer-control-panel.dragging-active * {
1087
+ cursor: grabbing !important;
1088
+ }