#chatToggle {
  position: fixed;
  bottom: 100px; 
  right: 20px;
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  color: #198754;         /* Cor equivalente a text-success do Bootstrap */
  background-color: transparent;  /* Fundo transparente */
  font-size: 3rem;        /* Tamanho da fonte aumentado */
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1000;
  box-shadow: none;
}

#chatToggle:active {
  transform: scale(1);
}

#chatWidget {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 360px;
  max-height: 520px;
  background: #ffffff;
  backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

#chatWidget.open {
  display: flex;
}

.chat-header {
  background: #ffffff;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ebedf0;
}

.chat-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1c1e21;
  letter-spacing: -0.2px;
}

#closeChat {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: #65676b;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

#closeChat:hover {
  background: #f0f2f5;
  color: #dc3545;
}

.chat-messages {
  padding: 18px 16px;
  flex-grow: 1;
  overflow-y: auto;
  background: #fafbfc;
  scroll-behavior: smooth;
}

.message {
  max-width: 78%;
  padding: 13px 18px;
  margin-bottom: 14px;
  border-radius: 22px;
  word-wrap: break-word;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-message {
  background: #0d6efd;
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 6px;
}

.bot-message {
  background: #ebedf0;
  color: #1c1e21;
  margin-right: auto;
  border-bottom-left-radius: 6px;
}

.typing-indicator {
  display: none;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  margin: 0 16px 14px 16px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background-color: #a8a8a8;
  border-radius: 50%;
  opacity: 0.7;
  animation: typingBlink 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBlink {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

/* Área de input */
.chat-input-area {
  display: flex;
  padding: 14px 16px;
  background: #ffffff;
  border-top: 1px solid #ebedf0;
}

.chat-input-area input {
  flex: 1;
  border: none;
  border-radius: 28px;
  padding: 12px 20px;
  font-size: 1rem;
  background: #f0f2f5;
  color: #1c1e21;
  outline: none;
  transition: background 0.25s, box-shadow 0.25s;
}

.chat-input-area input::placeholder {
  color: #8a8d91;
}

.chat-input-area input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.2);
}

.chat-input-area button {
  width: 44px;
  height: 44px;
  margin-left: 12px;
  border: none;
  border-radius: 50%;
  background: #0d6efd;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s;
}

.chat-input-area button:hover {
  background: #0b5ed7;
  transform: scale(1.05);
}

.chat-input-area button:active {
  transform: scale(0.98);
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background-color: #c8ccd0;
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background-color: #a8acb0;
}

@media (max-width: 400px) {
  #chatWidget {
    width: calc(100% - 32px);
    right: 16px;
    bottom: 80px;
    max-height: 80vh;
  }

  .message {
    max-width: 85%;
  }
}