:root {
  --chat-bg: #ffffff;
  --chat-text: #000000;
  --chat-header-bg: #007bff;
  --chat-user-bubble: #f1f1f1;
  --chat-bot-bubble: #e0e0ff;
}

body.dark-mode {
  --chat-bg: #1e1e1e;
  --chat-text: #f0f0f0;
  --chat-header-bg: #004b9a;
  --chat-user-bubble: #2c2c2c;
  --chat-bot-bubble: #1a2a44;
}

#chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

#abrir-chatbot {
  background-color: var(--chat-header-bg);
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

#chatbot {
  display: flex;
  flex-direction: column;
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 300px;
  height: 400px;
  background: var(--chat-bg);
  color: var(--chat-text);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  overflow: hidden;
  transform: translatex(0);
  font-family: 'Segoe UI', sans-serif;
  z-index: 4000;
  transition: all 0.32s ease-in-out;
}

#chatbot.chatbot-fechado {
  transform: translatex(120%);
}

#chat-header {
  background-color: var(--chat-header-bg);
  color: var(--chat-text);
  padding: 10px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}

#chat-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 14px;
}

#chat-messages div.user {
  background-color: var(--chat-user-bubble);
  color: var(--chat-text);
  border-radius: 10px;
  padding: 6px 10px;
  margin-bottom: 8px;
  max-width: 85%;
}

#chat-messages div.bot {
  background-color: var(--chat-bot-bubble);
  color: var(--chat-text);
  border-radius: 10px;
  padding: 6px 10px;
  margin-bottom: 8px;
  max-width: 85%;
}

#chat-input-area {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ccc;
  background: var(--chat-bg);
}

#chat-input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  background: var(--chat-bg);
  color: var(--chat-text);
}

#enviar-msg {
  background: var(--chat-header-bg);
  border: none;
  color: white;
  padding: 8px;
  margin-left: 5px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#fechar-chat {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

/* 📱 Responsividade para smartphones */
@media (max-width: 480px) {
  #chatbot {
    width: 80vw;
    height: 55vh;
    right: 5vw;
    bottom: 80px;
    border-radius: 10px;
  }

  #chat-header {
    font-size: 15px;
    padding: 10px;
  }

  #chat-messages {
    font-size: 13px;
    padding: 8px;
  }

  #chat-input {
    font-size: 14px;
  }

  #enviar-msg {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }
}
#voz-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  margin-left: 8px;
  color: #555;
}

#voz-btn:hover {
  color: #000;
}
/* Cor dos ícones de microfone */
#voz-btn i {
  color: #000;
}

/* Cor branca no modo escuro */
body.dark-mode #voz-btn i {
  color: #fff;
}
