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

Update style/defaults/style.css

Browse files
Files changed (1) hide show
  1. style/defaults/style.css +67 -255
style/defaults/style.css CHANGED
@@ -1,175 +1,89 @@
1
- /* style.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
- pointer-events: auto !important;
13
- z-index: 10 !important;
14
  }
15
 
16
- /* When in fake fullscreen mode (iOS fallback) */
17
- .ply-widget-container.fake-fullscreen {
 
 
 
 
18
  position: fixed !important;
19
- top: 0 !important;
20
- left: 0 !important;
21
  width: 100vw !important;
22
  height: 100vh !important;
23
- padding-bottom: 0 !important;
24
  z-index: 9999 !important;
25
- background-color: black;
26
  border-radius: 0 !important;
27
  margin: 0 !important;
28
- max-width: 100vw !important;
29
- max-height: 100vh !important;
30
  box-sizing: border-box;
31
- overflow: hidden;
32
- }
33
-
34
- /* For native fullscreen - ensure no aspect ratio padding */
35
- .ply-widget-container:fullscreen {
36
- width: 100vw !important;
37
- height: 100vh !important;
38
- padding-bottom: 0 !important;
39
- border-radius: 0 !important;
40
- background-color: black;
41
- }
42
- .ply-widget-container:-webkit-full-screen,
43
- .ply-widget-container:-moz-full-screen,
44
- .ply-widget-container:-ms-fullscreen {
45
- width: 100vw !important;
46
- height: 100vh !important;
47
- padding-bottom: 0 !important;
48
- border-radius: 0 !important;
49
- background-color: black;
50
  }
51
 
52
- /* Viewer Container styling */
53
  .viewer-container {
54
- display: none;
55
  position: absolute;
56
  top: 0; left: 0; right: 0; bottom: 0;
57
  width: 100%;
58
  height: 100%;
59
- background: black;
60
  border: 1px solid #474558;
61
  border-radius: 10px;
62
  overflow: hidden;
63
  box-sizing: border-box;
64
- transition: all 0.3s ease;
65
  min-height: 100%;
66
- object-fit: contain;
67
  pointer-events: auto !important;
68
- z-index: 100 !important;
69
  }
70
 
71
- /* When parent container is fullscreen, adjust viewer container */
72
- .fake-fullscreen .viewer-container,
73
- :fullscreen .viewer-container,
74
- :-webkit-full-screen .viewer-container,
75
- :-moz-full-screen .viewer-container,
76
- :-ms-fullscreen .viewer-container {
77
  border-radius: 0;
78
  border: none;
79
  width: 100%;
80
  height: 100%;
81
  }
82
 
83
- /* Canvas fills the viewer container */
84
- .ply-canvas {
85
  width: 100%;
86
  height: 100%;
87
  display: block;
88
- background-color: transparent;
89
  z-index: 1;
90
  position: absolute;
91
  top: 0; left: 0; right: 0; bottom: 0;
92
  pointer-events: auto !important;
93
  }
94
 
