  /* BOTÃO FLUTUANTE */
#mb-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(0,0,0,.3);
  z-index: 99999 !important;
}

/* CHAT INICIALMENTE FECHADO */
#mb-chat {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#mb-chat.open {
  opacity: 1;
  pointer-events: all;
}

/* BOTÃO FECHAR */
#mb-close {
  position: absolute;
  right: 10px;
  top: 5px;
  cursor: pointer;
  font-size: 18px;
}

#mb-chat {
  position: fixed;
  bottom: 20px;
  right: 20px;

  width: 340px;
  height: 520px;

  min-width: 340px;
  max-width: 340px;

  min-height: 520px;
  max-height: 520px;

  background: #e5ddd5;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  font-family: Arial;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);

  z-index: 99999 !important;
}

#mb-header {
  background: #075E54;
  color: white;
  padding: 12px;
  font-weight: bold;
}

#mb-body {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#mb-input {
  display: flex;
  padding: 10px;
  background: #f0f0f0;
}

#mb-input input {
  flex: 1;
  padding: 8px;
  border-radius: 20px;
  border: none;
  outline: none;
}

#mb-input button {
  display: flex !important;               /* ativa flexbox */
  align-items: center !important;         /* centraliza verticalmente */
  justify-content: center !important;     /* centraliza horizontalmente */

  width: 45px !important;                 /* largura fixa */
  height: 45px !important;                /* altura igual à largura */
  border-radius: 50%;          /* deixa redondo */

  margin-left: 8px;
  border: none;
  background: #25D366;         /* verde WhatsApp */
  color: white;
  font-size: 20px !important;             /* tamanho do ícone ➤ */
  line-height: 1;              /* evita desajuste vertical */
  cursor: pointer;
  flex-shrink: 0;              /* impede que seja comprimido */
}


.msg {
  max-width: 80%;
  padding: 8px;
  border-radius: 10px;
  margin: 6px 0;
}
.bot {
  background: white;
}
.user {
  background: #dcf8c6;
  margin-left: auto;
}

.btn {
  background: white;
  padding: 8px;
  border-radius: 10px;
  margin: 5px 0;
  cursor: pointer;
}

/* 📱 MOBILE */
@media (max-width: 480px) {

  #mb-chat {
    position: fixed !important;

    top: 0 !important;
    left: 0 !important;

    width: 100vw !important;
    height: 100dvh !important;

    max-width: 100vw !important;
    min-width: 100vw !important;

    max-height: 100dvh !important;
    min-height: 100dvh !important;

    margin: 0 !important;
    border-radius: 0 !important;

    z-index: 999999;
  }

body.chat-open {
    overflow: hidden;
}

body.elementor-page #mb-chat {
  right: 0 !important;
  bottom: 0 !important;
}

#mb-input {
  position: relative;
  flex-shrink: 0;
}

#mb-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom);
}

}