/* Chatbot Styles */
.chatbot-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  font-family: 'Inter', sans-serif;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #165C9F, #0a1628);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(22, 92, 159, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(22, 92, 159, 0.4);
}

.chat-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;
}

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

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

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

.chat-window {
  position: absolute;
  bottom: 80px;
  left: 0;
  width: 350px;
  height: 500px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e1e5e9;
}

.chat-window.active {
  display: flex;
  animation: slideUp 0.3s ease-out;
}

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

.chat-header {
  background: linear-gradient(135deg, #165C9F, #0a1628);
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-info h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chat-info p {
  margin: 0;
  font-size: 12px;
  opacity: 0.8;
}

.chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.chat-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8f9fa;
}

.message {
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.message.user {
  flex-direction: row-reverse;
}

.message-content {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.message.bot .message-content {
  background: white;
  color: #333;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message.user .message-content {
  background: #165C9F;
  color: white;
  border-bottom-right-radius: 4px;
}

.message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.message.bot .message-avatar {
  background: #165C9F;
  color: white;
}

.message.user .message-avatar {
  background: #e1e5e9;
  color: #666;
}

.typing-indicator {
  display: none;
  padding: 10px 16px;
  background: white;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.typing-dots {
  display: flex;
  gap: 4px;
}

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

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

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

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

.chat-input-container {
  padding: 15px 20px;
  background: white;
  border-top: 1px solid #e1e5e9;
}

.chat-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  border: 1px solid #e1e5e9;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 14px;
  resize: none;
  max-height: 100px;
  min-height: 40px;
  outline: none;
  transition: border-color 0.2s;
  font-family: 'Inter', sans-serif;
}

.chat-input:focus {
  border-color: #165C9F;
}

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

.chat-send:hover {
  background: #0a1628;
  transform: scale(1.05);
}

.chat-send:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.whatsapp-transfer {
  background: #25D366;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
  margin-top: 8px;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.whatsapp-transfer:hover {
  background: #20c157;
}

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

.quick-action {
  background: #f1f3f4;
  border: 1px solid #e1e5e9;
  border-radius: 15px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: #666;
}

.quick-action:hover {
  background: #165C9F;
  color: white;
  border-color: #165C9F;
}

/* Responsive design */
@media (max-width: 768px) {
  .chat-window {
    width: calc(100vw - 40px);
    max-width: 350px;
    height: 450px;
  }
  
  .chatbot-container {
    bottom: 15px;
    left: 15px;
  }
}

/* Notification dot */
.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
  background: #ff4757;
  border-radius: 50%;
  border: 2px solid white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}