/*
 * Inbox viewport contract.
 *
 * Keep the shared inbox inside the visible browser area. Only the three
 * content columns may scroll; the composer always remains visible.
 */
body:not(.public-page):has(.workspace-shell .inbox-page){
  height:100dvh;
  overflow:hidden!important;
}

.workspace-shell:has(.inbox-page){
  height:100dvh!important;
  min-height:100dvh!important;
  max-height:100dvh!important;
  overflow:hidden!important;
}

.workspace-shell:has(.inbox-page)>.shell-main{
  display:flex!important;
  height:100dvh!important;
  min-height:0!important;
  max-height:100dvh!important;
  flex-direction:column!important;
  overflow:hidden!important;
}

.workspace-shell:has(.inbox-page)>.shell-main>.workspace-topbar{
  flex:0 0 auto!important;
}

.workspace-shell:has(.inbox-page)>.shell-main>.inbox-page{
  display:flex!important;
  flex:1 1 0!important;
  width:100%!important;
  height:0!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}

.workspace-shell:has(.inbox-page) .inbox-grid{
  flex:1 1 0!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  overflow:hidden!important;
}

.workspace-shell:has(.inbox-page) .inbox-list-column,
.workspace-shell:has(.inbox-page) .conversation-pane,
.workspace-shell:has(.inbox-page) .chat-pane,
.workspace-shell:has(.inbox-page) .conversation-profile{
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  overflow:hidden!important;
}

.workspace-shell:has(.inbox-page) .inbox-list-column,
.workspace-shell:has(.inbox-page) .conversation-pane,
.workspace-shell:has(.inbox-page) .chat-pane{
  display:flex!important;
  flex-direction:column!important;
}

.workspace-shell:has(.inbox-page) .conversation-list,
.workspace-shell:has(.inbox-page) .message-feed,
.workspace-shell:has(.inbox-page) .conversation-profile{
  min-height:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
}

.workspace-shell:has(.inbox-page) .message-feed{
  flex:1 1 0!important;
}

.workspace-shell:has(.inbox-page) .composer{
  position:relative!important;
  inset:auto!important;
  z-index:20!important;
  flex:0 0 auto!important;
  width:100%!important;
  margin:0!important;
  background:#fff!important;
}

@media(max-width:800px){
  .workspace-shell:has(.inbox-page)>.shell-main>.inbox-page{
    height:0!important;
  }

  .workspace-shell:has(.inbox-page) .inbox-grid{
    display:flex!important;
  }

  .workspace-shell:has(.inbox-page) .inbox-grid:not(.show-chat)>.chat-pane{
    display:none!important;
  }

  .workspace-shell:has(.inbox-page) .inbox-grid.show-chat>.chat-pane{
    display:flex!important;
  }
}
