@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');

#meu-chatbot-container {
  position: fixed !important;
  bottom: 20px;
  right: 20px;
  width: 85px;
  height: 85px;
  z-index: 2147483647 !important; 
  pointer-events: auto !important; 
}

#meu-chatbot-container * {
  pointer-events: auto !important;
}

#chatbot-ui {
  position: absolute;
  right: 0;
  bottom: 97px;
  margin-bottom: 0;
  pointer-events: auto !important; 
  z-index: 2147483647 !important; 
}
.eael-offcanvas-overlay,
.elementor-lightbox,
.dialog-widget,
#cookie-law-info-bar,
.cli-modal-backdrop {
  pointer-events: none;
}

/* --- ESTRUTURA E APARÊNCIA DA JANELA DO CHAT --- */

.containerChat {
  display: flex;
  flex-direction: column;
  width: 400px;
  height: 650px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  overflow: hidden;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
}

.title {
  background-color: #FF9F4A;
  color: black;
  padding: 12px;
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close_icon {
  width: 15px;
  height: 15px;
  position: absolute;
  right: 15px;
  cursor: pointer;
}

/* --- ÁREA DE MENSAGENS --- */

.messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-msg {
  max-width: 80%;
  padding: 10px 15px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-msg.user {
  background-color: #e1e1e1;
  color: black;
  align-self: flex-end;
  border-radius: 20px 20px 5px 20px;
}

.chat-msg.bot {
  background-color: #FF9F4A;
  color: black;
  align-self: flex-start;
  border-radius: 20px 20px 20px 5px;
}

.chat-msg a {
  color: #0056b3;
  text-decoration: underline;
}

.message-content {
  margin-bottom: 5px;
}

.message-timestamp {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.5);
  text-align: right;
  display: block;
}

.chat-msg.user .message-timestamp {
  color: rgba(0, 0, 0, 0.6);
}

/* --- ÁREA DE INPUT --- */

.input-wrapper {
  display: flex;
  align-items: center;
  padding: 10px;
  border-top: 1px solid #eee;
  background-color: #ffffff;
  position: relative;
}

.input {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
  height: auto;
}

.send-button {
  background-color: #FF9F4A;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  margin-left: 10px;
  font-weight: bold;
}

/* --- BOTÕES E ÍCONES --- */

.botao {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  width: 85px;
  height: 85px;
}

.icon-mel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 85px;
  height: 85px;
  object-fit: cover;
  cursor: pointer;
  transition: none;
}

.icon-mel:hover {
  transform: none;
}

.clear-button {
  position: absolute;
  top: -50px;
  right: 15px;
  background: #f0f0f0;
  color: #555;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.2s ease-in-out;
}

.clear-button:hover {
  background: #e0e0e0;
  transform: scale(1.1);
}

.trash-icon {
  width: 20px;
  height: 20px;
}

/* --- ANIMAÇÃO "DIGITANDO..." --- */

.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background-color: #666;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator .typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator .typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.3;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* --- AJUSTES PARA DISPOSITIVOS MÓVEIS --- */

@media (max-width: 600px) {
  #meu-chatbot-container {
    width: 65px;
    height: 65px;
    right: 10px;
    bottom: 10px;
  }

  .botao, .icon-mel {
    width: 65px;
    height: 65px;
  }

  #chatbot-ui.container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
  }

  .chat-msg {
    font-size: 15px;
  }

  .input {
    font-size: 15px;
  }
}