/* Canonical composer containment. Transport and permission ownership remain with each chat controller. */
.mac-chat-composer{
  grid-auto-flow:row;
  min-width:0;
}
.mac-chat-composer>.mac-chat-composer-previews{
  grid-column:1/-1!important;
  grid-row:1!important;
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:5px 4px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}
.mac-chat-composer>.mac-chat-composer-previews[hidden]{display:none!important}
.mac-chat-composer>.mac-chat-composer-previews:not([hidden]){
  border-bottom:1px solid rgba(82,119,133,.34);
}
.mac-chat-composer>.mac-chat-composer-previews~:is(button,textarea,.community-composer-actions){grid-row:2}

body.mac-community-os-shell[data-os-workspace="chat"] #community-chat-view>.community-message-form.mac-chat-composer{
  height:auto!important;
  min-height:var(--os-chat-composer-row)!important;
  max-height:148px!important;
  overflow:hidden!important;
}
body.mac-community-os-shell[data-os-workspace="chat"] #community-chat-view>.community-message-form.mac-chat-composer>.community-message-pending-attachments{
  max-height:74px!important;
  flex-wrap:nowrap;
}
body.mac-community-os-shell[data-os-workspace="dms"] #community-dm-view .community-dm-form.mac-chat-composer{
  height:auto!important;
  max-height:164px!important;
  overflow:hidden!important;
}
body.mac-community-os-shell[data-os-workspace="dms"] #community-dm-view .community-dm-form.mac-chat-composer>.community-dm-pending-attachments{
  max-height:68px!important;
}

.mac-os-text-chat-composer.mac-chat-composer,.mac-os-native-dm-form.mac-chat-composer{
  grid-template-rows:auto auto;
  height:auto;
  max-height:164px;
  overflow:hidden;
}
.mac-os-text-chat-composer.mac-chat-composer>.mac-os-text-chat-pending-attachments,
.mac-os-native-dm-form.mac-chat-composer>.mac-os-native-dm-pending-attachments{
  max-height:74px;
}

@media(max-width:760px){
  .mac-chat-composer>.mac-chat-composer-previews{padding:4px 0!important}
  body.mac-community-os-shell.mac-os-canonical-text-channel[data-os-workspace="chat"] #community-chat-view>.community-message-form.mac-chat-composer,
  body.mac-community-os-shell[data-os-workspace="dms"] #community-dm-view .community-dm-form.mac-chat-composer{
    max-height:min(180px,42dvh)!important;
  }
}
