/**
 * PantheraHive Knowledge Assistant Styles
 */

/* Floating assistant button */
.assistant-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  transition: all 0.3s ease;
  z-index: 9999;
}

.assistant-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.assistant-button.active {
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
}

.assistant-button i {
  color: white;
  font-size: 24px;
}

.assistant-label {
  position: absolute;
  right: 64px;
  background: white;
  color: #6366F1;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.assistant-button:hover .assistant-label {
  opacity: 1;
  transform: translateX(0);
}

/* Assistant chat window */
.assistant-chat {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 380px;
  max-height: 500px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  transition: all 0.3s ease;
}

.assistant-chat.hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
}

.assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #E5E7EB;
  background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
  border-radius: 16px 16px 0 0;
}

.assistant-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.assistant-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

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

/* Messages container */
.assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 350px;
}

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

.assistant-messages::-webkit-scrollbar-track {
  background: #F3F4F6;
  border-radius: 3px;
}

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

.assistant-messages::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Message bubbles */
.assistant-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  animation: messageSlide 0.3s ease;
}

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

.assistant-message.assistant-bot {
  background: #F3F4F6;
  color: #1F2937;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.assistant-message.assistant-user {
  background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.assistant-message.assistant-bot p {
  margin: 0;
}

.assistant-message.assistant-bot ul {
  margin: 8px 0;
  padding-left: 20px;
}

.assistant-message.assistant-bot li {
  margin: 4px 0;
}

/* Input area */
.assistant-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #E5E7EB;
  background: #F9FAFB;
  border-radius: 0 0 16px 16px;
}

.assistant-input textarea {
  flex: 1;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.assistant-input textarea:focus {
  border-color: #6366F1;
}

.assistant-input button {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.assistant-input button:hover {
  transform: scale(1.05);
}

.assistant-input button:active {
  transform: scale(0.95);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #9CA3AF;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

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

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-8px);
  }
}

/* Responsive */
@media (max-width: 480px) {
  .assistant-chat {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 80px;
  }
  
  .assistant-button {
    bottom: 16px;
    right: 16px;
  }
}
