/* GattoMusic 2.0 - Build 9.72
   Salas permanentes integradas ao Chat, indicadores de mídia estáveis e
   correções responsivas da área inferior do Chat. */

/* A topbar pode ocupar a altura real de seu conteúdo sem empurrar o compositor para fora da viewport. */
body.chat-view-active .main-column{
  grid-template-rows:auto minmax(0,1fr)!important;
  height:100dvh!important;
  max-height:100dvh!important;
  min-height:0!important;
}
body.chat-view-active .topbar{
  height:auto!important;
  min-height:64px!important;
  box-sizing:border-box!important;
  flex-wrap:wrap!important;
}
body.chat-view-active .content,
body.chat-view-active .view-content,
body.chat-view-active .chat-workspace-panel,
body.chat-view-active .chat-shell,
body.chat-view-active .chat-sidebar,
body.chat-view-active .chat-conversation{
  min-height:0!important;
  max-height:100%!important;
  box-sizing:border-box!important;
}
body.chat-view-active .chat-conversation{
  overflow:hidden!important;
}
body.chat-view-active .chat-message-list{
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
}
body.chat-view-active .chat-composer{
  flex:0 0 auto!important;
  min-height:0!important;
  max-height:min(42dvh,320px)!important;
  overflow:auto!important;
  box-sizing:border-box!important;
}

