/* Home mobile — botão flutuante de chat mais legível e intuitivo. */
body.mobile-home-mode .portal-chat{
  right:14px !important;
  bottom:14px !important;
}

body.mobile-home-mode .portal-chat-launcher{
  position:relative !important;
  width:auto !important;
  min-width:154px !important;
  height:76px !important;
  min-height:76px !important;
  padding:0 24px 0 20px !important;
  border-radius:999px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:11px !important;
  font-size:0 !important;
  box-shadow:0 12px 28px rgba(10,71,125,.24) !important;
}

body.mobile-home-mode .portal-chat-launcher::before{
  content:none !important;
}

body.mobile-home-mode .portal-chat-launcher .chat-launcher-text{
  display:inline-block !important;
  font-size:25px !important;
  font-weight:900 !important;
  line-height:1 !important;
  letter-spacing:-.01em !important;
  color:inherit !important;
}

body.mobile-home-mode .portal-chat-launcher .chat-online-dot{
  position:absolute !important;
  right:8px !important;
  bottom:7px !important;
  width:15px !important;
  height:15px !important;
  border:2px solid #1498c2 !important;
}

body.mobile-home-mode .portal-chat-count.visible{
  position:absolute !important;
  top:-6px !important;
  right:-5px !important;
  min-width:27px !important;
  height:27px !important;
  padding:0 7px !important;
  display:grid !important;
  place-items:center !important;
  font-size:14px !important;
  font-weight:900 !important;
}

/* Ao abrir, o launcher desaparece de verdade. */
body.mobile-home-mode .portal-chat.open .portal-chat-launcher{
  display:none !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

/* Chat aberto: janela flutuante grande, sem ocupar a tela inteira. */
body.mobile-home-mode .portal-chat.open .portal-chat-panel{
  position:fixed !important;
  top:auto !important;
  right:14px !important;
  bottom:14px !important;
  left:auto !important;
  width:min(88vw,520px) !important;
  max-width:calc(100vw - 28px) !important;
  height:min(66dvh,680px) !important;
  max-height:calc(100dvh - 110px) !important;
  border-radius:24px !important;
  border:1px solid #bfd5e7 !important;
  overflow:hidden !important;
  box-shadow:0 24px 70px rgba(7,40,72,.34) !important;
  z-index:14000 !important;
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr) !important;
}

body.mobile-home-mode .portal-chat-header{
  min-height:78px !important;
  padding:13px 15px !important;
  gap:12px !important;
}

body.mobile-home-mode .portal-chat-header-main strong{
  font-size:21px !important;
  line-height:1.15 !important;
  font-weight:900 !important;
}

body.mobile-home-mode .portal-chat-header-main span{
  margin-top:3px !important;
  font-size:15px !important;
  line-height:1.3 !important;
}

body.mobile-home-mode .portal-chat-icon-button{
  width:46px !important;
  height:46px !important;
  min-width:46px !important;
  border-radius:13px !important;
  font-size:21px !important;
}

body.mobile-home-mode .portal-chat-body,
body.mobile-home-mode .portal-chat-view,
body.mobile-home-mode .portal-chat-list,
body.mobile-home-mode .portal-chat-messages{
  min-height:0 !important;
}

body.mobile-home-mode .portal-chat-search-wrap{
  padding:13px !important;
}

body.mobile-home-mode .portal-chat-search{
  min-height:54px !important;
  padding:12px 14px !important;
  border-radius:14px !important;
  font-size:18px !important;
}

body.mobile-home-mode .portal-chat-list{
  padding:7px !important;
}

body.mobile-home-mode .portal-chat-contact{
  min-height:82px !important;
  padding:11px 10px !important;
  grid-template-columns:54px minmax(0,1fr) auto !important;
  gap:11px !important;
  border-radius:16px !important;
}

body.mobile-home-mode .portal-chat-avatar{
  width:54px !important;
  height:54px !important;
  font-size:16px !important;
}

body.mobile-home-mode .portal-chat-contact-main strong{
  font-size:18px !important;
  line-height:1.2 !important;
}

body.mobile-home-mode .portal-chat-contact-main small{
  margin-top:3px !important;
  font-size:14px !important;
  line-height:1.25 !important;
}

body.mobile-home-mode .portal-chat-presence{
  margin-top:5px !important;
  gap:6px !important;
  font-size:13px !important;
}

body.mobile-home-mode .portal-chat-presence-dot{
  width:9px !important;
  height:9px !important;
}

body.mobile-home-mode .portal-chat-unread{
  min-width:28px !important;
  height:28px !important;
  padding:0 7px !important;
  font-size:13px !important;
}

body.mobile-home-mode .portal-chat-empty{
  padding:30px 18px !important;
  font-size:18px !important;
  line-height:1.5 !important;
}

/* Conversa aberta. */
body.mobile-home-mode .portal-chat-messages{
  padding:15px !important;
  gap:10px !important;
}

body.mobile-home-mode .portal-chat-message{
  max-width:88% !important;
  padding:12px 14px !important;
  border-radius:17px !important;
  font-size:17px !important;
  line-height:1.46 !important;
}

body.mobile-home-mode .portal-chat-message-time{
  margin-top:5px !important;
  font-size:12px !important;
}

body.mobile-home-mode .portal-chat-compose{
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:9px !important;
  padding:11px !important;
}

body.mobile-home-mode .portal-chat-input{
  min-height:54px !important;
  max-height:130px !important;
  padding:12px 13px !important;
  border-radius:14px !important;
  font-size:17px !important;
  line-height:1.4 !important;
}

body.mobile-home-mode .portal-chat-send{
  min-width:80px !important;
  min-height:54px !important;
  padding:0 15px !important;
  border-radius:14px !important;
  font-size:16px !important;
}

body.mobile-home-mode .portal-chat-note{
  padding:9px 12px !important;
  font-size:13px !important;
  line-height:1.4 !important;
}

body.mobile-home-mode .portal-chat-notification-card{
  margin-top:10px !important;
  padding:12px !important;
  border-radius:14px !important;
}

body.mobile-home-mode .portal-chat-notification-card strong{
  font-size:15px !important;
}

body.mobile-home-mode .portal-chat-notification-card span{
  font-size:13px !important;
  line-height:1.4 !important;
}

body.mobile-home-mode .portal-chat-notification-card button{
  min-height:42px !important;
  padding:9px 12px !important;
  font-size:13px !important;
}

@media(max-width:390px){
  body.mobile-home-mode .portal-chat-launcher{
    min-width:142px !important;
    height:70px !important;
    min-height:70px !important;
    padding-left:18px !important;
    padding-right:22px !important;
    gap:9px !important;
  }

  body.mobile-home-mode .portal-chat-launcher::before{
    font-size:29px !important;
  }

  body.mobile-home-mode .portal-chat-launcher .chat-launcher-text{
    font-size:23px !important;
  }

  body.mobile-home-mode .portal-chat.open .portal-chat-panel{
    right:10px !important;
    bottom:10px !important;
    width:calc(100vw - 20px) !important;
    max-width:none !important;
    height:min(68dvh,640px) !important;
    max-height:calc(100dvh - 96px) !important;
    border-radius:20px !important;
  }

  body.mobile-home-mode .portal-chat-header-main strong{
    font-size:20px !important;
  }

  body.mobile-home-mode .portal-chat-contact-main strong{
    font-size:17px !important;
  }

  body.mobile-home-mode .portal-chat-contact-main small{
    font-size:14px !important;
  }
}
