/* ========================================
   CHATBOT MODERNO - BEATRIZ CRISTINA
======================================== */

.chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: 'Roboto', sans-serif;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: none;
  box-shadow: var(--shadow-medium);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.chatbot-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.chatbot-toggle:hover::before {
  left: 100%;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-heavy);
}

.chatbot-toggle .chatbot-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid white;
  transition: transform 0.3s ease;
  object-fit: cover;
}

.chatbot-toggle i {
  font-size: 24px;
  color: white;
  transition: transform 0.3s ease;
  display: none;
}

.chatbot-toggle.no-avatar i {
  display: block;
}

.chatbot-toggle.active .chatbot-avatar {
  transform: rotate(45deg) scale(0.8);
}

.chatbot-toggle.active i {
  transform: rotate(45deg);
}

.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: var(--shadow-heavy);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

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

.chatbot-header {
  background: var(--accent-gradient);
  padding: 20px;
  color: white;
  text-align: center;
  position: relative;
}

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

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

.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chatbot-messages::-webkit-scrollbar {
  width: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 2px;
}

.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  animation: fadeInMessage 0.3s ease-out;
}

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

.message.bot {
  background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message.user {
  background: var(--accent-gradient);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chatbot-input-container {
  padding: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 10px;
}

.chatbot-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid transparent;
  border-radius: 25px;
  background: rgba(0, 0, 0, 0.05);
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

.chatbot-input:focus {
  border-color: var(--accent-color);
  background: rgba(0, 0, 0, 0.02);
}

.chatbot-send {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.chatbot-send:hover {
  transform: scale(1.1);
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  max-width: 80px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-color);
  border-radius: 50%;
  animation: typingAnimation 1.4s infinite;
}

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

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

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

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick-reply {
  padding: 8px 12px;
  background: rgba(197, 169, 146, 0.1);
  border: 1px solid var(--accent-color);
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--accent-color);
}

.quick-reply:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .chatbot-window {
    width: 300px;
    height: 450px;
  }
  
  .chatbot-container {
    bottom: 15px;
    right: 15px;
  }
}

/* Notificação de nova mensagem */
.chatbot-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background: #ff4757;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
  font-weight: bold;
  animation: pulse 2s infinite;
}

/* Status online */
.online-status {
  position: absolute;
  top: 15px;
  right: 50px;
  width: 10px;
  height: 10px;
  background: #2ed573;
  border-radius: 50%;
  border: 2px solid white;
}

.chatbot-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}