File size: 7,088 Bytes
2004aa8
deeb85c
 
2004aa8
deeb85c
 
0b9e56f
 
 
deeb85c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2004aa8
 
 
 
0b9e56f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2004aa8
0b9e56f
deeb85c
 
 
0b9e56f
deeb85c
0b9e56f
 
2004aa8
a4231fd
deeb85c
 
2004aa8
 
a4231fd
2004aa8
deeb85c
2004aa8
a4231fd
deeb85c
 
2004aa8
 
 
 
 
 
 
a4231fd
 
 
2004aa8
 
 
 
 
deeb85c
 
 
 
 
 
2004aa8
deeb85c
2004aa8
deeb85c
 
 
2004aa8
deeb85c
2004aa8
deeb85c
 
2004aa8
 
5d57a51
deeb85c
 
 
2004aa8
 
 
deeb85c
 
2004aa8
deeb85c
2004aa8
 
deeb85c
 
 
2004aa8
 
 
 
 
 
 
 
 
deeb85c
 
 
 
 
 
 
 
 
2004aa8
deeb85c
 
2004aa8
 
deeb85c
 
2004aa8
 
deeb85c
2004aa8
deeb85c
 
2004aa8
 
 
deeb85c
 
2004aa8
 
 
deeb85c
 
2004aa8
 
 
deeb85c
 
0b9e56f
 
 
 
 
 
 
 
 
 
2004aa8
 
 
 
 
 
 
 
 
0b9e56f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2004aa8
 
 
 
deeb85c
2004aa8
 
 
deeb85c
 
 
2004aa8
0b9e56f
deeb85c
0b9e56f
 
 
 
 
deeb85c
0b9e56f
 
 
deeb85c
 
 
 
 
2004aa8
 
 
 
 
 
 
 
 
 
deeb85c
 
2004aa8
0b9e56f
 
 
 
 
 
 
 
 
 
2004aa8
 
 
 
 
 
 
 
 
 
 
 
 
deeb85c
 
2004aa8
 
deeb85c
 
2004aa8
 
 
 
 
 
 
 
 
 
 
 
deeb85c
2004aa8
 
 
 
 
 
 
deeb85c
2004aa8
deeb85c
 
2004aa8
 
 
0b9e56f
a4231fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #343a40;
    color: white;
    width: 100%;
    padding: 20px 0;
}

#logo {
    height: 50px;
    margin-right: 20px;
}

h1 {
    margin: 0;
}

.content-wrapper {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin-top: 30px;
    padding: 0 20px;
    box-sizing: border-box;
}

.nav-section {
    flex: 0 0 200px; /* Fixed width for the navigation */
    margin-right: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Spacing between buttons */
}

.calculator-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    width: 33%;
}

#cable-container {
    display: flex;
    gap: 10px; /* Reduce gap between tiles */
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
    flex-wrap: nowrap;  /* No wrapping */
}

.cable-group {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    position: relative;
    flex: 1 1 40%; /* Each cable group takes up 30% of the container */
    min-width: 280px; /* Optional minimum width */
    max-width: 40%; /* Ensure the maximum width is constrained */
}

.cable-group h2 {
    text-align: center;
    margin-top: 0;
    color: #343a40;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
}

.form-row label {
    flex: 0 0 40%;  /* Label takes up 40% of the row */
    font-weight: bold;
    color: #343a40;
}

.form-row input,
.form-row select {
    flex: 1; 
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* Dropdown styling */
.form-row select {
    appearance: none;
    background-color: #f8f9fa;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.btn-group, .form-group {
    display: flex;
    justify-content: space-between;
    width: 100%; /* Ensure buttons are aligned in one row */
}

.btn {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    color: white;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    opacity: 0.9;
}

.btn-add,
.btn-add-cable {
    background-color: #007bff;
    margin-right: 10px;
}

.btn-add-cable:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.btn-calculate {
    background-color: #6c757d; /* Disabled state */
    cursor: not-allowed;
}

.btn-calculate.enabled {
    background-color: #28a745; /* Enabled state */
    cursor: pointer;
}

.btn-cg-calculate {
    background-color: #6c757d; /* Disabled state */
    cursor: not-allowed;
}

.btn-cg-calculate.enabled {
    background-color: #28a745; /* Enabled state */
    cursor: pointer;
}

.btn-remove-cable {
    background-color: #dc3545;
    padding: 3px 8px;
    font-size: 12px;
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.btn-nav {
    background-color: #007bff;
    color: white;
    padding: 10px 16px;
    font-size: 14px;
    text-align: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    cursor: pointer;
    border: none; /* Remove default button border */
    display: block;
    width: 100%; /* Full width within the nav section */
    text-align: center;
    width: 150px;
    margin-top: 20px;
}

.btn-nav:hover {
    background-color: #0056b3;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
}

.btn-back {
    background-color: #007bff;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    text-align: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    cursor: pointer;
    border: none;
    display: block;
    text-decoration: none;
    text-align: center;
    width: 150px;
    margin-top: 20px;
}

.btn-back:hover {
    background-color: #0056b3;
}

/* Media Queries for Responsiveness */
@media (max-width: 992px) {
    #cable-container .cable-group {
        flex: 1 1 48%; /* Two cables per row on medium screens */
    }

    #cable-container .cable-group:nth-child(3) {
        flex: 1 1 100%; /* Stack the third cable below on medium screens */
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .nav-section {
        flex: 0 0 100%;
        margin-bottom: 20px;
    }

    #cable-container .cable-group {
        flex: 1 1 100%; /* Full width for all cables on small screens */
    }

    .btn-add-cable,
    .btn-calculate {
        width: 100%;
        margin-right: 0;
    }

    .action-buttons {
        flex-direction: column;
    }
}

.btn-save {
    background-color: #007bff;
}

.btn-delete {
    background-color: #dc3545;
}

/* Adjusted Specific Styles for the Edit Cables Page */
.edit-cables-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px auto;
    width: 100%;
    max-width: 500px; /* Adjusted width to make it more compact */
    padding: 20px;
    box-sizing: border-box;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.add-cable-section, .existing-cables-section {
    width: 100%;
    margin-bottom: 30px;
}

.add-cable-section h2, .existing-cables-section h2 {
    margin-bottom: 20px;
    color: #343a40;
}

.result-display {
    width: 100%; /* Fixed width to ensure consistency */
    font-size: 20px;
    color: #28a745;
    text-align: center;
    background-color: white;
    min-height: 300px; /* Ensures the container has a minimum height */
}


/* CG */
.result-visual-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-top: 20px;
    gap: 20px;
}

.result-display-cg {

    margin-top: 8px;
    width: 100%; /* Fixed width to ensure consistency */
    font-size: 20px;
    color: #28a745;
    text-align: right;
    background-color: white;
    min-height: 100%; /* Ensures the container has a minimum height */
}

.fixture-visual {
    width: 100%; /* Fixed width to ensure consistency */
    text-align: left;
    margin-right: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fixture-visual img {
    width: 75%;
}

.red-text {
    color: red;
}

.orange-text {
    color: orange;
}