/* iPhone installed-app chat viewport: align with Safari chat layout.
   The standalone status bar must NOT cover the conversation header. */
@media(max-width:740px) and (display-mode:standalone){
 #app-root:not(.hidden):has(#main-content .pati-dm-layout.mobile-chat-open)>.mobile-header{display:none!important}
 #main-content .pati-dm-layout.mobile-chat-open{
   position:fixed!important;
   top:max(56px,env(safe-area-inset-top,0px))!important;
   right:0!important;bottom:0!important;left:0!important;
   width:100%!important;max-width:100vw!important;
   height:auto!important;max-height:none!important;min-height:0!important;
   padding:0!important;margin:0!important;transform:none!important;
   z-index:1500!important;overflow:hidden!important;background:#fff!important;
 }
 #main-content .pati-dm-layout.mobile-chat-open .chat-window{
   display:flex!important;flex-direction:column!important;
   height:100%!important;max-height:100%!important;min-height:0!important;
   width:100%!important;margin:0!important;padding:0!important;
   background:#fff!important;
 }
 #main-content .pati-dm-layout.mobile-chat-open .chat-window>header{
   display:flex!important;position:relative!important;top:auto!important;
   transform:none!important;flex:0 0 auto!important;min-height:66px!important;
   padding:8px 10px!important;z-index:2!important;
   background:#fff!important;border-bottom:1px solid #eceef1!important;
   visibility:visible!important;opacity:1!important;
 }
 #main-content .pati-dm-layout.mobile-chat-open .chat-window>header button{
   min-width:44px!important;min-height:44px!important;pointer-events:auto!important;
 }
 #main-content .pati-dm-layout.mobile-chat-open .chat-history{
   flex:1 1 0!important;min-height:0!important;max-height:none!important;
   overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;
 }
 #main-content .pati-dm-layout.mobile-chat-open .chat-form{
   position:relative!important;inset:auto!important;transform:none!important;
   flex:0 0 auto!important;min-height:62px!important;
   padding-bottom:max(10px,env(safe-area-inset-bottom,0px))!important;
   background:#fff!important;
 }
 html.pati-keyboard-open #main-content .pati-dm-layout.mobile-chat-open{
   bottom:max(0px,var(--pati-keyboard-inset,0px))!important;
 }
 html.pati-keyboard-open #main-content .pati-dm-layout.mobile-chat-open .chat-form{
   padding-bottom:7px!important;
 }
}
