/* GattoMusic 3.0 / Build 11.39 — Sala (mobile): o painel "Controles da Sala"
   passa a abrir como uma folha sobre o corpo da Sala, ocupando toda a altura
   disponível. Antes ele abria para cima a partir do rodapé e a parte superior
   era cortada pela borda do painel (overflow:hidden). Desktop, tela cheia,
   Destacar Sala e tela compartilhada permanecem inalterados. */

@media (max-width: 820px), (pointer: coarse){
  .chat-room-sidepanel-v972.gatto-room-shell:not(:fullscreen):not(.is-gatto-room-fullscreen):not([data-gatto-room-fullscreen="1"]):not(.is-gatto-room-detached):not([data-gatto-room-detached="1"]) .gatto-v1119-controls-panel{
    position:fixed!important;
    top:70px!important;
    left:9px!important;
    right:9px!important;
    bottom:9px!important;
    width:auto!important;
    max-width:none!important;
    max-height:none!important;
    height:auto!important;
    transform:none!important;
    z-index:1000!important;
    border-radius:14px!important;
  }
}

@media (max-width: 560px){
  .chat-room-sidepanel-v972.gatto-room-shell:not(:fullscreen):not(.is-gatto-room-fullscreen):not([data-gatto-room-fullscreen="1"]):not(.is-gatto-room-detached):not([data-gatto-room-detached="1"]) .gatto-v1119-controls-panel{
    top:66px!important;
    left:5px!important;
    right:5px!important;
    bottom:5px!important;
    border-radius:11px!important;
  }
}

@media (max-width: 820px), (pointer: coarse){
  .chat-room-sidepanel-v972.gatto-room-shell:not(:fullscreen):not(.is-gatto-room-fullscreen):not([data-gatto-room-fullscreen="1"]):not(.is-gatto-room-detached):not([data-gatto-room-detached="1"]) .gatto-room-controls-wrap.has-open-unified-menu>.gatto-room-popover{
    position:fixed!important;
    top:50%!important;
    left:50%!important;
    right:auto!important;
    bottom:auto!important;
    transform:translate(-50%,-50%)!important;
    width:min(520px,calc(100vw - 24px))!important;
    max-width:calc(100vw - 18px)!important;
    max-height:min(72dvh,580px)!important;
    z-index:1001!important;
  }
}

/* GattoMusic 3.0 / Build 11.42 — Chat (celular): melhor aproveitamento do espaço.
   Em telas <=760px a coluna de contatos perdia muito espaço vertical: o título
   ganhava uma segunda linha (a engrenagem caía para baixo por causa do
   `.chat-title{display:grid}` legado em styles_chat_legacy.css:118), além de
   gaps e paddings generosos nos blocos acima da lista (tabs, busca,
   "Solicitações", "Meus contatos"). Este bloco compacta SOMENTE o modo celular,
   devolvendo essa altura para a lista de contatos. Desktop, tablet (>=761px) e
   o modo Preferências permanecem inalterados. */

@media (max-width: 760px){
  .chat-shell .chat-sidebar{gap:8px!important}
  .chat-shell .chat-title{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:8px 12px 7px!important}
  .chat-shell .chat-title .eyebrow{font-size:.62rem!important}
  .chat-shell .chat-title h1{font-size:1rem!important}
  .chat-shell .chat-settings summary{width:34px!important;height:34px!important}

  .chat-shell .chat-v972-sidebar-tabs,
  .chat-shell .chat-v974-sidebar-tabs{margin:0 8px 0!important;padding:4px!important;gap:5px!important}
  .chat-shell .chat-v972-sidebar-tabs .chat-v972-tab,
  .chat-shell .chat-v974-sidebar-tabs .chat-v972-tab{min-height:32px!important;padding:5px 6px!important}

  .chat-shell .chat-contact-search{margin:0 10px!important;gap:6px!important}
  .chat-shell .chat-contact-search input{min-height:38px!important;padding:7px 10px 7px 34px!important}
  .chat-shell .chat-contact-search::before{top:6px!important}
  .chat-shell .chat-contact-search .button{min-width:38px!important;padding:6px 9px!important}

  .chat-shell .chat-request-section{margin:0 10px!important;padding:8px!important;gap:5px!important}
  .chat-shell .chat-request-section h3{font-size:.82rem!important}

  .chat-shell .chat-list-heading{padding:0 12px!important}
  .chat-shell .chat-list-heading h3{font-size:.72rem!important}

  .chat-shell .chat-contact-list{gap:3px!important}
  .chat-shell .chat-contact-row{grid-template-columns:44px minmax(0,1fr) 32px!important;min-height:56px!important}
  .chat-shell .chat-contact-avatar-button{width:40px!important;height:50px!important}
  .chat-shell .chat-contact-avatar{width:38px!important;height:38px!important;flex:0 0 38px!important}
  .chat-shell .chat-contact-main{min-height:50px!important;padding:5px 4px!important}
  .chat-shell .chat-contact-info strong{font-size:.82rem!important}
  .chat-shell .empty-state.compact{padding:12px!important}
}

