/* ABOUTME: Chat component styles for the easter egg chatbot. */
/* ABOUTME: Styles for messages, suggestions, and typing indicator inside the hero .ai-chat-card. */

/* ── Conversation area - hidden until activated ── */
.chat-conversation {
  display: none;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 0;
  max-height: 40vh;
}

.chat-active .chat-conversation {
  display: flex;
}

/* Hide the description text when chat is active */
.chat-active .ai-chat-desc {
  display: none;
}

/* ── Chat messages ── */
@keyframes chatBubbleIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  animation: chatBubbleIn 0.4s ease-out forwards;
}

.chat-message-user {
  align-self: flex-end;
  background: var(--primary, #ff6630);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-message-bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  border-bottom-left-radius: 4px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ── Bot avatar ── */
.chat-avatar {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary, #ff6630);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.chat-avatar svg {
  width: 14px;
  height: 14px;
}

/* ── Typing indicator ── */
.chat-typing .chat-message-text {
  display: flex;
  gap: 4px;
  padding: 4px 8px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  animation: typing-bounce 1.4s ease-in-out infinite;
}

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

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

@keyframes typing-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-5px);
  }
}

/* ── Suggestion pills ── */
.chat-suggestions {
  margin-top: 18px;
}

.chat-suggestion-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.chat-pill:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}


/* ── Scrollbar ── */
.chat-conversation::-webkit-scrollbar {
  width: 4px;
}

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

.chat-conversation::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.chat-conversation::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
