/* ============================================
   UNITY CHATBOT WIDGET - OLIVE GREEN & GOLD THEME
   ============================================ */

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

/* Chat button (when closed) */
.chatbot-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6B8E23 0%, #7FA030 100%);
  border: none;
  color: #F5F1E8;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.chatbot-toggle-btn:hover {
  background: linear-gradient(135deg, #7FA030 0%, #93B33D 100%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

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

/* Chat window (when open) */
.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  max-height: 600px;
  background: #F5F1E8;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

.chatbot-window.open {
  display: flex;
}

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

/* Chat header */
.chatbot-header {
  background: linear-gradient(135deg, #6B8E23 0%, #7FA030 100%);
  color: #F5F1E8;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #C5A55A;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
}

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

.chatbot-close-btn {
  background: none;
  border: none;
  color: #F5F1E8;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.chatbot-close-btn:hover {
  opacity: 1;
}

/* Messages container */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FAF8F3;
}

/* Message styles */
.chatbot-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: messageAppear 0.3s ease-out;
}

@keyframes messageAppear {
  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;
}

/* Message bubble */
.chatbot-bubble {
  max-width: 80%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.chatbot-message.user .chatbot-bubble {
  background: #6B8E23;
  color: #F5F1E8;
  border-bottom-right-radius: 4px;
}

.chatbot-message.bot .chatbot-bubble {
  background: #FFFFFF;
  color: #2d3748;
  border: 1px solid #E0DDD3;
  border-bottom-left-radius: 4px;
}

.chatbot-message.bot .chatbot-bubble a {
  color: #6B8E23;
  text-decoration: underline;
}

/* Typing indicator */
.chatbot-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 1px solid #E0DDD3;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
}

.chatbot-typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6B8E23;
  animation: typing 1.4s infinite;
}

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

.chatbot-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(-8px);
  }
}

/* Input area */
.chatbot-input-area {
  padding: 12px;
  border-top: 1px solid #E0DDD3;
  background: #F5F1E8;
  display: flex;
  gap: 8px;
}

.chatbot-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #C5A55A;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  background: #FFFFFF;
  color: #2d3748;
  resize: none;
  max-height: 100px;
}

.chatbot-input:focus {
  outline: none;
  border-color: #6B8E23;
  box-shadow: 0 0 0 3px rgba(107, 142, 35, 0.1);
}

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

.chatbot-send-btn {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #6B8E23 0%, #7FA030 100%);
  border: none;
  border-radius: 6px;
  color: #F5F1E8;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
}

.chatbot-send-btn:hover {
  background: linear-gradient(135deg, #7FA030 0%, #93B33D 100%);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(107, 142, 35, 0.2);
}

.chatbot-send-btn:active {
  transform: translateY(0);
}

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

/* Empty state */
.chatbot-empty-state {
  text-align: center;
  padding: 24px;
  color: #666;
}

.chatbot-empty-state-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.chatbot-empty-state h4 {
  margin: 8px 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
}

.chatbot-empty-state p {
  font-size: 12px;
  margin: 0;
  color: #999;
}

/* Responsive */
@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 40px);
    max-height: calc(100vh - 100px);
    right: auto;
    left: 20px;
    bottom: 80px;
  }

  .chatbot-toggle-btn {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  .chatbot-message {
    max-width: 100%;
  }

  .chatbot-bubble {
    max-width: 90%;
  }
}

/* Scrollbar styling */
.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #D4B896;
  border-radius: 3px;
}

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