/* Kubera Astro - AI Chatbot & Hybrid Consultant Styles */
.ai-consultant-card {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ai-chip-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-chip-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold-bright);
}

/* Chat Thread Conversation Stream */
.ai-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 480px;
  overflow-y: auto;
  padding: 1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .ai-chat-thread {
  background: #f8fafc;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

/* Chat Bubble Base */
.ai-bubble {
  max-width: 86%;
  padding: 0.85rem 1.15rem;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.6;
  position: relative;
  word-wrap: break-word;
}

/* User Message Bubble */
.ai-bubble-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #070a14;
  font-weight: 700;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

/* Assistant AI Bubble */
.ai-bubble-bot {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1.5px solid var(--border-glow);
  color: #ffffff;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .ai-bubble-bot {
  background: #ffffff;
  border: 1.5px solid rgba(217, 119, 6, 0.4);
  color: #0f172a;
}

.ai-bubble-bot strong {
  color: #fbbf24;
}

[data-theme="light"] .ai-bubble-bot strong {
  color: #b45309;
}

.ai-bubble-meta {
  font-size: 0.68rem;
  font-weight: 700;
  margin-top: 0.4rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Chat Input Bar */
.ai-chat-input-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  position: relative;
}

.ai-chat-btn-submit {
  background: #f59e0b !important;
  color: #070a14 !important;
  border: 1.5px solid #d97706;
  font-weight: 900;
  font-size: 0.95rem;
  padding: 0.75rem 1.45rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
  text-shadow: none;
}

/* AI Thinking Indicator */
.ai-thinking-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fbbf24;
  font-weight: 600;
  font-size: 0.9rem;
}
.ai-thinking-dots {
  display: inline-flex;
  gap: 4px;
}
.ai-thinking-dots span {
  width: 6px;
  height: 6px;
  background: #f59e0b;
  border-radius: 50%;
  animation: aiPulse 1.2s infinite ease-in-out both;
}
.ai-thinking-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-thinking-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes aiPulse {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 640px) {
  .ai-bubble {
    max-width: 94%;
  }
  .ai-chat-btn-submit {
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
  }
}
