/* =========================================================
   Wiantex Messages Composer — scoped composer-only repair
   Does not touch chat header, sidebar, message list or WiaNova layout.
   ========================================================= */

/* Normal DM composer: fixed-height controls + flexible message box. */
.messages-shell .conv-chat-input:not([data-wianova="1"]){
  position:relative!important;
  display:flex!important;
  align-items:flex-end!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  padding:8px!important;
}

.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-voice,
.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-attach,
.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-emoji-trigger,
.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-send{
  flex:0 0 40px!important;
  width:40px!important;
  min-width:40px!important;
  max-width:40px!important;
  height:40px!important;
  min-height:40px!important;
  max-height:40px!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:11px!important;
}

.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-composer-wrap{
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
  max-width:none!important;
}

.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-composer{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:40px!important;
  min-height:40px!important;
  max-height:120px!important;
  margin:0!important;
  padding:9px 12px!important;
  box-sizing:border-box!important;
  resize:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  line-height:1.35!important;
  border-radius:11px!important;
}

.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-recording-status{
  position:absolute!important;
  left:8px!important;
  bottom:calc(100% + 5px)!important;
  z-index:5!important;
}

.messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-emoji-picker{
  right:8px!important;
  bottom:54px!important;
  max-width:calc(100vw - 24px)!important;
}

/* WiaNova: intentionally untouched. Only generic safe sizing. */
.messages-shell .conv-chat-input[data-wianova="1"]{
  min-width:0!important;
}

@media (max-width:760px){
  .messages-shell .conv-chat-input:not([data-wianova="1"]){
    gap:6px!important;
    padding:7px!important;
  }
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-voice,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-attach,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-emoji-trigger,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-send{
    flex-basis:36px!important;
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    border-radius:10px!important;
  }
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-composer{
    height:36px!important;
    min-height:36px!important;
    padding:7px 10px!important;
    border-radius:10px!important;
    font-size:13px!important;
  }
}

@media (max-width:480px){
  .messages-shell .conv-chat-input:not([data-wianova="1"]){
    gap:5px!important;
    padding:6px!important;
  }
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-voice,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-attach,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-emoji-trigger,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-send{
    flex-basis:34px!important;
    width:34px!important;
    min-width:34px!important;
    max-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    border-radius:9px!important;
  }
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-composer{
    height:34px!important;
    min-height:34px!important;
    padding:6px 9px!important;
    font-size:12.5px!important;
    border-radius:9px!important;
  }
}

@media (max-width:380px){
  .messages-shell .conv-chat-input:not([data-wianova="1"]){
    gap:4px!important;
    padding:5px!important;
  }
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-voice,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-attach,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-emoji-trigger,
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-send{
    flex-basis:32px!important;
    width:32px!important;
    min-width:32px!important;
    max-width:32px!important;
    height:32px!important;
    min-height:32px!important;
    max-height:32px!important;
    border-radius:8px!important;
  }
  .messages-shell .conv-chat-input:not([data-wianova="1"]) .msg-composer{
    height:32px!important;
    min-height:32px!important;
    padding:5px 8px!important;
    font-size:12px!important;
    border-radius:8px!important;
  }
}
