#chatbot-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3f9a9c 0%, #3c6a66 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(102, 219, 234, 0.6);
  z-index: 9999999;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
  border: none;
  outline: none;
  user-select: none;
  pointer-events: auto;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.6);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.8);
  }
}

#chatbot-button:hover {
  transform: scale(1.1);
  animation: none;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

#chatbot-widget {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 400px;
  max-width: calc(100vw - 60px);
  height: 600px;
  max-height: calc(100vh - 150px);
  z-index: 9999998;
  transition: all 0.3s ease;
}

#chatbot-widget.chatbot-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
}

.chatbot-container {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-header {
  background: linear-gradient(135deg, #66eaba 0%, #4b99a2 100%);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

.chatbot-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.chatbot-close:hover {
  background: rgba(255,255,255,0.3);
}

.chatbot-messages {
  position: relative; /* ✅ REQUIRED */
  flex: 1;

  background-image: url("../img/background-chat.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  padding: 15px;
  overflow-y: auto;
}


.chatbot-messages > * {
  position: relative;
  z-index: 1;
}


.chatbot-message {
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

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

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

.chatbot-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  overflow: hidden;   
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.chatbot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;             
  border-radius: 50%;            
}

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

.ai-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.ai-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* keeps icon from stretching */
  border-radius: 50%; /* optional: makes it circular */
}


.chatbot-message.user .chatbot-avatar {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.chatbot-content {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 15px;
  line-height: 1.5;
  font-size: 14px;
  white-space: pre-wrap;
}

.chatbot-message.bot .chatbot-content {
  background: white;
  color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chatbot-message.user .chatbot-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.suggestion-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-left: 45px;
}

.suggestion-chip {
  padding: 6px 12px;
  background: white;
  color: #0e2234;
  border: 2px solid #e0e0e0;
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.suggestion-chip:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
  transform: translateY(-2px);
}

.chatbot-typing {
  display: none;
  padding: 10px 20px;
  margin-left: 45px;
}

.chatbot-typing.active {
  display: block;
}

.typing-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #667eea;
  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% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-8px);
  }
}

.chatbot-input-area {
  padding: 15px 20px;
  background: white;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 10px;
}

.chatbot-input {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s;
}

.chatbot-input:focus {
  outline: none;
  border-color: #667eea;
}

.chatbot-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

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

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
  #chatbot-widget {
    width: calc(100vw - 40px);
    height: calc(100vh - 120px);
    right: 20px;
    bottom: 90px;
  }
  
  #chatbot-button {
    right: 20px;
    bottom: 20px;
  }
}