/* ══════════════════════════════════════════════════════════
   Report / Search Page Styles
   ══════════════════════════════════════════════════════════ */

/* AI Chat UI */

/* Chat history scroll area */
#ai-chat-history {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
#ai-chat-history::-webkit-scrollbar { width: 4px; }
#ai-chat-history::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* Message row */
.ai-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: fadeUp 0.18s ease both;
}

.ai-msg--user {
  flex-direction: row-reverse;
}

.ai-msg__avatar {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  margin-top: 2px;
}

.ai-msg__bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  word-break: break-word;
}

.ai-msg--assistant .ai-msg__bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text);
}

.ai-msg--user .ai-msg__bubble {
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.25);
  border-bottom-right-radius: 4px;
  color: var(--text);
  text-align: left;
}

/* Suggestion chips */
.ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ai-suggestion {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 999px;
  color: #38bdf8;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ai-suggestion:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}

/* Composer focus ring & glow */
#ai-composer {
  background: var(--bg-card);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
  transition: all 0.25s ease;
}

#ai-composer:focus-within {
  border-color: rgba(6, 182, 212, 0.7);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.25);
}

/* Generated SQL Code Box */
.generated-sql-box {
  background: #09101d;
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: #38bdf8;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
  margin-top: 10px;
}

/* Execution Metrics Badge */
.metrics-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}

/* Typing indicator dots */
.ai-typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 2px 0;
}

.ai-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  animation: typingBounce 1.2s infinite ease-in-out;
}

.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-5px); opacity: 1; }
}