bilca commited on
Commit
47dae7f
·
verified ·
1 Parent(s): 26c341a

Update style.css

Browse files
Files changed (1) hide show
  1. style.css +333 -19
style.css CHANGED
@@ -1,28 +1,342 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
 
 
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
28
  }
 
 
 
 
 
 
1
+ /* viewer.css - Modified to properly restore aspect ratio when exiting fullscreen */
2
+
3
+ /* Widget container styling */
4
+ .ply-widget-container {
5
+ position: relative;
6
+ width: 100%;
7
+ height: 0; /* Important: Height 0 allows padding-bottom to control size */
8
+ /* padding-bottom is set dynamically inline for aspect ratio */
9
+ background-color: black;
10
+ transition: all 0.3s ease; /* Smooth transition when toggling fullscreen */
11
+ box-sizing: border-box; /* Ensure padding is included in the height calculation */
12
+ overflow: hidden; /* Prevents content overflow */
13
+ }
14
+
15
+ /* When in fake fullscreen mode (iOS fallback) */
16
+ .ply-widget-container.fake-fullscreen {
17
+ position: fixed !important;
18
+ top: 0 !important;
19
+ left: 0 !important;
20
+ width: 100vw !important;
21
+ height: 100vh !important;
22
+ padding-bottom: 0 !important; /* Remove aspect ratio padding in fullscreen */
23
+ z-index: 9999 !important;
24
+ background-color: black;
25
+ border-radius: 0 !important;
26
+ margin: 0 !important;
27
+ max-width: 100vw !important;
28
+ max-height: 100vh !important;
29
+ box-sizing: border-box;
30
+ overflow: hidden;
31
+ }
32
+
33
+ /* For native fullscreen - ensure no aspect ratio padding */
34
+ .ply-widget-container:fullscreen {
35
+ width: 100vw !important;
36
+ height: 100vh !important;
37
+ padding-bottom: 0 !important;
38
+ border-radius: 0 !important;
39
+ background-color: black;
40
+ }
41
+
42
+ /* Vendor prefixes for fullscreen */
43
+ .ply-widget-container:-webkit-full-screen {
44
+ width: 100vw !important;
45
+ height: 100vh !important;
46
+ padding-bottom: 0 !important;
47
+ border-radius: 0 !important;
48
+ background-color: black;
49
+ }
50
+
51
+ .ply-widget-container:-moz-full-screen {
52
+ width: 100vw !important;
53
+ height: 100vh !important;
54
+ padding-bottom: 0 !important;
55
+ border-radius: 0 !important;
56
+ background-color: black;
57
+ }
58
+
59
+ .ply-widget-container:-ms-fullscreen {
60
+ width: 100vw !important;
61
+ height: 100vh !important;
62
+ padding-bottom: 0 !important;
63
+ border-radius: 0 !important;
64
+ background-color: black;
65
+ }
66
+
67
+ /* Viewer Container styling */
68
+ .viewer-container {
69
+ display: none;
70
+ position: absolute;
71
+ top: 0;
72
+ left: 0;
73
+ right: 0;
74
+ bottom: 0;
75
+ width: 100%;
76
+ height: 100%;
77
+ background: black;
78
+ border: 1px solid #474558;
79
+ border-radius: 10px;
80
+ overflow: hidden;
81
+ box-sizing: border-box;
82
+ transition: all 0.3s ease;
83
+ /* These ensure proper rendering after fullscreen exit */
84
+ min-height: 100%;
85
+ object-fit: contain;
86
+ }
87
+
88
+ /* When parent container is fullscreen, adjust viewer container */
89
+ .fake-fullscreen .viewer-container,
90
+ :fullscreen .viewer-container,
91
+ :-webkit-full-screen .viewer-container,
92
+ :-moz-full-screen .viewer-container,
93
+ :-ms-fullscreen .viewer-container {
94
+ border-radius: 0;
95
+ border: none;
96
+ width: 100%;
97
+ height: 100%;
98
+ }
99
+
100
+ /* GIF Preview styling */
101
+ .gif-preview-container {
102
+ position: absolute;
103
+ top: 0;
104
+ left: 0;
105
+ width: 100%;
106
+ height: 100%;
107
+ border: 1px solid #474558;
108
+ border-radius: 10px;
109
+ overflow: hidden;
110
+ cursor: pointer;
111
+ background-color: black;
112
+ }
113
+
114
+ .gif-preview-container img {
115
+ width: 100%;
116
+ height: 100%;
117
+ object-fit: cover;
118
+ }
119
+
120
+ /* Canvas fills the viewer container */
121
+ .ply-canvas {
122
+ width: 100%;
123
+ height: 100%;
124
+ display: block;
125
+ background-color: transparent; /* Transparent background for PlayCanvas rendering */
126
+ z-index: 1; /* Lower z-index to keep it behind buttons */
127
+ position: absolute; /* Ensure canvas fills the entire container */
128
+ top: 0;
129
+ left: 0;
130
+ right: 0;
131
+ bottom: 0;
132
+ }
133
+
134
+ /* Make sure canvas fills the entire space in fullscreen */
135
+ .fake-fullscreen .ply-canvas,
136
+ :fullscreen .ply-canvas,
137
+ :-webkit-full-screen .ply-canvas,
138
+ :-moz-full-screen .ply-canvas,
139
+ :-ms-fullscreen .ply-canvas {
140
+ width: 100vw;
141
+ height: 100vh;
142
+ }
143
+
144
+ /* Progress dialog styling (centered) */
145
+ .progress-dialog {
146
+ position: absolute;
147
+ top: 50%;
148
+ left: 50%;
149
+ transform: translate(-50%, -50%);
150
+ border: none;
151
+ background: rgba(0,0,0,0.7);
152
+ padding: 20px;
153
+ border-radius: 5px;
154
+ z-index: 1000;
155
+ display: none;
156
+ color: white;
157
+ }
158
+
159
+ /* Progress bar styling */
160
+ progress {
161
+ width: 250px;
162
+ height: 15px;
163
+ appearance: none;
164
+ border: none;
165
+ border-radius: 10px;
166
+ overflow: hidden;
167
+ }
168
+
169
+ progress::-webkit-progress-bar {
170
+ background-color: #333;
171
+ border-radius: 10px;
172
+ }
173
+
174
+ progress::-webkit-progress-value {
175
+ background-color: #4682B4;
176
+ border-radius: 10px;
177
+ }
178
+
179
+ progress::-moz-progress-bar {
180
+ background-color: #4682B4;
181
+ border-radius: 10px;
182
+ }
183
+
184
+ /* Menu (instructions) content styling */
185
+ .menu-content {
186
+ display: none;
187
+ position: absolute;
188
+ top: 70px;
189
+ right: 15px;
190
+ background: rgba(0, 0, 0, 0.8);
191
+ border: 1px solid #474558;
192
+ border-radius: 5px;
193
+ padding: 10px;
194
+ font-size: 15px;
195
+ line-height: 1.4;
196
+ color: white;
197
+ z-index: 1010; /* Higher than buttons to appear on top when shown */
198
+ }
199
+
200
+ /* Button styling with improved visibility */
201
+ .widget-button {
202
+ position: absolute;
203
+ width: 45px;
204
+ height: 45px;
205
+ background-color: rgba(0, 0, 0, 0.6);
206
+ border: 1px solid #474558;
207
+ border-radius: 50%;
208
+ cursor: pointer;
209
+ font-size: 14px;
210
+ color: white;
211
+ display: flex !important; /* Always display flex */
212
+ align-items: center;
213
+ justify-content: center;
214
+ transition: background-color 0.2s ease;
215
+ z-index: 1000; /* Higher z-index to ensure visibility */
216
+ opacity: 1 !important; /* Force opacity to ensure visibility */
217
+ visibility: visible !important; /* Force visibility */
218
+ }
219
+
220
+ .widget-button:hover {
221
+ background-color: rgba(70, 130, 180, 0.5);
222
+ }
223
+
224
+ /* Make sure buttons remain visible in fullscreen modes */
225
+ .fake-fullscreen .widget-button,
226
+ :fullscreen .widget-button,
227
+ :-webkit-full-screen .widget-button,
228
+ :-moz-full-screen .widget-button,
229
+ :-ms-fullscreen .widget-button {
230
+ z-index: 10000; /* Extra high z-index in fullscreen mode */
231
+ }
232
+
233
+ /* Specific button positions */
234
+ .close-btn {
235
+ top: 17px;
236
+ left: 15px;
237
+ font-family: sans-serif;
238
+ }
239
+
240
+ .fullscreen-toggle {
241
+ top: 17px;
242
+ right: 15px;
243
+ }
244
+
245
+ .help-toggle {
246
+ top: 17px;
247
+ right: 70px;
248
+ font-size: 22px;
249
+ }
250
+
251
+ .reset-camera-btn {
252
+ top: 17px;
253
+ right: 123px;
254
+ font-size: 22px;
255
+ line-height: normal;
256
+ padding: 0;
257
+ }
258
+
259
+ /* Adjust the reset icon position */
260
+ .reset-icon {
261
+ display: inline-block;
262
+ transform: translateY(-3px);
263
+ }
264
+
265
+ /* --- Mobile adjustments: when the widget container has the "mobile" class --- */
266
+ .ply-widget-container.mobile .widget-button {
267
+ width: 30px; /* 45px * 2/3 */
268
+ height: 30px; /* 45px * 2/3 */
269
+ font-size: 10px; /* 14px * approx 0.67 */
270
+ }
271
+
272
+ .ply-widget-container.mobile .help-toggle {
273
+ font-size: 15px; /* 22px * approx 0.67 */
274
+ }
275
+
276
+ /* Adjust button positions for mobile */
277
+ .ply-widget-container.mobile .close-btn {
278
+ top: 11px; /* 17px * approx 0.67 */
279
+ left: 10px; /* 15px * approx 0.67 */
280
+ }
281
+
282
+ .ply-widget-container.mobile .fullscreen-toggle {
283
+ top: 11px;
284
+ right: 10px;
285
+ }
286
+
287
+ .ply-widget-container.mobile .help-toggle {
288
+ top: 11px;
289
+ right: 47px; /* 70px * approx 0.67 */
290
+ }
291
+
292
+ .ply-widget-container.mobile .reset-camera-btn {
293
+ top: 11px;
294
+ right: 82px; /* 123px * approx 0.67 */
295
  }
