/* Enhanced AI assistant chat widget with modern animations */
#assistant-chat-button {
  position: fixed;
  bottom: 100px;
  right: 20px;
  background: linear-gradient(135deg, var(--accent, #004225), var(--accent2, #008751));
  color: #fff;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 
    0 8px 32px -8px rgba(0,135,81,0.4),
    0 0 20px rgba(0,135,81,0.2);
  z-index: 99999;
  font-size: 28px;
  border: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: chatPulse 3s infinite ease-in-out;
}

#assistant-chat-button::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  background: #ff4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: white;
  animation: notificationPulse 2s infinite;
  content: '!';
}

#assistant-chat-button.read::after {
  display: none;
}

@keyframes notificationPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

#assistant-chat-button:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 
    0 12px 40px -8px rgba(0,135,81,0.6),
    0 0 30px rgba(0,135,81,0.4);
}

#assistant-chat-button.active {
  background: linear-gradient(135deg, var(--accent2, #008751), var(--accent, #004225));
  animation: none;
}

@keyframes chatPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 
      0 8px 32px -8px rgba(0,135,81,0.4),
      0 0 20px rgba(0,135,81,0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 
      0 12px 40px -8px rgba(0,135,81,0.6),
      0 0 30px rgba(0,135,81,0.4);
  }
}

#assistant-chat-window {
  position: fixed;
  bottom: 180px;
  right: 20px;
  width: 360px;
  max-height: 500px;
  background: rgba(17,20,25,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,135,81,0.3);
  border-radius: 20px;
  box-shadow: 
    0 20px 60px -10px rgba(0,0,0,0.4),
    0 0 40px rgba(0,135,81,0.1);
  display: none;
  flex-direction: column;
  z-index: 99999;
  transform: translateY(20px) scale(0.9);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#assistant-chat-window.show {
  display: flex;
  transform: translateY(0) scale(1);
  opacity: 1;
}

#assistant-chat-header {
  background: linear-gradient(135deg, var(--accent, #004225), var(--accent2, #008751));
  color: #ffffff;
  padding: 16px 20px;
  border-radius: 20px 20px 0 0;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

#assistant-chat-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: headerShine 3s infinite;
}

@keyframes headerShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

#assistant-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-size: 14px;
  color: #f2f5f7;
  max-height: 300px;
  background: rgba(10,11,13,0.3);
}
}

#assistant-chat-input-container {
  display: flex;
  padding: 16px;
  border-top: 1px solid rgba(0,135,81,0.2);
  background: rgba(10,11,13,0.5);
  border-radius: 0 0 20px 20px;
}

#assistant-chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(0,135,81,0.3);
  border-radius: 25px;
  outline: none;
  font-size: 14px;
  background: rgba(255,255,255,0.05);
  color: #f2f5f7;
  transition: all 0.3s ease;
}

#assistant-chat-input:focus {
  border-color: var(--accent2, #008751);
  box-shadow: 0 0 0 3px rgba(0,135,81,0.2);
  background: rgba(255,255,255,0.08);
}

#assistant-chat-input::placeholder {
  color: rgba(242,245,247,0.6);
}

#assistant-chat-send {
  margin-left: 8px;
  padding: 12px 20px;
  border: none;
  background: linear-gradient(135deg, var(--accent, #004225), var(--accent2, #008751));
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: 600;
}

#assistant-chat-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0,135,81,0.4);
}

#assistant-chat-send:active {
  transform: translateY(0);
}

.assistant-message {
  background: linear-gradient(135deg, rgba(0,135,81,0.2), rgba(0,66,37,0.3));
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: 18px 18px 18px 4px;
  color: #f2f5f7;
  border: 1px solid rgba(0,135,81,0.3);
  animation: messageSlideIn 0.3s ease-out;
  max-width: 85%;
}

.user-message {
  background: linear-gradient(135deg, var(--accent2, #008751), var(--accent, #004225));
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: 18px 18px 4px 18px;
  text-align: right;
  color: #ffffff;
  margin-left: auto;
  animation: messageSlideIn 0.3s ease-out;
  max-width: 85%;
}

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

.typing-indicator {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  margin: 8px 0;
  background: rgba(0,135,81,0.1);
  border-radius: 18px 18px 18px 4px;
  max-width: 85%;
}

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

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--accent2, #008751);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

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

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Welcome message */
.welcome-message {
  text-align: center;
  padding: 20px;
  color: rgba(242,245,247,0.7);
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  #assistant-chat-window {
    width: calc(100vw - 40px);
    right: 20px;
    left: 20px;
  }
}
