#ai-chat-container {
  position: fixed;
  right: 24px;
  bottom: 80px;
  z-index: 10000;
}

.ai-chat-toggle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #1A3A2A 0%, #2A4F3F 100%);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(26, 58, 42, 0.4);
  transition: all 0.3s ease;
  position: relative;
}

.ai-chat-toggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(26, 58, 42, 0.5);
}

.ai-chat-toggle::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: linear-gradient(135deg, #1A3A2A 0%, #2A4F3F 100%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ai-chat-toggle:hover::before {
  opacity: 0.3;
  animation: pulse 2s infinite;
}

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

.ai-chat-window {
  position: absolute;
  right: 0;
  bottom: 80px;
  width: 360px;
  max-height: 500px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ai-chat-window.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.ai-chat-header {
  background: linear-gradient(135deg, #1A3A2A 0%, #2A4F3F 100%);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.ai-chat-title {
  flex: 1;
}

.ai-chat-title h4 {
  margin: 0;
  font-size: 1rem;
  color: white;
  font-weight: 500;
}

.ai-chat-subtitle {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.ai-chat-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.ai-chat-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.ai-chat-messages {
  height: 360px;
  overflow-y: auto;
  padding: 16px;
  background: #f8f9fa;
}

.ai-chat-messages::-webkit-scrollbar {
  width: 6px;
}

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

.ai-chat-messages::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

.ai-message {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.ai-message-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #1A3A2A 0%, #2A4F3F 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.ai-message-content {
  background: white;
  padding: 12px 16px;
  border-radius: 12px;
  border-top-left-radius: 4px;
  max-width: 80%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ai-message-content p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.6;
}

.ai-message-content p:last-child {
  margin-bottom: 0;
}

.user-message {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.user-message-content {
  background: linear-gradient(135deg, #1A3A2A 0%, #2A4F3F 100%);
  padding: 12px 16px;
  border-radius: 12px;
  border-top-right-radius: 4px;
  max-width: 80%;
}

.user-message-content p {
  margin: 0;
  font-size: 0.9rem;
  color: white;
  line-height: 1.6;
}

.ai-chat-input-container {
  padding: 12px;
  background: white;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
}

.ai-chat-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.ai-chat-input:focus {
  border-color: #1A3A2A;
  box-shadow: 0 0 0 3px rgba(26, 58, 42, 0.1);
}

.ai-chat-input::placeholder {
  color: #999;
}

.ai-chat-send {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #1A3A2A 0%, #2A4F3F 100%);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.ai-chat-send:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(26, 58, 42, 0.3);
}

@media (max-width: 480px) {
  #ai-chat-container {
    right: 16px;
    bottom: 70px;
  }

  .ai-chat-toggle {
    width: 52px;
    height: 52px;
  }

  .ai-chat-window {
    width: calc(100vw - 48px);
    max-height: 450px;
  }

  .ai-chat-messages {
    height: 320px;
  }

  .ai-message-content,
  .user-message-content {
    max-width: 85%;
  }
}