MikaFil commited on
Commit
8d7ae71
·
verified ·
1 Parent(s): 515d9fc

Update style/defaults/style.css

Browse files
Files changed (1) hide show
  1. style/defaults/style.css +248 -112
style/defaults/style.css CHANGED
@@ -1,89 +1,155 @@
1
- /* Core Layout */
 
 
2
  .ply-widget-container {
3
  position: relative;
4
  width: 100%;
5
  height: 0;
6
- background: #fff;
 
 
7
  overflow: hidden;
8
- z-index: 10;
9
  }
10
-
11
- /* Fullscreen tweaks */
12
- .ply-widget-container.fake-fullscreen,
13
- .ply-widget-container:fullscreen,
14
- .ply-widget-container:-webkit-full-screen,
15
- .ply-widget-container:-moz-full-screen,
16
- .ply-widget-container:-ms-fullscreen {
17
  position: fixed !important;
18
- top: 0; left: 0;
 
19
  width: 100vw !important;
20
  height: 100vh !important;
21
- background: #000;
22
  z-index: 9999 !important;
 
23
  border-radius: 0 !important;
24
  margin: 0 !important;
 
 
25
  box-sizing: border-box;
 
 
 
 
 
 
 
 
 
 
 
26
  }
27
-
28
- /* Viewer Container */
29
  .viewer-container {
 
30
  position: absolute;
31
  top: 0; left: 0; right: 0; bottom: 0;
32
- width: 100%;
33
- height: 100%;
34
- background: #000;
35
  border: 1px solid #474558;
36
  border-radius: 10px;
37
  overflow: hidden;
38
  box-sizing: border-box;
 
39
  min-height: 100%;
40
- z-index: 100;
41
- pointer-events: auto !important;
42
  }
43
-
44
- /* Ensure no border radius in fullscreen */
45
- .ply-widget-container.fake-fullscreen .viewer-container,
46
- .ply-widget-container:fullscreen .viewer-container,
47
- .ply-widget-container:-webkit-full-screen .viewer-container,
48
- .ply-widget-container:-moz-full-screen .viewer-container,
49
- .ply-widget-container:-ms-fullscreen .viewer-container {
50
  border-radius: 0;
51
  border: none;
52
  width: 100%;
53
  height: 100%;
54
  }
55
-
56
- /* Canvas */
57
- .ply-canvas, #application-canvas {
58
  width: 100%;
59
  height: 100%;
60
  display: block;
61
- background: transparent;
62
  z-index: 1;
63
  position: absolute;
64
  top: 0; left: 0; right: 0; bottom: 0;
65
- pointer-events: auto !important;
66
  }
