/* WINDETECT ERP v2.2.86 - single chat viewport rule. Preserve v2.2.79 drawer gestures. */
html:root body #wdSmartCamera.wd-command-mode:not([hidden]) {
  position:fixed!important;inset:0!important;height:100dvh!important;width:100vw!important;
  max-width:none!important;max-height:none!important;padding:0!important;margin:0!important;
  contain:none!important;overflow:hidden!important;
}
html:root body #wdSmartCamera.wd-command-mode .wd-sc-shell {
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  min-height:0!important;max-width:none!important;margin:0!important;padding:0!important;
  overflow:hidden!important;
}
html:root body #wdSmartCamera.wd-command-mode #wdScCommandHome {
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  min-height:0!important;overflow:hidden!important;
}
html:root body #wdSmartCamera.wd-command-mode #wdCommandLog {
  position:absolute!important;
  /* extend the scroll viewport up into the PWA safe-area, without moving the buttons */
  left:0!important;right:0!important;top:calc(-1 * env(safe-area-inset-top,0px))!important;
  bottom:0!important;width:100%!important;height:calc(100% + env(safe-area-inset-top,0px))!important;
  min-height:0!important;max-height:none!important;box-sizing:border-box!important;
  padding-top:calc(76px + 2 * env(safe-area-inset-top,0px))!important;
  padding-bottom:calc(140px + env(safe-area-inset-bottom,0px))!important;
  scroll-padding:0!important;overflow-y:auto!important;overflow-x:hidden!important;
  overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;
  /* Only one gradient, anchored to the actual full-height message viewport */
  -webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,.17) 0px,rgba(0,0,0,.42) 35px,rgba(0,0,0,.78) 78px,#000 124px,#000 calc(100% - 145px),rgba(0,0,0,.42) 100%)!important;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.17) 0px,rgba(0,0,0,.42) 35px,rgba(0,0,0,.78) 78px,#000 124px,#000 calc(100% - 145px),rgba(0,0,0,.42) 100%)!important;
}
/* Drawer content: static underlay, subtle brightening and upward appearance. */
html:root body #wdSmartCamera.wd-command-mode #wdScDrawer {
  top:0!important;bottom:0!important;height:100%!important;transform:none!important;
}
html:root body #wdSmartCamera.wd-command-mode #wdScDrawer :is(.wd-sc-drawer-header,.wd-sc-drawer-scroll,.wd-sc-drawer-footer) {
  opacity:.76;filter:brightness(.92) blur(1px);transform:translate3d(0,7px,0);
  transition:opacity .25s ease,filter .25s ease,transform .28s ease;
}
html:root body #wdSmartCamera.wd-command-mode #wdScDrawer[aria-hidden="false"] :is(.wd-sc-drawer-header,.wd-sc-drawer-scroll,.wd-sc-drawer-footer) {
  opacity:1;filter:none;transform:translate3d(0,0,0);
}
@media(prefers-reduced-motion:reduce){
 html:root body #wdSmartCamera.wd-command-mode #wdScDrawer :is(.wd-sc-drawer-header,.wd-sc-drawer-scroll,.wd-sc-drawer-footer) {transition:none!important;filter:none!important;transform:none!important;opacity:1!important}
}