95
- /* Progress dialog styling (centered) */
96
  .progress-dialog {
97
  position: absolute;
98
  top: 50%; left: 50%;
99
  transform: translate(-50%, -50%);
100
- border: none;
101
  background: rgba(0,0,0,0.7);
102
  padding: 20px;
103
  border-radius: 5px;
104
  z-index: 1000;
105
  display: none;
106
- color: white;
107
- }
108
-
109
- /* Progress bar styling */
110
- progress {
111
- width: 250px;
112
- height: 15px;
113
- appearance: none;
114
- border: none;
115
- border-radius: 10px;
116
- overflow: hidden;
117
- }
118
- progress::-webkit-progress-bar {
119
- background-color: #333;
120
- border-radius: 10px;
121
- }
122
- progress::-webkit-progress-value {
123
- background-color: #4682B4;
124
- border-radius: 10px;
125
- }
126
- progress::-moz-progress-bar {
127
- background-color: #4682B4;
128
- border-radius: 10px;
129
- }
130
-
131
- /* Menu (instructions) content styling */
132
- .menu-content {
133
- display: none;
134
- position: absolute;
135
- top: 50%; left: 50%;
136
- transform: translate(-50%, -50%);
137
- background: rgba(242,240,239,0.9);
138
- color: #545454;
139
- border: 1px solid #ddd;
140
- border-radius: 10px;
141
- padding: 18px 24px;
142
- font-size: 15px;
143
- line-height: 1.4;
144
- box-shadow: none;
145
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
146
- z-index: 1010;
147
- pointer-events: auto !important;
148
- }
149
-
150
- /* Help-close button inside instructions panel */
151
- .help-close {
152
- position: absolute;
153
- top: 8px;
154
- right: 8px;
155
- background-color: #B0B0B0;
156
- color: #333;
157
- border: none;
158
- border-radius: 4px;
159
- width: 24px;
160
- height: 24px;
161
- line-height: 24px;
162
- text-align: center;
163
- cursor: pointer;
164
- font-size: 16px;
165
  }
166
 
