"use client";

const CHAT_URL = "https://chatwoot.hackrobot.cn/livechat?user_id=hackrobot";

export function ChatFloatButton() {
  return (
    <a
      href={CHAT_URL}
      target="_blank"
      rel="noopener noreferrer"
      className="animate__animated animate__bounceIn fixed bottom-6 right-6 z-40 flex h-12 w-12 items-center justify-center rounded-full bg-[var(--accent)] text-[var(--accent-foreground)] shadow-lg shadow-[var(--accent)]/30 transition-all hover:scale-110 hover:shadow-xl hover:shadow-[var(--accent)]/40"
      style={{ animationDelay: "0.5s", animationFillMode: "both" }}
      aria-label="即时问答"
    >
      <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
        <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
      </svg>
    </a>
  );
}
