-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
884 lines (796 loc) · 25.8 KB
/
style.css
File metadata and controls
884 lines (796 loc) · 25.8 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
/* START OF FILE style.css */
/* Global Reset and Box Sizing */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* CSS Variables for the Color Scheme */
:root {
/* Background shades (grays) */
--bg-body: #2b2b2b; /* Body overall background (dark gray) */
--bg-container: #3a3a3a; /* Main container background */
--bg-panel: #444444; /* Controls and visualization panels */
--bg-box-inner: #505050; /* Slightly lighter for inner boxes */
--bg-table: #555555; /* Table header backgrounds */
--bg-input: #666666; /* Input field backgrounds */
--bg-button: #555555; /* Button background */
/* Border color */
--border: #666666;
/* Primary text */
--text-primary: #ffffff; /* White for main foreground text */
--text-secondary: #cccccc;
/* Accent (foreground) colors */
--accent-red: #ff4136;
--accent-yellow: #ffdc00;
--accent-green: #2ecc40;
--accent-blue: #0074d9;
}
/* Body styling */
body {
font-family: sans-serif;
line-height: 1.4;
margin: 15px; /* Updated margin */
font-size: 14px;
background-color: var(--bg-body);
color: var(--text-primary);
}
/* Main Container */
.container {
display: flex;
flex-wrap: wrap;
gap: 20px;
background-color: var(--bg-container);
padding: 20px;
border: 1px solid var(--border);
border-radius: 8px;
max-width: 1800px; /* Consistent max width like gaussianbeam */
margin: 0 auto 20px auto; /* Centering and bottom margin */
}
/* --- REMOVED: .controls Style Block --- */
/* .controls { ... } */
/* --- START: New Style for Control Column Wrapper --- */
.control-column {
flex: 1 1 700px; /* Takes up space, allows shrinking, base width */
min-width: 650px; /* Minimum width before wrapping */
display: flex; /* Use flex to arrange inner boxes */
flex-direction: column; /* Stack inner boxes vertically */
gap: 15px; /* Space between the add box and path box */
/* No background or border needed here, it's a logical wrapper */
}
/* --- END: New Style for Control Column Wrapper --- */
/* --- Styles for Inner Boxes (Add Element, Optical Path) --- */
.add-element-box,
.optical-path-box {
background-color: var(--bg-panel); /* Use panel background */
padding: 15px;
border: 1px solid var(--border);
border-radius: 5px;
/* margin-bottom: 15px; */ /* REMOVED - Gap handled by .control-column */
}
/* Remove margin from the last box (Not strictly needed with flex gap) */
/* .optical-path-box { margin-bottom: 0; } */
.add-element-box h3, /* Specific headings inside boxes */
.optical-path-box h3 {
margin-bottom: 10px;
padding-left: 0; /* Remove general indent if applied */
color: var(--text-primary);
font-size: 1.1em; /* Slightly smaller than main H2 */
}
/* Controls within the add element box */
.add-element-controls {
display: flex;
align-items: center;
gap: 10px; /* Space between label, select, button */
flex-wrap: wrap; /* Allow wrapping on small screens */
}
.add-element-controls label {
/* Optional: style label */
font-weight: bold;
flex-shrink: 0; /* Prevent label shrinking */
}
.add-element-controls select {
flex-grow: 1; /* Allow select to take available space */
min-width: 150px; /* Give it a minimum size */
}
/* Header within the optical path box (for H3 and buttons) */
.optical-path-header {
display: flex;
justify-content: space-between; /* Pushes h3 left, buttons right */
align-items: center; /* Vertically align h3 and buttons */
margin-bottom: 15px; /* Space between header+buttons and the table */
flex-wrap: wrap; /* Allow wrapping */
gap: 10px; /* Gap when wrapping */
}
.optical-path-header h3 {
margin-bottom: 0; /* Remove bottom margin from h3 itself */
flex-shrink: 0; /* Prevent title from shrinking too much */
}
/* --- END: Styles for Inner Boxes --- */
/* --- MODIFIED: Table Actions Styling --- */
.table-actions {
/* margin-top: 15px; */ /* REMOVED - Now controlled by optical-path-header flex */
/* margin-bottom: 10px; */ /* REMOVED */
display: flex;
gap: 10px; /* Space between buttons */
/* No longer needs to be block or full width by default */
}
.table-actions button {
padding: 6px 12px; /* Adjust padding */
font-size: 0.9em; /* Adjust font size */
}
.table-actions button i {
margin-right: 6px; /* Space between icon and text */
}
/* --- END MODIFIED: Table Actions Styling --- */
/* Visualization Panel */
.visualization {
flex: 1 1 450px;
min-width: 400px;
background-color: var(--bg-panel);
display: flex;
flex-direction: column;
padding: 15px;
border: 1px solid var(--border);
border-radius: 5px;
}
/* --- START: Added Theme Toggle Styling --- */
.theme-toggle-container {
margin-bottom: 10px; /* Space below button, above canvas */
text-align: right; /* Position button to the right */
}
#theme-toggle-btn {
padding: 4px 8px; /* Slightly smaller padding */
font-size: 0.9em; /* Slightly smaller font */
vertical-align: middle; /* Align if needed */
}
#theme-toggle-btn i {
margin-right: 5px; /* Space between icon and text */
font-size: 1.1em; /* Adjust icon size if needed */
vertical-align: middle;
}
/* --- END: Added Theme Toggle Styling --- */
/* Canvas Container */
#canvas-container {
position: relative; /* Needed for absolute positioning of children */
border: 1px solid var(--border);
margin-bottom: 10px; /* Space between canvas and controls */
height: 400px;
width: 100%;
/* Removed background color here, scene bg is now controlled by JS */
/* background-color: var(--bg-container); */
overflow: hidden; /* Prevents labels going outside container if needed */
}
#visualizationCanvas {
display: block;
width: 100%;
height: 100%;
/* Canvas is positioned relatively by default */
/* === ADDED CSS FOR TOUCH === */
touch-action: none; /* Prevent default browser touch actions like scroll/zoom on the canvas */
}
/* === ADDED CSS === */
/* Controls below the canvas */
.visualization-controls {
margin-bottom: 15px; /* Space below the controls */
display: flex;
align-items: center; /* Align items vertically */
flex-wrap: wrap; /* Allow wrapping on smaller screens */
gap: 5px 10px; /* Spacing between items */
}
.visualization-controls label {
cursor: pointer; /* Make labels clickable */
margin-right: 5px; /* Space after label */
}
.visualization-controls input[type="checkbox"] {
margin-right: 2px; /* Space between checkbox and label */
vertical-align: middle; /* Align checkbox with text */
}
.visualization-controls span {
vertical-align: middle; /* Align "Show:" text */
}
/* Move play/pause button styling if needed, or leave as is */
#play-pause-btn {
min-width: 80px;
/* margin-top/bottom removed as .visualization-controls handles spacing */
}
/* CSS 2D Renderer Overlay Container */
#css2d-renderer {
position: absolute; /* Overlay on top of the canvas */
top: 0;
left: 0;
width: 100%;
height: 100%;
/* IMPORTANT: Prevent this layer from blocking mouse/touch events to the canvas */
pointer-events: none;
overflow: hidden; /* Hide labels that might go off-screen */
}
/* Style for the individual element labels */
.element-label {
color: var(--text-primary);
background-color: rgba(43, 43, 43, 0.7); /* Semi-transparent dark background */
padding: 2px 5px;
border-radius: 3px;
font-size: 10px;
font-family: sans-serif;
/* === THE KEY CHANGE === */
/* Prevent the label DIV itself from capturing mouse/touch events */
pointer-events: none; /* Changed from 'auto' back to 'none' */
/* ====================== */
cursor: default; /* Cursor style doesn't matter much now */
white-space: nowrap; /* Prevent label text wrapping */
/* Position adjustments might be needed based on font/padding */
transform: translateX(-50%); /* Helps center the label above the anchor point */
margin-top: -1.5em; /* Adjust vertical offset */
}
/* Headings */
h1, h2 { /* Keep general H1, H2 styling */
margin-bottom: 10px;
/* Removed padding-top from general h2, h3 */
color: var(--text-primary);
}
/* Main H2 inside .visualization */
.visualization > h2 {
padding-left: 5px; /* Keep slight indent for the main "Visualization" heading */
margin-bottom: 15px; /* More space below main heading */
}
/* Modified H1 styles specifically for the info block and copyright move */
h1 {
/* padding-top: 0; */ /* Handled by padding below */
border-bottom: 1px solid var(--border);
padding-bottom: 3px;
margin: 0 15px 10px 15px; /* Consistent with gaussianbeam spacing */
font-size: 1.7em;
/* Flexbox for layout */
display: flex;
justify-content: space-between;
/* Align items top */
align-items: flex-start;
flex-wrap: wrap; /* Allow info to wrap */
gap: 10px; /* Gap between title/copyright group and info */
/* Use panel background for consistency */
background-color: var(--bg-panel);
padding: 8px 15px;
border-radius: 4px;
}
/* COPYRIGHT MOVE - Wrapper for title and copyright */
.h1-title-group {
flex-shrink: 0; /* Prevent shrinking */
}
/* Define span for the title part */
.h1-title {
/* Allow title to shrink if needed */
flex-grow: 1;
margin-right: 10px; /* Add some space before info block */
display: block; /* Ensure it takes its own line if needed */
}
/* COPYRIGHT MOVE - Style for copyright below title */
.h1-copyright {
font-size: 0.8rem; /* Smaller font size */
color: var(--text-secondary); /* Use secondary text color */
margin-top: 2px; /* Small space below title */
line-height: 1.2;
font-weight: normal; /* Ensure it's not bold */
}
.h1-copyright a {
color: inherit; /* Inherit the secondary color */
text-decoration: none;
}
.h1-copyright a:hover {
text-decoration: underline;
color: var(--accent-blue); /* Use accent color on hover */
filter: brightness(1.1); /* Slightly brighten link on hover */
}
/* Main Elements Table Styling */
#elements-table {
width: 100%;
border-collapse: collapse;
/* margin-top: 10px; */ /* REMOVED - spacing handled by optical-path-header margin */
table-layout: fixed;
}
#elements-table th,
#elements-table td {
border: 1px solid var(--border);
padding: 6px 8px;
text-align: left;
font-size: 0.9em;
vertical-align: middle;
word-wrap: break-word;
overflow-wrap: break-word;
}
/* Table Header (using theme variable) */
#elements-table th {
background-color: var(--bg-table);
color: var(--text-primary);
white-space: normal;
}
/* Define Column Widths (7 columns) */
#elements-table th:nth-child(1) { width: 18%; } /* Type */
#elements-table th:nth-child(2) { width: 10%; text-align: center; } /* Position */
#elements-table th:nth-child(3) { width: 28%; } /* Properties */
#elements-table th:nth-child(4) { width: 12%; text-align: center; } /* Ellipse */
#elements-table th:nth-child(5) { width: 18%; } /* Output Vector */
#elements-table th:nth-child(6) { width: 9%; text-align: right; } /* Intensity */
#elements-table th:nth-child(7) { width: 5%; text-align: center; } /* Actions */
/* Align specific data columns */
#elements-table td:nth-child(2) { text-align: center; } /* Position */
#elements-table td:nth-child(4) { text-align: center; } /* Ellipse */
#elements-table td:nth-child(6) { text-align: right; } /* Intensity */
#elements-table td:nth-child(7) { text-align: center; } /* Actions */
#elements-table td:nth-child(3) { vertical-align: top; } /* Properties */
#elements-table td:nth-child(5) {
font-family: monospace;
font-size: 0.85em;
white-space: normal;
}
/* Input Fields within the Table */
td input[type="number"],
td input[type="text"] {
width: 95%;
max-width: 60px; /* You might need to adjust this slightly if spinners cause overflow */
padding: 3px;
font-size: 0.95em;
border: 1px solid var(--border);
background-color: var(--bg-input);
color: var(--text-primary);
border-radius: 3px;
/* Spinners are default, removal lines commented out */
/* -moz-appearance: textfield; */
/* appearance: textfield; */
}
/* Disabled/Read-Only Input Fields (Shaded) */
td input[disabled],
td input[readonly] {
color: var(--border);
border: 1px solid var(--border);
/* Optionally, remove pointer events */
pointer-events: none;
}
/* Styling for Properties Cell Content */
.properties-cell .property-item,
.initial-properties-cell > div {
display: block;
margin-bottom: 4px;
}
.properties-cell,
.initial-properties-cell {
white-space: normal;
}
.properties-cell .property-item span {
display: inline-block;
font-size: 0.9em;
}
.properties-cell .property-item span.unit-label {
margin-left: 2px;
color: var(--accent-blue);
}
.properties-cell .property-item input[type="number"] {
margin-left: 4px;
}
/* Initial Polarization Properties */
.initial-properties-cell label {
display: block;
font-size: 0.9em;
font-weight: bold;
margin-bottom: 3px;
color: var(--accent-green);
}
.initial-properties-cell select {
display: block;
width: 100%;
max-width: 200px;
font-size: 0.95em;
padding: 3px;
border: 1px solid var(--border);
border-radius: 3px;
background-color: var(--bg-input);
color: var(--text-primary);
}
.initial-properties-cell input[type="text"] {
width: 45px;
margin: 0 2px;
padding: 3px;
border: 1px solid var(--border);
border-radius: 3px;
background-color: var(--bg-input);
color: var(--text-primary);
}
.initial-properties-cell button {
padding: 2px 6px;
margin-left: 5px;
font-size: 0.9em;
vertical-align: middle;
color: var(--text-primary);
background-color: var(--accent-blue);
border: 1px solid var(--accent-blue);
border-radius: 3px;
transition: background-color 0.2s;
}
.initial-properties-cell button:hover {
background-color: var(--accent-green);
border-color: var(--accent-green);
}
.initial-properties-cell .custom-inputs {
font-size: 0.9em;
margin-top: 5px;
line-height: 1.6;
}
.initial-properties-cell .custom-inputs span {
display: inline-block;
min-width: 20px;
}
/* Styling for Ellipse Cell Content */
.ellipse-cell svg {
display: block;
margin: 0 auto 3px auto;
width: 50px;
height: 50px;
overflow: visible;
}
.psi-chi-text { /* For non-input rows */
display: block;
font-size: 0.8em;
color: var(--accent-yellow);
line-height: 1.2;
white-space: nowrap;
}
.input-ellipse-cell {
vertical-align: top; /* Align SVG and inputs nicely */
}
.psi-chi-inputs {
display: block;
font-size: 0.85em;
line-height: 1.5; /* Add spacing between lines */
text-align: center; /* Center labels and inputs */
margin-top: 4px; /* Space below SVG */
}
.psi-chi-inputs label {
display: inline-block;
width: 20px; /* Align labels */
text-align: right;
margin-right: 3px;
color: var(--accent-yellow); /* Match display text color */
font-weight: bold;
}
.psi-chi-inputs input[type="number"] {
width: 45px; /* Small inputs */
padding: 2px 3px;
font-size: 0.95em;
text-align: right;
border: 1px solid var(--border);
background-color: var(--bg-input);
color: var(--text-primary);
border-radius: 3px;
/* Allow spinners */
-moz-appearance: textfield; /* Firefox */
appearance: textfield;
}
/* Hide spinners for webkit browsers if desired (optional) */
.psi-chi-inputs input[type=number]::-webkit-inner-spin-button,
.psi-chi-inputs input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* General Controls and Button Styling */
button {
padding: 5px 10px;
cursor: pointer;
font-size: 0.95em;
border: 1px solid var(--border);
background-color: var(--bg-button);
color: var(--text-primary);
border-radius: 3px;
transition: background-color 0.2s;
}
button:hover {
background-color: var(--accent-green);
border-color: var(--accent-green);
}
select {
padding: 3px;
border: 1px solid var(--border);
border-radius: 3px;
background-color: var(--bg-input);
color: var(--text-primary);
}
/* Specific Controls for Adding Elements */
#add-element-btn {
background-color: var(--accent-green); /* Always green background */
border-color: var(--accent-green); /* Matching border */
color: var(--text-primary); /* Ensure text is readable (usually white) */
}
/* Optional: Define a specific hover effect for the Add button */
#add-element-btn:hover {
background-color: var(--accent-green); /* Stay green */
border-color: var(--accent-green); /* Stay green */
filter: brightness(1.15); /* Make slightly brighter on hover */
}
/* Remove Button Styling (uses red accent) */
.remove-btn {
color: var(--accent-red);
background: none;
border: none;
cursor: pointer;
font-weight: bold;
font-size: 1.1em;
padding: 0 5px;
}
.remove-btn:hover {
background-color: transparent;
}
/* Play-Pause Button and Plot Controls */
/* Play-Pause button style is now handled by .visualization-controls gap/alignment */
#play-pause-btn {
/* align-self: center; */ /* Not needed if in flex row */
/* margin-top: 5px; */ /* Spacing handled by flex gap */
/* margin-bottom: 15px; */ /* Spacing handled by flex gap */
min-width: 80px;
}
#play-pause-btn i {
margin-right: 6px; /* Adjust as needed */
/* vertical-align: middle; */ /* Usually not needed for buttons, but uncomment if alignment is off */
}
#intensityPlot {
margin-top: 5px;
margin-bottom: 15px;
}
.plot-controls {
margin-bottom: 5px;
}
/* Add to style.css */
/* Styling for the mirror checkbox */
.properties-cell input[type="checkbox"] {
vertical-align: middle;
margin-right: 4px;
}
.properties-cell label { /* Style label associated with checkbox */
display: inline; /* Keep label on same line */
font-weight: normal;
font-size: 0.95em;
vertical-align: middle;
}
/* Style reflected rows */
.reflected-row {
background-color: rgba(255, 165, 0, 0.1); /* Light orange background */
font-style: italic;
}
.reflected-row td:nth-child(1) { /* Type column */
font-weight: bold;
color: #ffcc66; /* Lighter orange text */
}
.reflected-properties input,
.reflected-properties button {
opacity: 0.7;
cursor: not-allowed !important; /* Indicate non-interactive */
}
.reflected-angle-info {
font-size: 0.85em;
color: #aaa;
margin-left: 5px;
}
.final-reflected-row {
border-top: 2px solid #ffcc66;
font-weight: bold;
}
/* Style rows with zero intensity (e.g., after mirror) */
.zero-intensity-row {
/* Optional: slightly dimmer text or background */
color: #aaa;
/* background-color: rgba(80, 80, 80, 0.1); */
}
.zero-intensity-row input {
opacity: 0.6; /* Dim inputs as well */
}
/* --- START OF ADDED STYLES FOR H1 INFO BLOCK --- */
/* Copied/adapted from gaussianbeam.html's style.css and adjusted for dark theme */
/* (H1 styles are modified above, near the original H1 definition) */
/* H1 INFO MOVE - Style the container for the info */
/* H1 INFO LAYOUT - Arrange info items horizontally */
.h1-info {
display: flex; /* Arrange items horizontally */
gap: 20px; /* Space between info items */
font-size: 0.6em; /* Relative to h1 font size */
line-height: 1.3;
text-align: center; /* Center text within items */
color: var(--text-secondary); /* Use existing color variable */
margin-left: auto; /* Push to the right */
flex-shrink: 0; /* Prevent shrinking */
align-items: flex-start; /* Align items to the top */
}
/* H1 INFO LAYOUT - Style for each info block */
.info-item {
display: flex;
flex-direction: column; /* Stack label above content */
align-items: center; /* Center label and content */
min-width: 80px; /* Give items some minimum width */
}
/* H1 INFO LAYOUT - Style for the labels */
.info-label {
font-size: 0.8em; /* Smaller font for label */
font-weight: bold;
color: var(--text-secondary); /* Use existing color */
margin-bottom: 3px;
white-space: nowrap; /* Prevent label wrapping */
text-transform: uppercase; /* Optional: Make labels uppercase */
letter-spacing: 0.5px; /* Optional: Add letter spacing */
}
/* H1 INFO LAYOUT - Style for the content below label */
.info-content {
font-size: 0.95em; /* Adjust content font size if needed */
}
/* REMOVED .info-item-copyright styling as it's no longer in .h1-info */
/* H1 INFO LAYOUT - Style the links within the info block */
.h1-info a {
color: var(--accent-blue); /* Use existing color variable */
text-decoration: none;
display: inline-block; /* Needed for icon centering */
vertical-align: middle; /* Added for better icon alignment */
}
.h1-info a:hover {
text-decoration: underline;
filter: brightness(1.2); /* Brighten on hover for dark theme */
}
/* H1 INFO LAYOUT - General style for icons within info links */
.h1-info a i {
font-size: 1.8em; /* Default size */
line-height: 1;
color: var(--text-primary); /* Use primary text color for icons */
vertical-align: middle; /* Helps alignment */
transition: filter 0.2s ease, color 0.2s ease; /* Smooth hover effect */
}
.h1-info a:hover i {
color: var(--accent-blue); /* Icon color on hover */
filter: brightness(1.1); /* Slightly brighten icon on hover too */
}
/* GitHub icon styling (if different needed) */
.h1-info a .fab.fa-github {
color: #e0e0e0; /* Lighter gray for GitHub icon on dark bg */
}
.h1-info a:hover .fab.fa-github {
color: var(--accent-blue);
}
.h1-info a:hover .fa-solid.fa-file-invoice {
color: var(--accent-blue);
}
/* --- Media Queries --- */
/* Adapt layout for medium screens */
@media (max-width: 1200px) {
.control-column { /* Adjust control column width */
min-width: 550px;
}
.visualization {
min-width: 350px; /* Allow visualization panel to shrink a bit */
}
}
/* Adapt layout for smaller screens (tablet portrait) */
@media (max-width: 992px) {
.container {
flex-direction: column; /* Stack controls and visualization */
padding: 15px;
}
.control-column, .visualization { /* Apply to new control column */
flex-basis: auto; /* Allow them to take full width */
min-width: 0; /* Remove min-width constraint */
width: 100%;
}
}
/* Media Queries for H1 Info Block (and overall compaction) */
@media (max-width: 768px) {
body {
font-size: 13px;
margin: 10px; /* Reduce body margin */
}
.container { padding: 10px; }
.control-column { gap: 10px; } /* Reduce gap in control column */
.add-element-box, .optical-path-box, .visualization { padding: 10px; } /* Reduce padding in boxes */
h1 {
font-size: 1.5em; /* Adjust h1 size */
margin: 0 10px 8px 10px; /* Adjust h1 margin */
padding: 6px 10px; /* Adjust h1 padding */
}
.add-element-box h3, .optical-path-box h3, .visualization > h2 { margin-bottom: 8px; } /* Reduce heading margins */
.h1-info {
font-size: 0.65em;
margin-left: 0; /* Reset margin */
flex-basis: 100%; /* Take full width when wrapped */
margin-top: 8px; /* Add space when wrapped */
justify-content: space-around; /* Spread items out a bit */
gap: 10px;
}
.info-item { min-width: 60px; }
/* Adjust inner box padding */
.add-element-box,
.optical-path-box {
padding: 10px;
}
.optical-path-header {
margin-bottom: 10px; /* Reduce space above table */
gap: 5px; /* Reduce gap between h3 and buttons */
}
.table-actions button { /* Make export/import buttons smaller */
padding: 4px 8px;
font-size: 0.85em;
}
#elements-table th, #elements-table td {
padding: 4px 6px; /* Reduce table padding */
font-size: 0.85em; /* Reduce table font */
}
td input[type="number"], td input[type="text"] {
font-size: 0.9em;
}
#canvas-container { height: 350px; } /* Reduce canvas height */
}
@media (max-width: 480px) {
body {
font-size: 12px;
margin: 5px; /* Further reduce body margin */
}
.container { padding: 8px; }
.control-column { gap: 8px; } /* Further reduce gap */
.add-element-box, .optical-path-box, .visualization { padding: 8px; } /* Further reduce padding */
h1 {
font-size: 1.4em; /* Adjust h1 size */
margin: 0 8px 6px 8px;
padding: 5px 8px;
gap: 5px; /* Adjust gap for wrapping */
}
/* COPYRIGHT MOVE: Let title group take width when wrapping */
.h1-title-group {
flex-basis: 100%; /* Allow title/copyright group to wrap */
}
.h1-info {
font-size: 0.7em;
flex-direction: column; /* Stack items vertically */
align-items: flex-start; /* Align stacked items left */
gap: 5px; /* Reduce gap for vertical stack */
text-align: left; /* Align text left */
width: 100%; /* Ensure it takes width */
margin-top: 0; /* Reduce space when info block wraps */
}
.info-item {
flex-direction: row; /* Put label and content side-by-side */
align-items: baseline; /* Align baseline */
gap: 6px; /* Gap between label and content */
min-width: 0; /* Remove min-width */
width: 100%; /* Take full width */
}
.info-label {
margin-bottom: 0; /* Remove bottom margin */
text-align: left;
flex-shrink: 0; /* Prevent label shrinking */
min-width: 80px; /* Give label fixed width */
text-transform: none; /* Optional: remove uppercase */
letter-spacing: 0; /* Optional: remove spacing */
}
.info-content { text-align: left; }
.h1-info a i { font-size: 1.5em; } /* Slightly smaller icon */
/* Adjust inner boxes */
.add-element-box,
.optical-path-box {
padding: 8px;
}
.add-element-controls {
flex-direction: column; /* Stack add controls vertically */
align-items: stretch; /* Make select/button full width */
gap: 5px;
}
.optical-path-header {
margin-bottom: 8px;
/* Keep flex-wrap: wrap */
}
.table-actions { /* Ensure buttons take full width if header wraps */
flex-basis: 100%;
justify-content: flex-start; /* Align buttons left */
}
#elements-table th, #elements-table td {
padding: 3px 4px; /* Further reduce table padding */
font-size: 0.8em; /* Further reduce table font */
}
td input[type="number"], td input[type="text"] {
max-width: 50px; /* Reduce input max width */
}
.ellipse-cell svg { width: 40px; height: 40px; } /* Smaller ellipse */
#canvas-container { height: 300px; } /* Reduce canvas height */
}
/* --- END OF ADDED STYLES FOR H1 INFO BLOCK --- */
/* END OF FILE style.css */