/* Vchat Core 0.55.10-alpha — PWA mobile viewport + focus zoom guard
   Loaded last on Vchat frontend pages. Keeps iOS/Android typing stable without
   disabling intentional pinch-to-zoom when the PWA setting allows it. */
html.vchat-app-document{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
  -webkit-text-size-adjust:100%!important;
  text-size-adjust:100%!important;
  overscroll-behavior-x:none!important;
}
body.vchat-public-page{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
  -webkit-text-size-adjust:100%!important;
  text-size-adjust:100%!important;
  overscroll-behavior-x:none!important;
}
body.vchat-public-page.vchat-mobile-app-locked{
  position:fixed!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}
body.vchat-public-page.vchat-mobile-app-locked .vchat-frontend-app{
  position:fixed!important;
  inset:0!important;
  width:100%!important;
  max-width:100vw!important;
  height:var(--vchat-visual-height,100dvh)!important;
  min-height:0!important;
  max-height:var(--vchat-visual-height,100dvh)!important;
  overflow:hidden!important;
  touch-action:manipulation!important;
  -webkit-text-size-adjust:100%!important;
  text-size-adjust:100%!important;
}
body.vchat-public-page.vchat-mobile-app-locked .vchat-app-main,
body.vchat-public-page.vchat-mobile-app-locked .vchat-app-sidebar{
  height:var(--vchat-visual-height,100dvh)!important;
  max-height:var(--vchat-visual-height,100dvh)!important;
  min-height:0!important;
}
body.vchat-public-page.vchat-mobile-app-locked .vchat-inbox-shell{
  height:calc(var(--vchat-visual-height,100dvh) - 68px)!important;
  max-height:calc(var(--vchat-visual-height,100dvh) - 68px)!important;
  min-height:0!important;
}
body.vchat-public-page.vchat-mobile-app-locked .vchat-chat-panel,
body.vchat-public-page.vchat-mobile-app-locked .vchat-chat-timeline,
body.vchat-public-page.vchat-mobile-app-locked .vchat-conversation-list,
body.vchat-public-page.vchat-mobile-app-locked .vchat-app-section{
  min-height:0!important;
}
body.vchat-public-page.vchat-mobile-app-locked .vchat-chat-timeline,
body.vchat-public-page.vchat-mobile-app-locked .vchat-conversation-list,
body.vchat-public-page.vchat-mobile-app-locked .vchat-app-section{
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
}

/* Safari/iOS zooms automatically when a focused form control renders below 16px.
   Keep fields at a safe size on touch/mobile only. Buttons and labels retain the UI scale. */
@media (max-width: 1024px), (hover:none) and (pointer:coarse){
  body.vchat-public-page .vchat-frontend-app input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  body.vchat-public-page .vchat-frontend-app textarea,
  body.vchat-public-page .vchat-frontend-app select,
  body.vchat-public-page .vchat-frontend-app [contenteditable="true"]{
    font-size:16px!important;
    line-height:1.35!important;
    -webkit-text-size-adjust:100%!important;
    text-size-adjust:100%!important;
    touch-action:manipulation!important;
  }
  body.vchat-public-page .vchat-frontend-app .vchat-search input,
  body.vchat-public-page .vchat-frontend-app .vchat-composer textarea,
  body.vchat-public-page .vchat-frontend-app .vchat-modal input:not([type="checkbox"]):not([type="radio"]),
  body.vchat-public-page .vchat-frontend-app .vchat-modal textarea,
  body.vchat-public-page .vchat-frontend-app .vchat-modal select{
    font-size:16px!important;
  }
  body.vchat-public-page .vchat-frontend-app button,
  body.vchat-public-page .vchat-frontend-app a,
  body.vchat-public-page .vchat-frontend-app label,
  body.vchat-public-page .vchat-frontend-app [role="button"]{
    touch-action:manipulation!important;
  }
}

/* Landscape phones: keep the application anchored to the visual viewport. */
@media (max-height: 560px) and (orientation:landscape){
  body.vchat-public-page.vchat-mobile-app-locked .vchat-app-header{
    height:58px!important;
    min-height:58px!important;
  }
  body.vchat-public-page.vchat-mobile-app-locked .vchat-app-main{
    grid-template-rows:58px minmax(0,1fr)!important;
  }
  body.vchat-public-page.vchat-mobile-app-locked .vchat-inbox-shell{
    height:calc(var(--vchat-visual-height,100dvh) - 58px)!important;
    max-height:calc(var(--vchat-visual-height,100dvh) - 58px)!important;
  }
}