296
 
297
+ /* Additional styles for PlayCanvas compatibility */
298
+ #application-canvas {
299
+ width: 100%;
300
+ height: 100%;
301
+ display: block;
302
  }
303
 
304
+ html, body {
305
+ margin: 0;
306
+ padding: 0;
307
+ height: 100%;
 
308
  }
309
 
310
+ /* Additional fullscreen styles for mobile browsers */
311
+ @media screen and (max-width: 768px) {
312
+ .ply-widget-container.fake-fullscreen {
313
+ position: fixed !important;
314
+ width: 100% !important;
315
+ height: 100% !important;
316
+ top: 0 !important;
317
+ left: 0 !important;
318
+ right: 0 !important;
319
+ bottom: 0 !important;
320
+ z-index: 9999 !important;
321
+ padding-bottom: 0 !important; /* Make sure padding is removed on mobile too */
322
+ }
323
+
324
+ /* Ensure buttons remain visible on mobile */
325
+ .ply-widget-container.mobile.fake-fullscreen .widget-button {
326
+ display: flex !important;
327
+ visibility: visible !important;
328
+ opacity: 1 !important;
329
+ z-index: 10000 !important;
330
+ }
331
  }
332
 
333
+ /* Error message styling */
334
+ .progress-dialog p {
335
+ margin: 0;
336
+ padding: 5px;
337
  }
338
+
339
+ /* Make sure fluid engine elements don't interfere with pointer events */
340
+ .viewer-container .fluid-engine {
341
+ pointer-events: none !important;
342
+ }