MikaFil commited on
Commit
35f2326
·
verified ·
1 Parent(s): c7c8c1d

Create style/defaults/style.css

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