/* DARK OKEY TEST: desktop lobby chat composer and viewport containment.
   Scoped to lobby; no changes to game-table chats or mobile layouts.
   A dedicated cascade layer allows these fixes to outrank conflicting
   legacy !important rules without piling on repeated #root selectors. */
@layer darkLobbyChatRepair {
@media (min-width:901px) {
 html body #root main.entertainmentLobby .lobbySocialLayout .lobbyChatFloor{
  min-height:0!important;overflow:hidden!important;
 }
 html body #root main.entertainmentLobby .lobbyChatFloor .lobbyChatMain{
  display:flex!important;flex-direction:column!important;
  min-height:0!important;height:100%!important;max-height:100%!important;
  overflow:hidden!important;box-sizing:border-box!important;
 }
 html body #root main.entertainmentLobby .lobbyChatFloor .lobbyChatMain>.lobbyChatFloorHead,
 html body #root main.entertainmentLobby .lobbyChatFloor .lobbyChatMain>.lobbySystemNotice{
  flex:0 0 auto!important;
 }
 html body #root main.entertainmentLobby .lobbyChatFloor .lobbyChatMain>.richChat{
  display:flex!important;flex-direction:column!important;
  position:relative!important;top:0!important;bottom:auto!important;
  inset:0 auto auto!important;transform:none!important;
  flex:1 1 0%!important;
  min-height:0!important;height:auto!important;max-height:100%!important;
  margin:0!important;padding:0!important;box-sizing:border-box!important;
  overflow:hidden!important;
 }
 html body #root main.entertainmentLobby .lobbyChatFloor .lobbyChatMain>.richChat>.socialToolBar{
  flex:0 0 36px!important;min-height:36px!important;
 }
 html body #root main.entertainmentLobby .lobbyChatFloor .lobbyChatMain>.richChat>.chatMessages{
  flex:1 1 0%!important;
  min-height:0!important;height:auto!important;max-height:none!important;
  overflow-x:hidden!important;overflow-y:auto!important;
 }
 html body #root main.entertainmentLobby .lobbyChatFloor .lobbyChatMain>.richChat>.chatComposer{
  flex:0 0 58px!important;
  height:58px!important;min-height:58px!important;max-height:58px!important;
  display:block!important;
  position:relative!important;top:auto!important;bottom:auto!important;
  margin:0!important;
  padding:7px!important;box-sizing:border-box!important;
  overflow:hidden!important;
 }
 html body #root main.entertainmentLobby .lobbyChatFloor .richChat .chatComposer>.chatSend{
  display:grid!important;
  grid-template-columns:36px 36px 36px minmax(0,1fr) 74px!important;
  grid-template-rows:42px!important;
  align-items:center!important;
  gap:6px!important;
  box-sizing:border-box!important;
  width:100%!important;max-width:100%!important;
  height:42px!important;min-height:42px!important;max-height:42px!important;
  margin:0!important;padding:0!important;
  overflow:visible!important;
 }
 html body #root main.entertainmentLobby .lobbyChatFloor .richChat .chatSend>button:nth-child(1),
 html body #root main.entertainmentLobby .lobbyChatFloor .richChat .chatSend>button:nth-child(2),
 html body #root main.entertainmentLobby .lobbyChatFloor .richChat .chatSend>button:nth-child(3){
  display:grid!important;place-items:center!important;
  box-sizing:border-box!important;position:static!important;
  float:none!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
  transform:none!important;
  width:36px!important;min-width:36px!important;max-width:36px!important;
  height:40px!important;min-height:40px!important;max-height:40px!important;
  padding:0!important;margin:0!important;
  grid-row:1!important;
 }
 html body #root main.entertainmentLobby .lobbyChatFloor .richChat .chatSend>button:nth-child(1){grid-column:1!important}
 html body #root main.entertainmentLobby .lobbyChatFloor .richChat .chatSend>button:nth-child(2){grid-column:2!important}
 html body #root main.entertainmentLobby .lobbyChatFloor .richChat .chatSend>button:nth-child(3){grid-column:3!important}
 html body #root main.entertainmentLobby .lobbyChatFloor .richChat .chatSend>input:not([type=file]){
  box-sizing:border-box!important;position:static!important;
  transform:none!important;
  grid-column:4!important;grid-row:1!important;
  min-width:0!important;width:100%!important;max-width:none!important;
  height:42px!important;min-height:42px!important;max-height:42px!important;
  padding:6px 10px!important;margin:0!important;
  font-size:14px!important;
 }
 html body #root main.entertainmentLobby .lobbyChatFloor .richChat .chatSend>button:last-child{
  box-sizing:border-box!important;position:static!important;
  transform:none!important;
  grid-column:5!important;grid-row:1!important;
  width:74px!important;min-width:74px!important;max-width:74px!important;
  height:42px!important;min-height:42px!important;max-height:42px!important;
  padding:5px!important;margin:0!important;
  font-size:12px!important;
 }
}
}

/* Desktop: use actual browser content viewport, not nominal monitor height. */
@layer darkLobbyChatRepair {
 @media (min-width:901px) {
  html body #root main.entertainmentLobby {
   box-sizing:border-box!important;
   display:flex!important;flex-direction:column!important;
   height:100dvh!important;max-height:100dvh!important;
   min-height:0!important;overflow:hidden!important;
  }
  html body #root main.entertainmentLobby>.lobbySocialLayout {
   box-sizing:border-box!important;
   flex:1 1 0%!important;
   height:auto!important;max-height:100%!important;min-height:0!important;
   grid-template-rows:minmax(0,1fr)!important;
   overflow:hidden!important;
  }
  html body #root main.entertainmentLobby>.lobbySocialLayout>.lobbyChatFloor {
   box-sizing:border-box!important;
   height:auto!important;max-height:100%!important;min-height:0!important;
   align-self:stretch!important;overflow:hidden!important;
  }
 }
}

/* Honor the existing lobby table visibility state. */
@layer darkLobbyChatRepair {
@media(min-width:901px){
html body #root main.entertainmentLobby .lobbySocialLayout.chatOnlyLobby>.tablesArea{display:none!important}
html body #root main.entertainmentLobby .lobbySocialLayout.chatOnlyLobby{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(220px,26%)!important;grid-template-rows:minmax(0,1fr)!important}
html body #root main.entertainmentLobby .lobbySocialLayout.chatOnlyLobby>.lobbyChatFloor{grid-area:1/1/2/2!important;height:100%!important;min-height:0!important}
html body #root main.entertainmentLobby .lobbySocialLayout.chatOnlyLobby>.lobbyPeopleRail{grid-area:1/2/2/3!important;height:100%!important;min-height:0!important}
}
html body #root main.mobileLobbyShell>.mobileTablesPanel.closed{height:auto!important;min-height:0!important;max-height:none!important;flex:0 0 auto!important;overflow:hidden!important}
html body #root main.mobileLobbyShell>.mobileTablesPanel.closed>:not(.mobileTablesHead){display:none!important}
}
