/* Custom Chatbot Styles */

#chatbot-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

/* Chat Bubble */
#chatbot-bubble {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #000000 0%, #1f1f1f 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  color: #fff;
}

#chatbot-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

/* Chat Window */
#chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 600px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

#chatbot-window.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

/* Header */
.chatbot-header {
  background: linear-gradient(135deg, #000000 0%, #1f1f1f 100%);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 16px 16px 0 0;
}

.chatbot-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.chatbot-header .status {
  margin: 4px 0 0 0;
  font-size: 12px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

#chatbot-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#chatbot-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Messages Area */
#chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

#chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

#chatbot-messages::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

/* Message Bubbles */
.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.bot {
  background: #fff;
  color: #111827;
  align-self: flex-start;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.message.user {
  background: #000;
  color: #fff;
  align-self: flex-end;
  margin-left: auto;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 16px;
  align-self: flex-start;
  border: 1px solid #e5e7eb;
  max-width: 80px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #6b7280;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Quick Replies */
.chatbot-quick-replies {
  padding: 12px 20px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow-x: auto;
}

.chatbot-quick-replies:empty {
  display: none;
}

.quick-reply {
  background: #fff;
  border: 2px solid #000;
  color: #000;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.quick-reply:hover {
  background: #000;
  color: #fff;
}

/* Input Area */
.chatbot-input-container {
  display: flex;
  padding: 16px 20px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  gap: 12px;
  border-radius: 0 0 16px 16px;
}

#chatbot-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

#chatbot-input:focus {
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

#chatbot-send {
  width: 44px;
  height: 44px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#chatbot-send:hover {
  background: #1f1f1f;
  transform: scale(1.05);
}

#chatbot-send:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  transform: none;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  #chatbot-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }

  #chatbot-window {
    width: 100%;
    height: 500px;
    bottom: 75px;
  }

  #chatbot-bubble {
    width: 56px;
    height: 56px;
    position: fixed;
    bottom: 16px;
    right: 16px;
  }
}
