-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
1318 lines (1166 loc) · 35.2 KB
/
style.css
File metadata and controls
1318 lines (1166 loc) · 35.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
:root {
--primary: #25476d;
--bg-color: #e1eefc;
--panel-bg: #ffffffec;
--text-main: #333333;
}
/**
* Global Body Styling
* Includes a repeating SVG wave pattern encoded directly into the CSS.
* The background is fixed to the viewport, allowing JavaScript to control the horizontal drift.
*/
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background-color: #0c2849;
/* URL-encoded SVG wave pattern */
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' opacity='0.15'%3E%3Cpath d='M0 25 C20 25, 25 5, 40 5 C35 15, 45 25, 60 25 C80 25, 85 5, 100 5 C95 15, 105 25, 120 25' /%3E%3Cpath d='M-30 55 C-10 55, -5 35, 10 35 C5 45, 15 55, 30 55 C50 55, 55 35, 70 35 C65 45, 75 55, 90 55 C110 55, 115 35, 130 35 C125 45, 135 55, 150 55' /%3E%3C/g%3E%3C/svg%3E");
background-attachment: fixed; /* Locks the waves in place vertically */
background-size: 120px 60px;
color: var(--text-main);
margin: 0;
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
}
/**
* Application Header
* Aligned with the main container geometry to ensure width matching on mobile.
*/
header {
width: 100%;
max-width: 1400px; /* Matches the max-width of the main content area */
display: flex;
box-sizing: border-box; /* Forces padding to push inward, preventing overflow */
flex-direction: column;
align-items: center;
text-align: center;
padding: 1rem;
margin: 0 auto 1rem auto; /* Centers alongside main */
background-color: #ffffff;
border-bottom: 1px solid #ddd;
border-radius: 8px; /* Softens edges to match panels */
}
/* Styles the main banner logo to be responsive and centered */
.banner-logo {
max-width: 100%;
width: 800px;
height: auto;
display: block;
margin: 0 auto 1rem auto; /* Centers the image and adds a little space below it */
}
/**
* Layout: Navigation Menu
* Structures fixed top-left positioning with a light glassmorphism effect.
* Adjusts the palette to match Navy/Orange.
*/
.nav-container {
position: fixed;
top: 20px;
left: 20px;
z-index: 2000;
}
.menu-toggle {
transition: transform 0.2s ease, box-shadow 0.2s ease;
display: inline-block;
cursor: pointer;
background: rgba(255, 255, 255, 0.85);
padding: 8px 8px 3px 8px; /* Expands the clickable hit-box around the SVG */
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
border: 1px solid rgba(0,0,0,0.05);
}
.menu-toggle:hover {
/* Simulats a physical lift toward the user */
transform: scale(1.05);
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.nav-links {
list-style: none;
margin-top: 10px;
padding: 1rem;
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(37, 71, 109, 0.15); /* Subtle Navy border */
border-radius: 8px;
display: none;
flex-direction: column;
gap: 10px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
transition: all 0.3s ease;
}
.nav-links.active {
display: flex;
}
.nav-links a {
color: #25476D;
text-decoration: none;
font-size: 0.9rem;
font-weight: 600;
display: block;
padding: 8px 12px;
border-radius: 4px;
transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.nav-links a:hover {
background: rgba(37, 71, 109, 0.08);
color: #f08118;
/* Nudges the text slightly to indicate selection */
transform: translateX(5px);
}
main {
max-width: 1400px;
margin: 2rem auto;
padding: 0 1rem;
}
.panel {
background-color: var(--panel-bg);
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
margin-bottom: 2rem;
}
.hidden {
display: none !important;
}
.upload-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
margin-bottom: 1rem;
}
button {
background-color: var(--primary);
color: white;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
font-size: 1rem;
}
button:hover { background-color: #1C3754; }
/* Container to align the primary action buttons and the divider horizontally */
.action-buttons {
display: flex;
align-items: center;
gap: 1rem;
margin-top: 1rem;
}
/* Styling for the text divider between the action buttons */
.or-divider {
color: #888888;
font-size: 0.95rem;
}
/* Styles the demo button to match the primary button dimensions but in orange */
.demo-btn {
background-color: #F08118; /* Vibrant orange */
color: white;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
font-size: 1rem;
}
/* Hover state for the demo button */
.demo-btn:hover {
background-color: #D27014; /* Darker orange */
}
/* Container holding the map and enabling the bottom-right resize handle */
#map-container, #map-container-c {
position: relative; /* anchors resize emblem.to the box */
height: 40vh; /* Dynamically sizes to 40% of the active browser window height */
min-height: 100px; /* Prevents the user from crushing the map out of existence */
width: 100%;
resize: both; /* Adds the drag handle to allow vertical and horizontal resizing */
overflow: hidden; /* CSS requires overflow: hidden (or auto/scroll) for 'resize' to function */
margin-bottom: -1.5rem;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0,0,0,0.2); /* Subtle shadow to define the draggable edge */
}
/* * Customises the physical clickable resize box in WebKit browsers (Chrome, Edge, Safari).
* Increases the hit target area and applies the SVG directly to the draggable space.
*/
#map-container::-webkit-resizer {
background-color: transparent;
width: 24px; /* Expands the horizontal clickable area */
height: 24px; /* Expands the vertical clickable area */
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' stroke='%23666666' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='2' y1='14' x2='14' y2='2' /%3E%3Cline x1='8' y1='14' x2='14' y2='8' /%3E%3Cline x1='14' y1='14' x2='14.01' y2='14' /%3E%3C/svg%3E");
background-size: 16px 16px;
background-repeat: no-repeat;
background-position: bottom 2px right 2px; /* Snugs the icon right into the corner */
}
/**
* Chart Master Wrapper Fullscreen Mode
* Expands the wrapper to fill the screen. Flexbox ensures the canvas
* grows to take up the top portion, pinning the trim sliders to the bottom.
*/
#fullscreen-wrapper-a:fullscreen,
#compare-map-container:fullscreen,
#fullscreen-wrapper-c:fullscreen {
width: 100vw;
height: 100vh;
margin: 0;
padding: 20px;
border-radius: 0;
background-color: white;
display: flex;
flex-direction: column;
overflow-y: auto; /* Adds a scrollbar just in case the monitor is extremely short */
}
/* =========================================
FULLSCREEN MAP MODE
========================================= */
/* Expand the wrapper to fill the screen */
#map-ui-wrapper:fullscreen,
#map-ui-wrapper-c:fullscreen {
width: 100vw;
height: 100vh;
background-color: #f8f9fa;
display: flex;
flex-direction: column;
padding: 0;
margin: 0;
overflow: hidden;
}
/* Force the map to fill the background */
#map-ui-wrapper:fullscreen #map-container,
#map-ui-wrapper-c:fullscreen #map-container-c {
position: absolute;
top: 0;
left: 0;
width: 100vw !important;
height: 100vh !important;
margin: 0 !important;
border-radius: 0;
z-index: 1;
resize: none;
}
/* Overlay the Dashboard at the top (Transparent Glass) */
#map-ui-wrapper:fullscreen .dashboard,
#map-ui-wrapper-c:fullscreen .dashboard {
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-50%);
width: 90%;
max-width: 1000px;
z-index: 1000;
/* Highly transparent white to act as a clear glass pane */
background: rgba(255, 255, 255, 0.15);
border: 1px solid rgba(255, 255, 255, 0.3); /* Subtle frosted edge */
box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Softened shadow */
margin: 0;
/* Keeps the blur so the map lines don't make the text unreadable */
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
}
/* Overlay the Controls at the bottom (Transparent Glass & Wider) */
#map-ui-wrapper:fullscreen .controls,
#map-ui-wrapper-c:fullscreen .controls {
position: absolute;
bottom: 30px;
left: 50%;
transform: translateX(-50%);
width: 95%; /* Widened from 90% */
max-width: 1200px; /* Widened to give the audio controls more room */
z-index: 1000;
background: rgba(255, 255, 255, 0.15); /* Transparent glass */
padding: 12px 20px !important;
border-radius: 8px;
border: 1px solid rgba(255, 255, 255, 0.3);
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
margin: 0;
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
}
/* Force the Audio Container to stay on a single row */
#map-ui-wrapper:fullscreen #audio-container {
margin: 0 !important; /* kills the inline HTML margin-bottom: 15px */
box-shadow: none;
border: none;
background: transparent;
padding: 0;
flex-wrap: nowrap; /* Forces elements to stay on one horizontal line */
gap: 15px;
}
/* Make the slider squishy so it absorbs extra space instead of breaking the layout */
#map-ui-wrapper:fullscreen #time-slider {
flex-grow: 1; /* Tells the slider to stretch and fill all remaining empty space */
width: auto !important; /* Overrides the inline 50% width */
}
/* Overrides the default Navy typography specifically when the app enters fullscreen mode AND Satellite View is active.
Forces the text to CoxOrb Orange (#F08118) to contrast against dark satellite water. */
#map-ui-wrapper.satellite-active:fullscreen .dashboard h2,
#map-ui-wrapper.satellite-active:fullscreen .dashboard h3,
#map-ui-wrapper.satellite-active:fullscreen .dashboard p,
#map-ui-wrapper.satellite-active:fullscreen .dashboard span,
#map-ui-wrapper.satellite-active:fullscreen .dashboard div,
#map-ui-wrapper.satellite-active:fullscreen .controls label,
#map-ui-wrapper.satellite-active:fullscreen .controls span,
#map-ui-wrapper-c.satellite-active:fullscreen .dashboard h2,
#map-ui-wrapper-c.satellite-active:fullscreen .dashboard h3,
#map-ui-wrapper-c.satellite-active:fullscreen .dashboard p,
#map-ui-wrapper-c.satellite-active:fullscreen .dashboard span,
#map-ui-wrapper-c.satellite-active:fullscreen .dashboard div,
#map-ui-wrapper-c.satellite-active:fullscreen .controls label,
#map-ui-wrapper-c.satellite-active:fullscreen .controls span {
color: #F08118 !important;
}
/* * Fallback for Firefox.
* Firefox ignores WebKit resizer properties and uses a fixed hit target,
* so we just snap the visual icon flush into the corner.
*/
@supports not selector(::-webkit-resizer) {
#map-container::after {
content: '';
position: absolute;
bottom: 0; /* Snaps flush to the bottom */
right: 0; /* Snaps flush to the right */
width: 16px;
height: 16px;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' stroke='%23666666' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='2' y1='14' x2='14' y2='2' /%3E%3Cline x1='8' y1='14' x2='14' y2='8' /%3E%3Cline x1='14' y1='14' x2='14.01' y2='14' /%3E%3C/svg%3E");
background-size: contain;
background-repeat: no-repeat;
pointer-events: none;
z-index: 1000;
opacity: 0.6;
}
}
/* Forces the Leaflet map to stretch exactly to whatever size the user drags the container to */
#map {
height: 100%;
width: 100%;
z-index: 1;
}
/**
* Component: Boat Marker
* Renders a red dot using standard DOM elements instead of SVG.
* Enables strict z-index control to float above the trim markers.
*/
.boat-marker-icon {
background-color: red;
border: 2px solid white;
border-radius: 50%;
box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
/* =========================================
CUSTOM LEAFLET MAP CONTROLS
========================================= */
/* Shrink the Layer Toggle Icon to 30x30 to match the Fullscreen button */
.leaflet-control-layers-toggle {
width: 30px !important;
height: 30px !important;
background-size: 16px 16px !important; /* Scales the physical image down */
background-position: center !important;
border-radius: 4px !important;
}
/* Style the expanded menu box */
.leaflet-control-layers-expanded {
padding: 10px 12px !important;
background: rgba(255, 255, 255, 0.95) !important;
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
border: 1px solid rgba(37, 71, 109, 0.2) !important; /* Navy border */
border-radius: 6px !important;
box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
/* Apply CoxOrb Navy typography */
color: var(--primary) !important;
font-family: inherit !important;
font-size: 0.85rem !important;
font-weight: 600 !important;
}
/* Add an Orange hover effect to the text */
.leaflet-control-layers-expanded label {
cursor: pointer;
transition: color 0.2s ease;
}
.leaflet-control-layers-expanded label:hover {
color: #F08118 !important; /* CoxOrb Orange */
}
/* Magically colour the native HTML radio buttons */
.leaflet-control-layers-selector {
accent-color: #F08118 !important; /* Turns the inner dot CoxOrb Orange when clicked */
margin-top: 1px;
cursor: pointer;
}
/* * Container for the playback and timeline controls.
*/
.controls {
margin: 1.3rem 0;
display: flex;
flex-direction: column;
gap: 1.0rem;
}
#time-slider { width: 100%; }
/**
* Metrics Dashboard Banner
* Displays real-time rowing statistics.
*/
.dashboard {
display: flex;
justify-content: space-around;
align-items: center;
flex-wrap: wrap;
background-color: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 6px;
padding: 10px 10px; /* Tight padding to condense the layout */
margin-top: -1.7rem; /* how close to the audio controls */
margin-bottom: 1rem;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
position: relative;
z-index: 10;
width: 100%;
box-sizing: border-box;
}
/*
* Individual statistic containers within the dashboard.
*/
.stat-box {
font-weight: bold;
font-size: 1.1rem;
text-align: center;
flex: 1;
min-width: 100px;
}
.stat-box span {
color: var(--primary);
font-weight: normal;
}
.chart-container {
height: 30vh; /* Dynamically sizes to 30% of the active browser window height */
min-height: 220px;
width: 100%;
margin-top: -0.5rem;
}
/**
* Chart Fullscreen Button Styling
* Positions the control neatly in the top-left corner of the chart areas.
*/
.chart-fullscreen-btn {
position: absolute;
top: 10px;
left: 10px;
z-index: 10;
background: white;
border: 1px solid #ccc;
border-radius: 4px;
width: 30px;
height: 30px;
cursor: pointer;
font-size: 1.2rem;
display: flex;
align-items: center;
justify-content: center;
color: #333;
padding: 0;
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
/* Drops the button to 30% visibility */
opacity: 0.3;
/* Ensures both the background colour and the fade effect animate smoothly */
transition: background-color 0.2s, opacity 0.2s;
}
.chart-fullscreen-btn:hover {
background-color: #f4f4f4;
/* Pops to full solid visibility when the mouse enters */
opacity: 1;
}
/**
* Chart Fullscreen Mode
* Ensures the chart fills the screen, maintains a solid background,
* and adds padding so the axes do not touch the monitor edges.
*/
.chart-container:fullscreen,
#chart-wrap-c:fullscreen {
width: 100vw;
height: 100vh;
margin: 0;
padding: 20px;
border-radius: 0;
background-color: white;
display: flex;
flex-direction: column;
}
/**
* Component: Dual Range Slider
* Structured two native HTML range inputs absolutely positioned over each other.
* Removes default styling and enabled pointer events only on the thumb handles
* to allow independent dragging.
*/
.dual-slider-wrapper {
position: relative;
width: 100%;
height: 32px;
}
.dual-slider-track {
position: absolute;
width: 100%;
height: 6px;
top: 13px;
background: #e0e0e0;
border-radius: 3px;
z-index: 1;
}
.dual-slider-wrapper input[type="range"] {
position: absolute;
width: 100%;
height: 32px;
top: 0;
margin: 0;
appearance: none;
background: transparent;
pointer-events: none;
z-index: 2;
}
.dual-slider-wrapper input[type="range"]::-webkit-slider-thumb {
pointer-events: all;
width: 8px;
height: 32px;
appearance: none;
background: #F08118; /* CoxOrb Orange */
border: 2px solid #25476D; /* CoxOrb Navy */
border-radius: 4px;
cursor: ew-resize;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
/**
* Component: Map Boundary Markers
* Renders vertical bars to clearly indicate the chopped start and end points.
* Centering is handled natively by Leaflet's iconAnchor.
*/
.custom-trim-wrapper {
background: transparent;
border: none;
}
.trim-marker-bar {
background-color: #F08118;
border: 2px solid #25476D;
width: 8px;
height: 30px;
border-radius: 4px;
box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
transform-origin: center center; /* Ensures the rotation pivots around the middle */
}
/* Container for the secondary comparison map, styled to match the primary map */
#compare-map-container {
position: relative;
height: 500px;
min-height: 100px;
width: 100%;
resize: both;
overflow: hidden;
margin-top: 1.5rem;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
/* Duplicates the WebKit resize handle injection for the secondary map */
#compare-map-container::-webkit-resizer {
background-color: transparent;
width: 24px;
height: 24px;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' stroke='%23666666' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='2' y1='14' x2='14' y2='2' /%3E%3Cline x1='8' y1='14' x2='14' y2='8' /%3E%3Cline x1='14' y1='14' x2='14.01' y2='14' /%3E%3C/svg%3E");
background-size: 16px 16px;
background-repeat: no-repeat;
background-position: bottom 2px right 2px;
}
#compare-map {
height: 100%;
width: 100%;
z-index: 1;
}
/* Styling for the comparison map legend */
.map-legend {
background: white;
padding: 10px 12px;
border-radius: 6px;
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
font-size: 0.9rem;
color: var(--text-main);
}
/* Flexbox container to align the color swatches with the text */
.legend-item {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 6px;
}
/* Removes the bottom margin from the last item so the box padding stays even */
.legend-item:last-child {
margin-bottom: 0;
}
/* The physical colored square drawn next to the text */
.legend-color {
width: 16px;
height: 16px;
border-radius: 3px;
display: inline-block;
}
/* Layout for each individual comparison route row */
.compare-row {
display: flex;
align-items: center;
gap: 15px;
background: #f8f9fa;
padding: 10px 15px;
border-radius: 6px;
border: 1px solid #e9ecef;
}
.route-label {
font-weight: bold;
width: 65px;
}
/* CSS implementation of an iOS-style toggle switch */
.toggle-switch {
position: relative;
display: inline-block;
width: 44px;
min-width: 44px; /* Forces the minimum width */
height: 24px;
margin-left: auto; /* Pushes the toggle to the far right of the row */
flex: 0 0 44px; /* Tells Flexbox: Do not grow, do not shrink, stay exactly 44px */
}
/* Hides the default HTML checkbox */
.toggle-switch input {
opacity: 0;
width: 0;
height: 0;
}
/* The visual track of the slider */
.slider {
position: absolute;
cursor: pointer;
top: 0; left: 0; right: 0; bottom: 0;
background-color: #ccc;
transition: .4s;
border-radius: 24px;
}
/* The moving circular nub inside the slider */
.slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 4px;
bottom: 4px;
background-color: white;
transition: .4s;
border-radius: 50%;
}
/* Changes track color and slides the nub when checked */
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }
/* Styling for the clear/reset buttons */
.clear-btn {
background-color: transparent;
color: #C0392B; /* Red text */
border: 1px solid #C0392B;
}
/* Hover state for the clear buttons */
.clear-btn:hover {
background-color: #FADBD8; /* Soft red background */
color: #A93226;
}
/* --- Audio Player & Timeline Theme --- */
/* Styling the container with the CoxOrb look */
#audio-container {
background-color: var(--panel-bg);
border: 1px solid #e9ecef;
border-radius: 6px;
padding: 8px 8px;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
box-shadow: 0 2px 6px rgba(0,0,0,0.05);
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 15px;
}
/* Styling the label with html h3 tag */
#audio-container h3 {
margin-top: 0;
margin-bottom: -30px;
font-size: 0.85rem;
font-weight: 600;
color: var(--primary); /* CoxOrb Navy */
text-transform: uppercase;
letter-spacing: 0.5px;
}
/* Base styling for the native player element */
audio, #audio-player {
display: none !important; /* Hides the invisible player so it takes up 0 pixels */
}
/**
* Custom Play/Pause Button
* Circular, high-contrast button to control the hidden audio element.
*/
.play-btn {
background-color: var(--primary); /* CoxOrb Navy */
color: white;
border: none;
border-radius: 50%;
width: 45px;
height: 45px;
font-size: 1.2rem;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
flex-shrink: 0;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
transition: background-color 0.2s;
}
.play-btn:hover {
background-color: #1C3754;
}
/**
* Skip Buttons
* Compact buttons for skipping backward and forward through the timeline.
*/
.skip-btn {
background-color: #F08118; /* CoxOrb Orange */
color: white;
border-radius: 4px;
padding: 6px 10px;
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
flex-shrink: 0;
transition: all 0.2s ease;
}
.skip-btn:hover {
background-color: #D27014; /* Darker orange */
color: white;
}
/* -------------------Audio Styling END -------------------*/
/**
* Secondary Utility Button (speed-colouring reset)
* A compact, less prominent button for resetting background variables
* without distracting from primary dashboard actions.
*/
.secondary-btn {
background-color: #e9ecef; /* Neutral grey background */
color: var(--primary); /* CoxOrb Navy text */
border: 1px solid #ced4da;
border-radius: 4px;
padding: 4px 8px;
font-size: 0.75rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}
.secondary-btn:hover {
background-color: #dee2e6;
color: #1C3754;
}
/**
* GitHub Button
* Styled button for linking to the GitHub repository.
*/
.GitHub-btn {
background-color: var(--primary); /* CoxOrb blue */
color: white;
border-radius: 4px;
padding: 6px 10px;
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
flex-shrink: 0;
transition: all 0.2s ease;
}
.GitHub-btn:hover {
background-color: #1C3754; /* Darker blue */
color: white;
}
/**
* Print Formatting Rules
* Strips all interactive UI elements, margins, and flexible heights
* to ensure the analytical report fits onto a single PDF page without blank overflows.
* Enforced maximum widths to prevent the canvas and map from bleeding off the paper.
*/
@media print {
/* Defines physical paper margins and resets page geometry */
@page {
size: landscape;
margin: 1cm;
}
html, body {
background-color: white !important;
margin: 0 !important;
padding: 0 !important;
height: auto !important;
overflow: visible !important;
width: 100% !important;
max-width: 100% !important;
}
/* Erases the interactive UI components */
.upload-grid,
.action-buttons,
#compare-inputs,
.controls,
#speed-toggle-container,
#fairway-toggle-container,
#buoys-toggle-container,
#export-section,
#support-section,
#feedback-section,
hr {
display: none !important;
}
.nav-container {
display: none !important;
}
/* Strips structural padding and forces strict width containment */
.panel {
box-shadow: none !important;
border: none !important;
margin: 0 !important;
padding: 0 !important;
width: 100% !important;
max-width: 100% !important;
box-sizing: border-box !important;
}
/* Forces the remaining analytical elements to stay together and fit the page */
#replay-section {
page-break-after: avoid !important;
page-break-inside: avoid !important;
}
/* Tells the Comparison tool to always start on a new printed page */
#compare-section {
break-before: page !important;
page-break-before: always !important; /* Fallback for older browser rendering engines */
}
.chart-container,
#map-container,
.dashboard {
page-break-inside: avoid !important;
width: 100% !important;
max-width: 100% !important;
box-sizing: border-box !important;
}
/* Tells the canvas to shrink to the physical paper width */
canvas {
max-width: 100% !important;
height: auto !important;
}
/**
* Renders the attribution text at the very bottom of the generated PDF.
*/
.print-only {
display: block !important;
text-align: center;
margin-top: 40px;
padding-top: 15px;
border-top: 1px solid #cccccc;
font-size: 0.85rem;
color: #666666;
width: 100%;
}
.print-only a {
color: #25476D; /* CoxOrb Navy */
text-decoration: none;
}
}
/**
* Navigational Buoy Tooltip
* Applies the CoxOrb colour palette (Navy & Orange) to the Leaflet tooltip.
* Stripps the default Leaflet formatting.
*/
.coxorb-tooltip {
background-color: #25476D;
color: #ffffff;
border: 2px solid #F08118;
border-radius: 4px;
font-weight: 600;
font-size: 0.8rem;
padding: 5px 10px;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
/* Removed the default triangle pointer styling to maintain a clean rectangular badge */
.leaflet-tooltip.coxorb-tooltip::before {
display: none;
}
/**
* Layout: Print Footer
* Hides the attribution text during standard interactive screen viewing.
*/
.print-only {
display: none;
}