/* WINDETECT ERP v2.0.2 — common glass control treatment and viewport-anchored camera. */
:root{--wd-glass:rgba(255,255,255,.68);--wd-glass-border:rgba(179,194,211,.72);--wd-glass-shadow:0 7px 22px rgba(19,40,65,.13),inset 0 1px 1px rgba(255,255,255,.75)}
/* The camera is one locked viewport; scrolling its content used to move the controls on iOS. */
html:has(#wdSmartCamera:not([hidden])),body:has(#wdSmartCamera:not([hidden])){overflow:hidden!important}
html:has(#wdSmartCamera:not(.wd-command-mode):not([hidden])),body:has(#wdSmartCamera:not(.wd-command-mode):not([hidden])){overscroll-behavior:none!important}
#wdSmartCamera:not([hidden]){position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;overflow:hidden!important;overscroll-behavior:none!important;z-index:200600!important;transform:none!important;contain:layout paint}
#wdSmartCamera:not(.wd-command-mode):not([hidden]){touch-action:pan-x}
#wdSmartCamera .wd-sc-shell{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;margin:0 auto!important;overflow:hidden!important;overscroll-behavior:none!important;transform:none!important;padding:calc(78px + env(safe-area-inset-top,0px)) 16px calc(126px + env(safe-area-inset-bottom,0px))!important}
#wdSmartCamera .wd-sc-view{flex-shrink:1!important;max-height:calc(100dvh - 245px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));min-height:160px}
/* Absolute children of the full-screen shell are viewport-locked, unlike fixed children within scrollers. */
#wdSmartCamera .wd-sc-drawer-toggle,#wdSmartCamera .wd-sc-top{position:absolute!important;top:calc(16px + env(safe-area-inset-top,0px))!important;z-index:16!important;transform:none!important;filter:none!important}
#wdSmartCamera .wd-sc-drawer-toggle{left:16px!important;right:auto!important}
#wdSmartCamera .wd-sc-top{right:16px!important;left:auto!important}
#wdSmartCamera .wd-sc-actions{position:absolute!important;top:auto!important;bottom:calc(24px + env(safe-area-inset-bottom,0px))!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;z-index:16!important}
#wdSmartCamera .wd-sc-results,#wdSmartCamera .wd-sc-step{position:absolute!important;top:auto!important;bottom:calc(128px + env(safe-area-inset-bottom,0px))!important}
#wdSmartCamera .wd-sc-drawer,#wdSmartCamera .wd-sc-drawer-backdrop{position:absolute!important}
#wdSmartCamera .wd-sc-drawer{overflow:hidden!important;overscroll-behavior:contain!important;touch-action:pan-y!important}
/* Shared subtle translucent round controls (all camera/inspection flows). */
#wdSmartCamera #wdScOverflow,#wdSmartCamera #wdScNewChat,#wdSmartCamera .wd-sc-drawer-toggle,#wdSmartCamera #wdScGallery,
#wdSmartCamera .wd-sc-menu button,#wdSmartCamera .wd-sc-suggested,
#wdAssetCamera #wdAssetCameraBack,#wdAssetCamera #wdAssetCameraClose,
#wdAssetCamera #wdAssetCameraDone,#wdAssetCamera #wdAssetCameraSkip,
#wdPpeQrPanel .wd-ppe-capture-close,#wdPpeQrPanel .wd-ppe-back-round,
#wdPpeQrPanel .wd-ppe-confirm-round,
#wdBottomNavigation button:not(#wdBottomCamera),
body.wd-icon-inspection #hseCamCancel,body.wd-icon-inspection .wd-guide-close{
 border:1px solid var(--wd-glass-border)!important;
 border-radius:50%!important;
 background:var(--wd-glass)!important;
 -webkit-backdrop-filter:blur(13px) saturate(130%)!important;
 backdrop-filter:blur(13px) saturate(130%)!important;
 box-shadow:var(--wd-glass-shadow)!important;
 color:#17283b!important;
}
/* Consistent small top controls; preserve the large solid shutter and its function. */
#wdSmartCamera #wdScOverflow,#wdSmartCamera .wd-sc-drawer-toggle{width:45px!important;height:45px!important;min-width:45px!important;min-height:45px!important}
#wdSmartCamera #wdScGallery{width:50px!important;height:50px!important}
#wdSmartCamera .wd-sc-menu button{width:43px!important;height:43px!important}
#wdSmartCamera #wdScSnap{background:rgba(255,255,255,.92)!important}
/* Outside the camera, the main header stays visible while content scrolls. */
body>header.top{position:sticky!important;top:0!important;z-index:960!important;background:rgba(255,255,255,.75)!important;-webkit-backdrop-filter:blur(12px) saturate(125%);backdrop-filter:blur(12px) saturate(125%);border-bottom:1px solid rgba(179,194,211,.4)}
/* Keep the existing bottom nav pinned, without interfering with site-specific dock positions. */
#wdBottomNavigation:not([hidden]){position:fixed!important;bottom:calc(16px + env(safe-area-inset-bottom,0px))!important;z-index:950!important}
@supports not (height:100dvh){#wdSmartCamera:not([hidden]){height:100vh!important;max-height:100vh!important}}
body>header.top{color:#17283b!important}
body>header.top .head-right,body>header.top .muted{color:#31485e!important}
#wdSmartCamera.wd-command-mode .wd-sc-top{
 display:flex!important;width:auto!important;gap:0;padding:0 2px;
 background:var(--wd-glass);border:1px solid var(--wd-glass-border);border-radius:24px;box-shadow:var(--wd-glass-shadow);
}
#wdSmartCamera.wd-command-mode .wd-sc-top :is(#wdScNewChat,#wdScOverflow){
 position:relative!important;inset:auto!important;display:grid!important;place-items:center;
 border:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;
}
#wdSmartCamera #wdScDrawerNewChat{width:44px;padding:0}
#wdSmartCamera .wd-command-dock{background:linear-gradient(transparent,#ffffff60 40%,#ffffff85)}
#wdSmartCamera #wdCommandForm{background:rgba(255,255,255,.78);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
#wdSmartCamera #wdCommandInput{background:transparent}
html:root body #wdSmartCamera.wd-command-mode .wd-sc-top{left:auto!important;right:12px!important;height:46px!important}
html:root body #wdSmartCamera.wd-command-mode .wd-sc-menu{top:calc(100% + 8px)!important;right:0!important}