167
- /* Button styling with improved visibility and spacing tweaks */
168
  .widget-button {
169
  position: absolute;
170
  width: 32px;
171
  height: 32px;
172
- background-color: #F2F0EF;
173
  border: 1px solid #ccc;
174
  border-radius: 8px;
175
  cursor: pointer;
@@ -178,75 +92,56 @@ progress::-moz-progress-bar {
178
  display: flex !important;
179
  align-items: center;
180
  justify-content: center;
181
- transition: background-color 0.2s ease;
182
  z-index: 1000 !important;
183
  opacity: 1 !important;
184
  visibility: visible !important;
185
  margin-right: 8px;
186
  pointer-events: auto !important;
187
  }
188
- .widget-button:hover {
189
- background-color: rgba(242,240,239,0.7);
190
- }
191
 
192
- /* Specific button positions */
193
- .fullscreen-toggle {
194
- top: 12px;
195
- right: 12px;
196
- }
197
- .help-toggle {
198
- top: 12px;
199
- right: 52px;
200
- font-size: 18px;
201
- }
202
- .reset-camera-btn {
203
- top: 12px;
204
- right: 92px;
205
- font-size: 18px;
206
- line-height: normal;
207
- padding: 0;
208
- }
209
- .tooltips-toggle {
210
- top: 12px;
211
- right: 132px;
212
- font-size: 18px;
213
- }
214
 
215
- /* Ensure buttons remain visible in fullscreen */
216
- .fake-fullscreen .widget-button,
217
- :fullscreen .widget-button,
218
- :-webkit-full-screen .widget-button,
219
- :-moz-full-screen .widget-button,
220
- :-ms-fullscreen .widget-button {
221
  z-index: 10000;
222
  }
223
 
224
- /* Tooltip panel styling */
225
- .tooltip-panel {
 
 
 
226
  position: absolute;
227
- top: 50%;
228
- right: 5%;
229
- transform: translate(0%, -50%);
230
  background: rgba(242,240,239,0.97);
231
  color: #545454;
232
  border: 1px solid #ddd;
233
  border-radius: 8px;
234
  padding: 15px 12px 15px 15px;
235
- max-width: 90vw;
236
- max-height: 70vh;
237
  z-index: 20000 !important;
238
  display: none;
239
  flex-direction: column;
240
  align-items: flex-start;
241
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
242
  pointer-events: auto !important;
243
  overflow: auto !important;
244
- box-sizing: border-box;
245
  }
246
 
247
- /* Content wrapper for tooltip, leave room at top for close button */
248
  .tooltip-content {
249
- position: relative;
250
  width: 100%;
251
  box-sizing: border-box;
252
  padding-top: 6px;
@@ -254,13 +149,11 @@ progress::-moz-progress-bar {
254
  max-height: 65vh;
255
  }
256
 
257
- /* Tooltip close button — styled like the main buttons, always in corner */
258
  .tooltip-close {
259
  position: absolute;
260
- top: 10px;
261
- right: 10px;
262
- width: 32px;
263
- height: 32px;
264
  background: #F2F0EF;
265
  color: #545454;
266
  border: 1px solid #ccc;
@@ -277,75 +170,13 @@ progress::-moz-progress-bar {
277
  padding: 0;
278
  transition: background 0.2s;
279
  }
280
- .tooltip-close:hover {
281
- background: #ececec;
282
- }
283
-
284
- /* Tooltip text and image */
285
- .tooltip-text {
286
- margin-bottom: 10px;
287
- font-size: 14px;
288
- line-height: 1.4;
289
- word-break: break-word;
290
- }
291
- .tooltip-image {
292
- max-width: 100%;
293
- height: auto;
294
- border-radius: 4px;
295
- margin-top: 5px;
296
- display: block;
297
- }
298
 
299
- /* Mobile adjustments */
300
- .ply-widget-container.mobile .widget-button {
301
- width: 24px;
302
- height: 24px;
303
- font-size: 12px;
304
- }
305
- .ply-widget-container.mobile .help-toggle {
306
- font-size: 14px;
307
- }
308
- .ply-widget-container.mobile .fullscreen-toggle {
309
- top: 8px;
310
- right: 8px;
311
- }
312
- .ply-widget-container.mobile .help-toggle {
313
- top: 8px;
314
- right: 40px;
315
- }
316
- .ply-widget-container.mobile .reset-camera-btn {
317
- top: 8px;
318
- right: 72px;
319
- }
320
- .ply-widget-container.mobile .tooltips-toggle {
321
- top: 8px;
322
- right: 104px;
323
- }
324
- .ply-widget-container.mobile .tooltip-panel {
325
- max-width: 98vw;
326
- max-height: 54vh;
327
- padding: 8px 5px 12px 8px;
328
- }
329
-
330
- /* PlayCanvas compatibility */
331
- #application-canvas {
332
- width: 100%;
333
- height: 100%;
334
- display: block;
335
- }
336
- html, body {
337
- margin: 0;
338
- padding: 0;
339
- height: 100%;
340
- }
341
 
342
- /* Error message styling */
343
- .progress-dialog p {
344
- margin: 0;
345
- padding: 5px;
346
- }
347
-
348
- /* Instructions panel fit on phones */
349
  @media (max-width: 600px) {
350
  .menu-content {
351
  width: 85vw;
@@ -354,13 +185,9 @@ html, body {
354
  padding: 40px 18px 14px;
355
  font-size: 14px;
356
  }
357
- .menu-content .help-close {
358
- top: 6px;
359
- right: 6px;
360
- }
361
  .tooltip-panel {
362
- max-width: 98vw;
363
- max-height: 54vh;
364
  padding: 8px 5px 12px 8px;
365
  }
366
  .tooltip-close {
@@ -372,34 +199,19 @@ html, body {
372
  }
373
  }
374
 
375
- /* Misc pointer events enforcement for all key UI overlays */
376
- .ply-widget-container,
377
- .viewer-container,
378
- .ply-canvas,
379
- .tooltip-panel,
380
- .widget-button,
381
- .menu-content {
382
  pointer-events: auto !important;
383
  z-index: 9999 !important;
384
  }
385
-
386
- .ply-widget-container,
387
- .ply-widget-container * {
388
  pointer-events: auto !important;
389
  z-index: 2147483647 !important;
390
  }
391
-
392
- .sqs-block-content * {
393
- pointer-events: auto !important;
394
- }
395
- .ply-widget-container,
396
- .viewer-container,
397
- .ply-canvas,
398
- #application-canvas,
399
- canvas {
400
  pointer-events: auto !important;
401
  touch-action: auto !important;
402
  z-index: 100 !important;
403
  }
404
-
405
-
 
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
  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;
 
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;
 
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;
 
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 {
 
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
  }