/* ai.css — Prompt bar AI states, flash messages, loading */

/* ── Busy state: pulse border on chatbox ──────────── */
#chatbox.ai-busy {
  border-color: #2563eb;
  animation: ai-pulse 1.2s ease-in-out infinite;
}

@keyframes ai-pulse {
  0%, 100% { border-color: #2563eb; box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.25); }
  50%      { border-color: #60a5fa; box-shadow: 0 0 12px 2px rgba(37, 99, 235, 0.10); }
}

/* ── Send button inside chatbox ───────────────────── */
#btn-send {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #555;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
  margin-left: 4px;
  cursor: pointer;
  border: none;
}

#btn-send:hover {
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.10);
}

#chatbox.ai-busy #btn-send {
  pointer-events: none;
  opacity: 0.4;
}

/* ── Flash message (above chatbox) ────────────────── */
.ai-flash {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #252525;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 12px;
  color: #aaa;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1001;
  white-space: nowrap;
}

.ai-flash.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ai-flash.error {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

/* ── Widen chatbox for better prompt entry ────────── */
#chatbox {
  width: 560px;
}
