/* Estilos do Chatbot SOS Limpa Tudo com IA */

#chatbot-container {
  font-family: 'Roboto', sans-serif;
}

/* Widget do Chatbot */
.chatbot-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: 'Roboto', sans-serif;
}

/* Botão Flutuante */
.chatbot-toggle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #29cc61 0%, #1fa74a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(41, 204, 97, 0.4);
  transition: all 0.3s ease;
  color: white;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(41, 204, 97, 0.6);
}

.chatbot-toggle.hidden {
  display: none;
}

/* Janela do Chat */
.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 500px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.chatbot-window.hidden {
  display: none;
}

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

/* Header do Chat */
.chatbot-header {
  background: linear-gradient(135deg, #29cc61 0%, #1fa74a 100%);
  color: white;
  padding: 16px;
  position: relative;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.chatbot-header p {
  margin: 4px 0 0 0;
  font-size: 12px;
  opacity: 0.9;
}

.chatbot-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.chatbot-close:hover {
  transform: rotate(90deg);
}

/* Área de Mensagens */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chatbot-message {
  display: flex;
  margin-bottom: 8px;
  animation: fadeIn 0.3s ease;
}

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

.chatbot-message.user {
  justify-content: flex-end;
}

.chatbot-message.bot {
  justify-content: flex-start;
}

.chatbot-message p {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 80%;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.4;
}

.chatbot-message.user p {
  background: #29cc61;
  color: white;
  border-bottom-right-radius: 4px;
}

.chatbot-message.bot p {
  background: white;
  color: #333;
  border: 1px solid #e0e0e0;
  border-bottom-left-radius: 4px;
}

/* Indicador de Digitação */
.typing-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #999;
  margin: 0 2px;
  animation: typing 1.4s infinite;
}

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

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    opacity: 0.5;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-10px);
  }
}

/* Área de Input */
.chatbot-input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: white;
  border-top: 1px solid #e0e0e0;
}

#chatbot-input {
  flex: 1;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

#chatbot-input:focus {
  border-color: #29cc61;
}

#chatbot-input::placeholder {
  color: #999;
}

.chatbot-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #29cc61;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.chatbot-send:hover {
  background: #1fa74a;
  transform: scale(1.05);
}

.chatbot-send:active {
  transform: scale(0.95);
}

.chatbot-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsivo */
@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 40px);
    height: 60vh;
    bottom: 70px;
    right: 20px;
  }

  .chatbot-message p {
    max-width: 90%;
  }
}

/* Scroll customizado */
.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #29cc61;
  border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: #1fa74a;
}