/* A fala não deve causar qualquer animação/piscada na grade. */
.chat-room-speaking-v969{display:none!important}
.chat-room-participant-v969,
.chat-room-participant-v969.speaking{
  transition:none!important;
  animation:none!important;
  border-color:color-mix(in srgb,var(--line) 80%,transparent)!important;
  box-shadow:none!important;
}
.chat-room-participant-v969.connection-warning{border-color:#e7a93d!important}
.chat-room-media-state-v969{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  margin-left:auto!important;
}
.chat-v972-media-icon{
  position:relative;
  display:inline-grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:7px;
  font-size:15px;
  line-height:1;
  background:rgba(255,255,255,.1);
  animation:none!important;
  transition:none!important;
}
.chat-v972-media-icon.is-off{opacity:.72}
.chat-v972-media-icon.is-off::after{
  content:'';
  position:absolute;
  width:26px;
  height:2px;
  border-radius:2px;
  background:#ff5f62;
  transform:rotate(-45deg);
  box-shadow:0 0 0 1px rgba(0,0,0,.28);
  pointer-events:none;
}

/* Atualizar dispositivos ocupa o mesmo card/célula visual dos seletores ao lado. */
.chat-room-device-grid-v969{align-items:stretch!important}
.chat-room-device-field-v969,
.chat-room-device-grid-v969>.button{
  min-height:68px!important;
  height:100%!important;
  box-sizing:border-box!important;
}
.chat-room-device-grid-v969>.button{
  align-self:stretch!important;
  justify-self:stretch!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:8px 12px!important;
}
.chat-room-device-field-v969 select{min-height:38px!important;width:100%!important;box-sizing:border-box!important}

/* Abas Contatos / Salas no navegador lateral do Chat. */
.chat-v972-sidebar-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin:0 10px 2px;
  padding:5px;
  border:1px solid var(--chat-v72-line,var(--line));
  border-radius:12px;
  background:rgba(255,255,255,.025);
}
.chat-v972-sidebar-tab{
  min-height:38px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--chat-v72-muted,var(--muted));
  font:800 .78rem/1 Verdana,Arial,sans-serif;
  cursor:pointer;
}
.chat-v972-sidebar-tab.is-active{
  color:var(--chat-v72-text,#fff);
  background:linear-gradient(145deg,rgba(255,138,0,.23),rgba(255,138,0,.08));
  box-shadow:inset 0 0 0 1px rgba(255,138,0,.38);
}
.chat-v972-room-list{
  display:grid;
  gap:7px;
  min-height:0;
  overflow-y:auto;
  padding:0 9px 10px;
}
.chat-v972-room-card{
  width:100%;
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  gap:9px;
  align-items:center;
  padding:9px;
  border:1px solid var(--chat-v72-line,var(--line));
  border-radius:12px;
  background:var(--chat-v72-card,var(--panel));
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.chat-v972-room-card:hover,.chat-v972-room-card.is-active{border-color:rgba(255,138,0,.55);background:var(--chat-v72-card-hover,var(--panel))}
.chat-v972-room-card-media{
  width:46px;height:46px;border-radius:12px;display:grid;place-items:center;overflow:hidden;
  background:rgba(255,138,0,.12);font-size:1.35rem;font-weight:900;
}
.chat-v972-room-card-media img{width:100%;height:100%;object-fit:cover}
.chat-v972-room-card-copy{display:grid;gap:3px;min-width:0}
.chat-v972-room-card-copy strong,.chat-v972-room-card-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-v972-room-card-copy strong{font-size:.82rem}
.chat-v972-room-card-copy span{font-size:.68rem;color:var(--chat-v72-muted,var(--muted))}

/* Sala persistente no lado direito: a conversa privada continua utilizável à esquerda. */
body.chat-view-active{--chat-v972-room-panel:clamp(430px,44vw,760px)}
.chat-room-sidepanel-v972{
  position:fixed;
  z-index:420;
  top:76px;
  right:12px;
  bottom:12px;
  width:var(--chat-v972-room-panel);
  min-width:0;
  display:none;
  grid-template-rows:auto minmax(160px,1fr) auto minmax(150px,.7fr) auto;
  gap:9px;
  padding:11px;
  overflow:hidden;
  border:1px solid color-mix(in srgb,var(--secondary) 45%,var(--chat-v72-line,var(--line)));
  border-radius:16px;
  background:var(--chat-v72-panel,#0d141d);
  color:var(--chat-v72-text,#f4f6fa);
  box-shadow:-18px 20px 58px rgba(0,0,0,.48);
  box-sizing:border-box;
}
.chat-room-sidepanel-v972.is-open{display:grid}
body.chat-view-active.chat-v972-room-open .chat-workspace-panel{
  width:calc(100% - var(--chat-v972-room-panel) - 14px)!important;
  margin-right:auto!important;
  transition:width .16s ease;
}
.chat-v972-room-identity{
  display:grid;
  grid-template-columns:54px minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
  min-width:0;
}
.chat-v972-room-image{width:54px;height:54px;border-radius:14px;display:grid;place-items:center;overflow:hidden;background:rgba(255,138,0,.14);font-size:1.6rem}
.chat-v972-room-image img{width:100%;height:100%;object-fit:cover}
.chat-v972-room-title{display:grid;gap:2px;min-width:0}
.chat-v972-room-title h2,.chat-v972-room-title p{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-v972-room-title h2{font-size:1.02rem}.chat-v972-room-title p{font-size:.7rem;color:var(--chat-v72-muted,var(--muted))}
.chat-v972-room-close{width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--chat-v72-line,var(--line));border-radius:10px;background:transparent;color:inherit;cursor:pointer}
.chat-v972-room-grid-wrap{min-height:0;overflow:auto;border-radius:13px}
.chat-room-sidepanel-v972 .chat-room-grid-v969{grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr));align-content:start}
.chat-room-sidepanel-v972 .chat-room-participant-v969{min-height:clamp(135px,20dvh,220px)}
.chat-room-sidepanel-v972 .chat-room-video-v969[data-self="true"],
.chat-room-sidepanel-v972 .chat-room-participant-v969.is-self .chat-room-video-v969{object-fit:contain!important}
.chat-v972-room-controls{display:grid;gap:7px;min-height:0}
.chat-v972-room-controls .chat-room-actions-v969{justify-content:flex-start}
.chat-v972-room-message-block{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;border:1px solid var(--chat-v72-line,var(--line));border-radius:12px;overflow:hidden}
.chat-v972-room-message-title{padding:7px 9px;border-bottom:1px solid var(--chat-v72-line,var(--line));font-size:.74rem;font-weight:900}
.chat-v972-room-messages{min-height:0;overflow-y:auto;display:grid;align-content:start;gap:6px;padding:8px}
.chat-v972-room-message{display:grid;gap:2px;padding:7px 8px;border-radius:9px;background:rgba(255,255,255,.04);font-size:.74rem}
.chat-v972-room-message.is-own{background:rgba(18,55,95,.72)}
.chat-v972-room-message small{color:var(--chat-v72-muted,var(--muted));font-size:.62rem}
.chat-v972-room-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;padding:7px;border-top:1px solid var(--chat-v72-line,var(--line))}
.chat-v972-room-composer textarea{min-height:42px;max-height:90px;resize:vertical;border:1px solid var(--chat-v72-line,var(--line));border-radius:9px;padding:8px;background:rgba(0,0,0,.16);color:inherit}
.chat-v972-room-profile{display:grid;gap:7px;max-height:30dvh;overflow:auto;border-top:1px solid var(--chat-v72-line,var(--line));padding-top:8px}
.chat-v972-room-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.chat-v972-room-profile label{display:grid;gap:4px;font-size:.68rem;font-weight:800}
.chat-v972-room-profile input,.chat-v972-room-profile textarea{width:100%;box-sizing:border-box;border:1px solid var(--chat-v72-line,var(--line));border-radius:8px;padding:7px;background:rgba(0,0,0,.15);color:inherit}
.chat-v972-room-privacy{margin:0;color:var(--chat-v72-muted,var(--muted));font-size:.64rem;line-height:1.35}

.chat-room-sidepanel-v972:fullscreen{
  inset:0!important;
  width:100vw!important;
  height:100dvh!important;
  max-width:none!important;
  border:0!important;
  border-radius:0!important;
  padding:12px!important;
  background:var(--chat-v72-bg,#070b11)!important;
}
.chat-room-sidepanel-v972:fullscreen .chat-room-grid-v969{grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr))}
.chat-room-sidepanel-v972:fullscreen .chat-room-participant-v969{min-height:clamp(220px,36dvh,480px)}
.chat-room-sidepanel-v972:fullscreen .chat-room-video-v969{object-fit:cover}
.chat-room-sidepanel-v972:fullscreen .chat-room-participant-v969.is-self .chat-room-video-v969{object-fit:contain!important}