67
-
68
- /* Progress Dialog */
 
 
 
 
 
 
69
  .progress-dialog {
70
  position: absolute;
71
  top: 50%; left: 50%;
72
  transform: translate(-50%, -50%);
 
73
  background: rgba(0,0,0,0.7);
74
  padding: 20px;
75
  border-radius: 5px;
76
  z-index: 1000;
77
  display: none;
78
- color: #fff;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
80
-
81
- /* Widget Buttons */
82
  .widget-button {
83
  position: absolute;
84
  width: 32px;
85
  height: 32px;
86
- background: #F2F0EF;
87
  border: 1px solid #ccc;
88
  border-radius: 8px;
89
  cursor: pointer;
@@ -92,126 +158,196 @@
92
  display: flex !important;
93
  align-items: center;
94
  justify-content: center;
95
- transition: background 0.2s;
96
- z-index: 1000 !important;
97
  opacity: 1 !important;
98
  visibility: visible !important;
99
  margin-right: 8px;
100
- pointer-events: auto !important;
101
  }
102
- .widget-button:hover { background: rgba(242,240,239,0.7); }
103
-
104
  .fullscreen-toggle { top: 12px; right: 12px; }
105
- .help-toggle { top: 12px; right: 52px; font-size: 18px; }
106
- .reset-camera-btn { top: 12px; right: 92px; font-size: 18px; }
107
- .tooltips-toggle { top: 12px; right: 132px; font-size: 18px; }
 
 
 
 
 
108
 
109
- /* Make buttons always visible in fullscreen */
110
- .ply-widget-container.fake-fullscreen .widget-button,
111
- .ply-widget-container:fullscreen .widget-button,
112
- .ply-widget-container:-webkit-full-screen .widget-button,
113
- .ply-widget-container:-moz-full-screen .widget-button,
114
- .ply-widget-container:-ms-fullscreen .widget-button {
115
- z-index: 10000;
116
- }
117
 
118
- /* Tooltip Panel - CLAMPED TO VIEWER */
119
- .viewer-container {
120
- position: relative; /* for tooltip absolute positioning */
121
- }
122
- .viewer-container .tooltip-panel {
123
  position: absolute;
124
- top: 50%; right: 5%;
 
125
  transform: translate(0, -50%);
126
  background: rgba(242,240,239,0.97);
127
  color: #545454;
128
  border: 1px solid #ddd;
129
- border-radius: 8px;
130
- padding: 15px 12px 15px 15px;
131
- max-width: 96%; /* Never exceed viewer width */
132
- max-height: 94%; /* Never exceed viewer height */
133
- z-index: 20000 !important;
 
 
 
134
  display: none;
135
  flex-direction: column;
136
  align-items: flex-start;
 
 
137
  box-sizing: border-box;
138
- pointer-events: auto !important;
139
- overflow: auto !important;
140
- font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
141
  }
142
 
143
- /* Tooltip Content */
144
  .tooltip-content {
145
  width: 100%;
 
 
146
  box-sizing: border-box;
147
- padding-top: 6px;
148
- overflow: auto;
149
- max-height: 65vh;
 
 
150
  }
151
 
152
- /* Tooltip Close Button */
153
  .tooltip-close {
154
  position: absolute;
155
- top: 10px; right: 10px;
156
- width: 32px; height: 32px;
 
 
157
  background: #F2F0EF;
158
- color: #545454;
159
  border: 1px solid #ccc;
160
  border-radius: 8px;
 
 
161
  display: flex;
162
  align-items: center;
163
  justify-content: center;
164
- font-size: 18px;
165
  cursor: pointer;
166
- z-index: 10001;
 
167
  box-sizing: border-box;
168
- pointer-events: auto;
169
- font-weight: bold;
170
  padding: 0;
171
- transition: background 0.2s;
172
  }
173
- .tooltip-close:hover { background: #ececec; }
 
 
 
 
174
 
175
- /* Tooltip Text/Image */
176
- .tooltip-text { margin-bottom: 10px; font-size: 14px; line-height: 1.4; word-break: break-word; }
177
- .tooltip-image { max-width: 100%; height: auto; border-radius: 4px; margin-top: 5px; display: block; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
 
179
- /* Responsive Mobile Tweaks */
180
  @media (max-width: 600px) {
181
- .menu-content {
182
- width: 85vw;
 
 
 
 
 
 
 
183
  max-height: 55vh;
184
- overflow-y: auto;
185
- padding: 40px 18px 14px;
186
- font-size: 14px;
187
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  .tooltip-panel {
189
- max-width: 98vw !important; /* Still never overflow screen on mobile */
190
- max-height: 54vh !important;
191
- padding: 8px 5px 12px 8px;
 
 
 
 
 
 
 
 
 
 
 
192
  }
193
  .tooltip-close {
194
- width: 28px;
195
- height: 28px;
196
- top: 4px;
197
- right: 4px;
198
- font-size: 16px;
 
 
 
199
  }
200
  }
201
 
202
- /* Pointer-events and z-index for overlays */
203
- .ply-widget-container, .viewer-container, .ply-canvas, .tooltip-panel,
204
- .widget-button, .menu-content {
205
- pointer-events: auto !important;
206
- z-index: 9999 !important;
207
- }
208
- .ply-widget-container, .ply-widget-container * {
209
- pointer-events: auto !important;
210
- z-index: 2147483647 !important;
211
  }
212
- .sqs-block-content * { pointer-events: auto !important; }
213
- .viewer-container, .ply-canvas, #application-canvas, canvas {
214
- pointer-events: auto !important;
215
- touch-action: auto !important;
216
- z-index: 100 !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  }
 
1
+ /* viewer.css */
2
+
3
+ /* Widget container styling */
4
  .ply-widget-container {
5
  position: relative;
6
  width: 100%;
7
  height: 0;
8
+ background-color: white;
9
+ transition: all 0.3s ease;
10
+ box-sizing: border-box;
11
  overflow: hidden;
 
12
  }
13
+ .ply-widget-container.fake-fullscreen {
 
 
 
 
 
 
14
  position: fixed !important;
15
+ top: 0 !important;
16
+ left: 0 !important;
17
  width: 100vw !important;
18
  height: 100vh !important;
19
+ padding-bottom: 0 !important;
20
  z-index: 9999 !important;
21
+ background-color: black;
22
  border-radius: 0 !important;
23
  margin: 0 !important;
24
+ max-width: 100vw !important;
25
+ max-height: 100vh !important;
26
  box-sizing: border-box;
27
+ overflow: hidden;
28
+ }
29
+ .ply-widget-container:fullscreen,
30
+ .ply-widget-container:-webkit-full-screen,
31
+ .ply-widget-container:-moz-full-screen,
32
+ .ply-widget-container:-ms-fullscreen {
33
+ width: 100vw !important;
34
+ height: 100vh !important;
35
+ padding-bottom: 0 !important;
36
+ border-radius: 0 !important;
37
+ background-color: black;
38
  }
 
 
39
  .viewer-container {
40
+ display: none;
41
  position: absolute;
42
  top: 0; left: 0; right: 0; bottom: 0;
43
+ width: 100%; height: 100%;
44
+ background: black;
 
45
  border: 1px solid #474558;
46
  border-radius: 10px;
47
  overflow: hidden;
48
  box-sizing: border-box;
49
+ transition: all 0.3s ease;
50
  min-height: 100%;
51
+ object-fit: contain;
 
52
  }
53
+ .fake-fullscreen .viewer-container,
54
+ :fullscreen .viewer-container,
55
+ :-webkit-full-screen .viewer-container,
56
+ :-moz-full-screen .viewer-container,
57
+ :-ms-fullscreen .viewer-container {
 
 
58
  border-radius: 0;
59
  border: none;
60
  width: 100%;
61
  height: 100%;
62
  }
63
+ .ply-canvas {
 
 
64
  width: 100%;
65
  height: 100%;
66
  display: block;
67
+ background-color: transparent;
68
  z-index: 1;
69
  position: absolute;
70
  top: 0; left: 0; right: 0; bottom: 0;
 
71
  }
72
+ .fake-fullscreen .ply-canvas,
73
+ :fullscreen .ply-canvas,
74
+ :-webkit-full-screen .ply-canvas,
75
+ :-moz-full-screen .ply-canvas,
76
+ :-ms-fullscreen .ply-canvas {
77
+ width: 100vw;
78
+ height: 100vh;
79
+ }
80
  .progress-dialog {
81
  position: absolute;
82
  top: 50%; left: 50%;
83
  transform: translate(-50%, -50%);
84
+ border: none;
85
  background: rgba(0,0,0,0.7);
86
  padding: 20px;
87
  border-radius: 5px;
88
  z-index: 1000;
89
  display: none;
90
+ color: white;
91
+ }
92
+ progress {
93
+ width: 250px;
94
+ height: 15px;
95
+ appearance: none;
96
+ border: none;
97
+ border-radius: 10px;
98
+ overflow: hidden;
99
+ }
100
+ progress::-webkit-progress-bar {
101
+ background-color: #333;
102
+ border-radius: 10px;
103
+ }
104
+ progress::-webkit-progress-value {
105
+ background-color: #4682B4;
106
+ border-radius: 10px;
107
+ }
108
+ progress::-moz-progress-bar {
109
+ background-color: #4682B4;
110
+ border-radius: 10px;
111
+ }
112
+ /* Menu (instructions) content styling */
113
+ .menu-content {
114
+ display: none;
115
+ position: absolute;
116
+ top: 50%; left: 50%;
117
+ transform: translate(-50%, -50%);
118
+ background: rgba(242,240,239,0.9);
119
+ color: #545454;
120
+ border: 1px solid #ddd;
121
+ border-radius: 10px;
122
+ padding: 18px 24px;
123
+ font-size: 15px;
124
+ line-height: 1.4;
125
+ box-shadow: none;
126
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
127
+ z-index: 1010;
128
+ }
129
+ .help-close {
130
+ position: absolute;
131
+ top: 8px;
132
+ right: 8px;
133
+ background-color: #B0B0B0;
134
+ color: #333;
135
+ border: none;
136
+ border-radius: 4px;
137
+ width: 24px;
138
+ height: 24px;
139
+ line-height: 24px;
140
+ text-align: center;
141
+ cursor: pointer;
142
+ font-size: 16px;
143
+ display: flex;
144
+ align-items: center;
145
+ justify-content: center;
146
+ padding: 0;
147
  }
 
 
148
  .widget-button {
149
  position: absolute;
150
  width: 32px;
151
  height: 32px;
152
+ background-color: #F2F0EF;
153
  border: 1px solid #ccc;
154
  border-radius: 8px;
155
  cursor: pointer;
 
158
  display: flex !important;
159
  align-items: center;
160
  justify-content: center;
161
+ transition: background-color 0.2s ease;
162
+ z-index: 1000;
163
  opacity: 1 !important;
164
  visibility: visible !important;
165
  margin-right: 8px;
 
166
  }
167
+ .widget-button:hover { background-color: rgba(242,240,239,0.7); }
 
168
  .fullscreen-toggle { top: 12px; right: 12px; }
169
+ .help-toggle { top: 12px; right: 52px; font-size: 18px; }
170
+ .reset-camera-btn { top: 12px; right: 92px; font-size: 18px; line-height: normal; padding: 0; }
171
+ .tooltips-toggle { top: 12px; right: 132px; font-size: 18px; }
172
+ .fake-fullscreen .widget-button,
173
+ :fullscreen .widget-button,
174
+ :-webkit-full-screen .widget-button,
175
+ :-moz-full-screen .widget-button,
176
+ :-ms-fullscreen .widget-button { z-index: 10000; }
177
 
178
+ /* --------- TOOLTIP PANEL ----------- */
179
+ /* ...rest of your CSS remains unchanged... */
 
 
 
 
 
 
180
 
181
+ /* --------- TOOLTIP PANEL ----------- */
182
+ .tooltip-panel {
 
 
 
183
  position: absolute;
184
+ top: 50%;
185
+ right: 5%;
186
  transform: translate(0, -50%);
187
  background: rgba(242,240,239,0.97);
188
  color: #545454;
189
  border: 1px solid #ddd;
190
+ border-radius: 6px;
191
+ padding: 20px 20px 16px 16px; /* Extra top/right for button */
192
+ max-width: 340px;
193
+ width: 92vw;
194
+ min-width: 180px;
195
+ min-height: 60px;
196
+ max-height: 90vh;
197
+ z-index: 20000;
198
  display: none;
199
  flex-direction: column;
200
  align-items: flex-start;
201
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
202
+ overflow: auto;
203
  box-sizing: border-box;
204
+ position: absolute;
 
 
205
  }
206
 
207
+ /* Ensure content does not go under close button */
208
  .tooltip-content {
209
  width: 100%;
210
+ min-width: 160px;
211
+ max-width: 100%;
212
  box-sizing: border-box;
213
+ display: flex;
214
+ flex-direction: column;
215
+ align-items: flex-start;
216
+ overflow: hidden;
217
+ margin-top: 0;
218
  }
219
 
220
+ /* CLOSE BUTTON AS SQUARE WITH ROUNDED CORNERS */
221
  .tooltip-close {
222
  position: absolute;
223
+ top: 12px;
224
+ right: 12px;
225
+ width: 32px;
226
+ height: 32px;
227
  background: #F2F0EF;
228
+ color: #333;
229
  border: 1px solid #ccc;
230
  border-radius: 8px;
231
+ font-size: 17px;
232
+ font-weight: bold;
233
  display: flex;
234
  align-items: center;
235
  justify-content: center;
236
+ line-height: 1;
237
  cursor: pointer;
238
+ z-index: 2;
239
+ transition: background 0.18s;
240
  box-sizing: border-box;
 
 
241
  padding: 0;
 
242
  }
243
+ .tooltip-close:hover,
244
+ .tooltip-close:focus {
245
+ background: #e0e0e0;
246
+ outline: none;
247
+ }
248
 
249
+ /* Tooltip text and image */
250
+ .tooltip-text {
251
+ margin-bottom: 10px;
252
+ font-size: 14px;
253
+ line-height: 1.4;
254
+ overflow-wrap: break-word;
255
+ word-break: break-word;
256
+ max-width: 100%;
257
+ }
258
+ .tooltip-image {
259
+ max-width: 100%;
260
+ max-height: 35vh;
261
+ border-radius: 4px;
262
+ margin-top: 5px;
263
+ display: block;
264
+ object-fit: contain;
265
+ box-sizing: border-box;
266
+ }
267
 
268
+ /* --- MOBILE adjustments --- */
269
  @media (max-width: 600px) {
270
+ .tooltip-panel {
271
+ top: auto;
272
+ bottom: 8px;
273
+ right: 3vw;
274
+ left: 3vw;
275
+ transform: none;
276
+ width: auto;
277
+ max-width: 94vw;
278
+ min-width: 0;
279
  max-height: 55vh;
280
+ padding: 16px 10px 12px 10px;
281
+ font-size: 13.5px;
 
282
  }
283
+ .tooltip-close {
284
+ top: 8px;
285
+ right: 8px;
286
+ width: 26px;
287
+ height: 26px;
288
+ font-size: 15px;
289
+ }
290
+ .tooltip-image {
291
+ max-height: 22vh;
292
+ }
293
+ }
294
+
295
+
296
+ /* --- Mobile adjustments --- */
297
+ @media (max-width: 600px) {
298
  .tooltip-panel {
299
+ top: auto;
300
+ bottom: 8px;
301
+ right: 3vw;
302
+ left: 3vw;
303
+ transform: none;
304
+ width: auto;
305
+ max-width: 94vw;
306
+ min-width: 0;
307
+ max-height: 55vh;
308
+ padding: 28px 14px 12px 12px; /* extra for top, right */
309
+ font-size: 13.5px;
310
+ }
311
+ .tooltip-content {
312
+ min-width: 0;
313
  }
314
  .tooltip-close {
315
+ top: 6px;
316
+ right: 6px;
317
+ width: 26px;
318
+ height: 26px;
319
+ font-size: 15px;
320
+ }
321
+ .tooltip-image {
322
+ max-height: 22vh;
323
  }
324
  }
325
 
326
+ .ply-widget-container.mobile .widget-button {
327
+ width: 24px;
328
+ height: 24px;
329
+ font-size: 12px;
 
 
 
 
 
330
  }
331
+ .ply-widget-container.mobile .help-toggle { font-size: 14px; }
332
+ .ply-widget-container.mobile .fullscreen-toggle { top: 8px; right: 8px; }
333
+ .ply-widget-container.mobile .help-toggle { top: 8px; right: 40px; }
334
+ .ply-widget-container.mobile .reset-camera-btn { top: 8px; right: 72px; }
335
+ .ply-widget-container.mobile .tooltips-toggle { top: 8px; right: 104px; }
336
+
337
+ #application-canvas { width: 100%; height: 100%; display: block; }
338
+ html, body { margin: 0; padding: 0; height: 100%; }
339
+ .progress-dialog p { margin: 0; padding: 5px; }
340
+
341
+ @media (max-width: 600px) {
342
+ .menu-content {
343
+ width: 85vw;
344
+ max-height: 55vh;
345
+ overflow-y: auto;
346
+ padding: 40px 18px 14px;
347
+ font-size: 14px;
348
+ }
349
+ .menu-content .help-close {
350
+ top: 6px;
351
+ right: 6px;
352
+ }
353
  }