/* viewer.css */ /* Widget container styling */ .ply-widget-container { position: relative; width: 100%; height: 0; /* Height: 0 so padding-bottom controls the aspect ratio */ background-color: white; transition: all 0.3s ease; box-sizing: border-box; overflow: hidden; } /* When in fake fullscreen mode (iOS fallback) */ .ply-widget-container.fake-fullscreen { position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; padding-bottom: 0 !important; z-index: 9999 !important; background-color: black; border-radius: 0 !important; margin: 0 !important; max-width: 100vw !important; max-height: 100vh !important; box-sizing: border-box; overflow: hidden; } /* For native fullscreen - ensure no aspect ratio padding */ .ply-widget-container:fullscreen { width: 100vw !important; height: 100vh !important; padding-bottom: 0 !important; border-radius: 0 !important; background-color: black; } /* Vendor prefixes for fullscreen */ .ply-widget-container:-webkit-full-screen { width: 100vw !important; height: 100vh !important; padding-bottom: 0 !important; border-radius: 0 !important; background-color: black; } .ply-widget-container:-moz-full-screen { width: 100vw !important; height: 100vh !important; padding-bottom: 0 !important; border-radius: 0 !important; background-color: black; } .ply-widget-container:-ms-fullscreen { width: 100vw !important; height: 100vh !important; padding-bottom: 0 !important; border-radius: 0 !important; background-color: black; } /* Viewer Container styling */ .viewer-container { display: none; position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; background: black; border: 1px solid #474558; border-radius: 10px; overflow: hidden; box-sizing: border-box; transition: all 0.3s ease; min-height: 100%; object-fit: contain; } /* When parent container is fullscreen, adjust viewer container */ .fake-fullscreen .viewer-container, :fullscreen .viewer-container, :-webkit-full-screen .viewer-container, :-moz-full-screen .viewer-container, :-ms-fullscreen .viewer-container { border-radius: 0; border: none; width: 100%; height: 100%; } /* Canvas fills the viewer container */ .ply-canvas { width: 100%; height: 100%; display: block; background-color: transparent; z-index: 1; position: absolute; top: 0; left: 0; right: 0; bottom: 0; } /* Make sure canvas fills entire space in fullscreen */ .fake-fullscreen .ply-canvas, :fullscreen .ply-canvas, :-webkit-full-screen .ply-canvas, :-moz-full-screen .ply-canvas, :-ms-fullscreen .ply-canvas { width: 100vw; height: 100vh; } /* Progress dialog styling (centered) */ .progress-dialog { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: none; background: rgba(0,0,0,0.7); padding: 20px; border-radius: 5px; z-index: 1000; display: none; color: white; } /* Progress bar styling */ progress { width: 250px; height: 15px; appearance: none; border: none; border-radius: 10px; overflow: hidden; } progress::-webkit-progress-bar { background-color: #333; border-radius: 10px; } progress::-webkit-progress-value { background-color: #4682B4; border-radius: 10px; } progress::-moz-progress-bar { background-color: #4682B4; border-radius: 10px; } /* Menu (instructions) content styling */ .menu-content { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(242,240,239,0.9); /* #F2F0EF at 90% opacity */ color: #545454; border: 1px solid #ddd; border-radius: 10px; padding: 18px 24px; font-size: 15px; line-height: 1.4; box-shadow: none; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; z-index: 1010; } /* Help-close button inside instructions panel */ .help-close { position: absolute; top: 8px; right: 8px; background-color: #B0B0B0; color: #333; border: none; border-radius: 4px; width: 24px; height: 24px; line-height: 24px; text-align: center; cursor: pointer; font-size: 16px; } /* Button styling with improved visibility and spacing tweaks */ .widget-button { position: absolute; width: 32px; /* Reduced by 30% from 45px */ height: 32px; /* Reduced by 30% */ background-color: #F2F0EF; border: 1px solid #ccc; border-radius: 8px; cursor: pointer; font-size: 16px; color: #545454; display: flex !important; align-items: center; justify-content: center; transition: background-color 0.2s ease; z-index: 1000; opacity: 1 !important; visibility: visible !important; margin-right: 8px; /* Tighter gap between buttons */ } .widget-button:hover { background-color: rgba(242,240,239,0.7); } /* Specific button positions (tighter spacing) */ .fullscreen-toggle { top: 12px; right: 12px; } .help-toggle { top: 12px; right: 52px; font-size: 18px; } .reset-camera-btn { top: 12px; right: 92px; font-size: 18px; line-height: normal; padding: 0; } .tooltips-toggle { top: 12px; right: 132px; font-size: 18px; } /* Ensure buttons remain visible in fullscreen */ .fake-fullscreen .widget-button, :fullscreen .widget-button, :-webkit-full-screen .widget-button, :-moz-full-screen .widget-button, :-ms-fullscreen .widget-button { z-index: 10000; } /* Tooltip panel styling */ .tooltip-panel { position: absolute; top: 50%; right: 5%; transform: translate(0%, -50%); background: rgba(242,240,239,0.9); color: #545454; border: 1px solid #ddd; border-radius: 6px; padding: 15px; max-width: 300px; z-index: 20000; display: none; flex-direction: column; align-items: flex-start; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; } .tooltip-content { position: relative; width: 100%; } /* --- FIX: Perfectly center the tooltip close button (×) on all devices --- */ .tooltip-close { position: absolute; top: -8px; right: -8px; background: #B0B0B0; color: #333; border-radius: 50%; width: 20px; height: 20px; /* New for centering: */ display: flex; align-items: center; justify-content: center; padding: 0; line-height: normal; vertical-align: middle; text-align: center; cursor: pointer; font-weight: bold; } .tooltip-text { margin-bottom: 10px; font-size: 14px; line-height: 1.4; } .tooltip-image { max-width: 100%; border-radius: 4px; margin-top: 5px; } /* --- Mobile adjustments: when the widget container has the "mobile" class --- */ .ply-widget-container.mobile .widget-button { width: 24px; /* 32px * 0.75 */ height: 24px; /* 32px * 0.75 */ font-size: 12px; /* 16px * 0.75 */ } .ply-widget-container.mobile .help-toggle { font-size: 14px; } .ply-widget-container.mobile .fullscreen-toggle { top: 8px; right: 8px; } .ply-widget-container.mobile .help-toggle { top: 8px; right: 40px; } .ply-widget-container.mobile .reset-camera-btn { top: 8px; right: 72px; } .ply-widget-container.mobile .tooltips-toggle { top: 8px; right: 104px; } /* Additional styles for PlayCanvas compatibility */ #application-canvas { width: 100%; height: 100%; display: block; } html, body { margin: 0; padding: 0; height: 100%; } /* Error message styling */ .progress-dialog p { margin: 0; padding: 5px; } /* --------------------------------------------------------------------------- */ /* NEW MOBILE RULES — ensure instructions panel fits on phones */ /* --------------------------------------------------------------------------- */ @media (max-width: 600px) { .menu-content { width: 85vw; /* 80-90 % of viewport width */ max-height: 55vh; /* ~half the screen tall */ overflow-y: auto; /* scroll if content longer */ padding: 40px 18px 14px;/* ↑ 40 px top pushes text below close btn */ font-size: 14px; } /* keep the close button clearly inside the panel */ .menu-content .help-close { top: 6px; right: 6px; } }