@media(max-width:1120px){
  body.chat-view-active{--chat-v972-room-panel:clamp(390px,48vw,620px)}
  .chat-room-sidepanel-v972{top:74px}
}
@media(max-width:820px){
  body.chat-view-active .main-column{grid-template-rows:auto minmax(0,1fr)!important}
  body.chat-view-active .topbar{height:auto!important;min-height:58px!important}
  body.chat-view-active.chat-v972-room-open .chat-workspace-panel{width:100%!important}
  .chat-room-sidepanel-v972{
    inset:66px 7px 7px 7px;
    width:auto;
    grid-template-rows:auto minmax(145px,1fr) auto minmax(135px,.65fr) auto;
  }
  .chat-v972-room-profile-grid{grid-template-columns:1fr}
}
@media(max-width:520px){
  .chat-room-sidepanel-v972{inset:62px 3px 3px 3px;padding:7px;gap:6px;border-radius:10px}
  .chat-room-sidepanel-v972 .chat-room-grid-v969{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
  .chat-room-sidepanel-v972 .chat-room-participant-v969{min-height:125px}
  .chat-v972-room-identity{grid-template-columns:46px minmax(0,1fr) 36px}.chat-v972-room-image{width:46px;height:46px}
  .chat-v972-room-composer{grid-template-columns:1fr}.chat-v972-room-composer .button{min-height:38px}
  body.chat-view-active .chat-composer{max-height:min(50dvh,340px)!important}
}

/* Nomes reais do DOM da Build 9.72. */
.chat-room-side-header-v972{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-width:0}
.chat-room-side-identity-v972{display:grid;grid-template-columns:52px minmax(0,1fr);gap:9px;align-items:center;min-width:0;flex:1}
.chat-room-visual-v972{width:52px;height:52px;border-radius:14px;display:grid;place-items:center;overflow:hidden;background:rgba(255,138,0,.14);font-size:1.55rem;flex:0 0 auto}
.chat-room-visual-v972 img{width:100%;height:100%;object-fit:cover}
.chat-room-side-copy-v972{display:grid;gap:2px;min-width:0}
.chat-room-side-copy-v972>strong,.chat-room-side-copy-v972>span,.chat-room-side-copy-v972>small,.chat-room-side-copy-v972>p{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis}
.chat-room-side-copy-v972>strong,.chat-room-side-copy-v972>span,.chat-room-side-copy-v972>small{white-space:nowrap}
.chat-room-side-copy-v972>strong{font-size:1rem}.chat-room-side-copy-v972>span,.chat-room-side-copy-v972>small{font-size:.68rem;color:var(--chat-v72-muted,var(--muted))}.chat-room-description-v972{font-size:.68rem;line-height:1.35;color:var(--chat-v72-muted,var(--muted));display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal!important}
.chat-room-side-header-actions-v972{display:flex;gap:6px}.chat-room-side-collapse-v972{width:36px!important;height:36px!important;min-width:36px!important;padding:0!important}
.chat-room-side-scroll-v972{min-height:0;overflow-y:auto;display:grid;align-content:start;gap:9px;padding-right:2px;overscroll-behavior:contain}
.chat-room-side-call-v972{display:grid;gap:8px;min-height:0}
.chat-room-grid-v972{align-content:start}
.chat-room-call-idle-v972{grid-column:1/-1;min-height:92px;display:grid;place-items:center;text-align:center;padding:14px;border:1px dashed var(--chat-v72-line,var(--line));border-radius:12px;color:var(--chat-v72-muted,var(--muted));font-size:.75rem}
.chat-room-messages-v972{display:grid;grid-template-rows:auto minmax(120px,220px) auto;min-height:0;border:1px solid var(--chat-v72-line,var(--line));border-radius:12px;overflow:hidden}
.chat-room-section-title-v972{display:grid;gap:2px;padding:8px 9px;border-bottom:1px solid var(--chat-v72-line,var(--line))}.chat-room-section-title-v972 strong{font-size:.76rem}.chat-room-section-title-v972 span{font-size:.63rem;color:var(--chat-v72-muted,var(--muted))}
.chat-room-message-list-v972{min-height:0;overflow-y:auto;display:grid;align-content:start;gap:6px;padding:8px;overscroll-behavior:contain}
.chat-room-message-v972{display:grid;gap:3px;max-width:88%;padding:7px 8px;border-radius:10px;background:rgba(255,255,255,.05);font-size:.72rem;justify-self:start}.chat-room-message-v972.outgoing{justify-self:end;background:rgba(18,55,95,.8)}.chat-room-message-v972 strong{font-size:.66rem}.chat-room-message-v972 p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.chat-room-message-v972 time{font-size:.58rem;color:var(--chat-v72-muted,var(--muted))}.chat-room-message-empty-v972{padding:14px;text-align:center;color:var(--chat-v72-muted,var(--muted));font-size:.7rem}
.chat-room-message-composer-v972{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;padding:7px;border-top:1px solid var(--chat-v72-line,var(--line))}.chat-room-message-composer-v972 textarea{min-height:42px;max-height:92px;resize:vertical;box-sizing:border-box;border:1px solid var(--chat-v72-line,var(--line));border-radius:9px;padding:8px;background:rgba(0,0,0,.16);color:inherit}.chat-room-message-composer-v972 .button{align-self:stretch}
.chat-room-profile-v972{border:1px solid var(--chat-v72-line,var(--line));border-radius:12px;overflow:hidden}.chat-room-profile-v972>summary{cursor:pointer;padding:8px 9px;font-size:.74rem;font-weight:900}.chat-room-profile-grid-v972{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:0 8px 8px}.chat-room-profile-field-v972{display:grid;gap:4px;font-size:.66rem;font-weight:800}.chat-room-profile-field-v972 input,.chat-room-profile-field-v972 textarea{width:100%;box-sizing:border-box;border:1px solid var(--chat-v72-line,var(--line));border-radius:8px;padding:7px;background:rgba(0,0,0,.15);color:inherit}.chat-room-profile-actions-v972{grid-column:1/-1;display:flex;gap:6px;flex-wrap:wrap}
.chat-v972-sidebar-tabs{grid-template-columns:1fr 1fr}.chat-v972-tab{min-height:38px;border:0;border-radius:9px;background:transparent;color:var(--chat-v72-muted,var(--muted));font:800 .78rem/1 Verdana,Arial,sans-serif;cursor:pointer}.chat-v972-tab.is-active{color:var(--chat-v72-text,#fff);background:linear-gradient(145deg,rgba(255,138,0,.23),rgba(255,138,0,.08));box-shadow:inset 0 0 0 1px rgba(255,138,0,.38)}
.chat-v972-room-list{display:grid;align-content:start;gap:7px;min-height:0;overflow-y:auto;padding:0 9px 10px}.chat-v972-room-list-top{display:flex;align-items:center;justify-content:space-between;gap:7px}.chat-v972-room-list-top strong{font-size:.78rem}.chat-v972-room-list-top .button{min-height:34px;padding:6px 8px;font-size:.68rem}.chat-v972-room-empty{padding:16px 8px;text-align:center;color:var(--chat-v72-muted,var(--muted));font-size:.72rem}
.chat-v972-room-row{width:100%;display:grid;grid-template-columns:44px minmax(0,1fr);gap:8px;align-items:center;padding:8px;border:1px solid var(--chat-v72-line,var(--line));border-radius:11px;background:var(--chat-v72-card,var(--panel));color:inherit;text-align:left;cursor:pointer}.chat-v972-room-row:hover,.chat-v972-room-row.is-selected{border-color:rgba(255,138,0,.55);background:var(--chat-v72-card-hover,var(--panel))}.chat-v972-room-row-visual{width:44px;height:44px;border-radius:11px;font-size:1.25rem}.chat-v972-room-row-copy{display:grid;gap:2px;min-width:0}.chat-v972-room-row-copy>*{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-v972-room-row-copy strong{font-size:.78rem}.chat-v972-room-row-copy small,.chat-v972-room-row-copy span{font-size:.63rem;color:var(--chat-v72-muted,var(--muted))}
body.light .chat-room-sidepanel-v972{background:#f4f7fb;color:#17202b}.hidden{display:none!important}
@media(max-width:820px){.chat-room-profile-grid-v972{grid-template-columns:1fr}.chat-room-profile-actions-v972{grid-column:1}.chat-room-message-composer-v972{grid-template-columns:1fr}.chat-room-side-identity-v972{grid-template-columns:44px minmax(0,1fr)}.chat-room-visual-v972{width:44px;height:44px}}
