/* ═══ CHAT WIDGET (BOT) ══════════════════════════════════════════════════
   .bot-fab, .bot-cta-hint, .bot-chat, .bot-hdr, .bot-title, .bot-dot,
   .bot-chat-area, .bot-msgs, .bot-msg-*, .bot-bubble-*,
   .typing-dots, .bot-input-row, .bot-inp, .bot-send-btn, .bot-chips
   ═══════════════════════════════════════════════════════════════════════════ */
.bot-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #0a0a10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(124, 147, 195, 0.35);
  z-index: 200;
  transition:
    transform 0.3s var(--ease),
    opacity 0.3s var(--ease),
    box-shadow 0.3s;
  will-change: transform, opacity;
  border: none;
  cursor: pointer;
}
.bot-fab:hover {
  transform: scale(1.07);
  box-shadow: 0 8px 32px rgba(124, 147, 195, 0.45);
}
.bot-fab svg {
  width: 22px;
  height: 22px;
}
.bot-fab.hidden {
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}
.bot-cta-hint {
  position: fixed;
  bottom: 92px;
  right: 28px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  z-index: 199;
  width: 210px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.4s var(--ease),
    opacity 0.4s var(--ease);
}
.bot-cta-hint.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.bot-cta-hint-txt {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 10px;
}
.bot-cta-hint-arr {
  color: var(--accent);
}
.bot-cta-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text3);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s;
  font-family: var(--mono);
}
.bot-cta-close:hover {
  color: var(--text);
}

/* ── Chat Window ───────────────────────────────────────────────────────── */
.bot-chat {
  position: fixed;
  bottom: 92px;
  right: 28px;
  width: 400px;
  height: 600px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.55);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 0.35s var(--ease);
  will-change: transform, opacity;
}
.bot-chat.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* ── Glassmorphism Header ──────────────────────────────────────────────── */
.bot-hdr {
  padding: 0 14px;
  height: 56px;
  background: rgba(17, 18, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.bot-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}
.bot-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2.2s ease-in-out infinite;
  flex-shrink: 0;
}
.bot-hdr-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.bot-hdr-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    color 0.2s;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 14px;
}
.bot-hdr-btn:hover {
  background: var(--bg2);
  color: var(--text);
}
.bot-hdr-btn svg {
  width: 13px;
  height: 13px;
}

/* ── Switch to Command Palette button ──────────────────────────────────── */
.bot-switch-btn {
  height: 24px;
  border-radius: 5px;
  background: rgba(124, 147, 195, 0.08);
  border: 1px solid rgba(124, 147, 195, 0.15);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  gap: 3px;
  transition:
    background 0.2s,
    color 0.2s;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.bot-switch-btn:hover {
  background: rgba(124, 147, 195, 0.18);
  color: var(--text);
}

/* ── Toast ─────────────────────────────────────────────────────────────── */
.bot-toast {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  color: var(--accent);
  font-family: var(--mono);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  z-index: 10;
}
.bot-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Chat Area ─────────────────────────────────────────────────────────── */
.bot-chat-area {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.bot-chat-area.active {
  display: flex;
}
.bot-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.bot-msgs::-webkit-scrollbar {
  width: 4px;
}
.bot-msgs::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.bot-msg-bot,
.bot-msg-user {
  display: flex;
  gap: 0;
  animation: msgUp 0.25s var(--ease) both;
}
.bot-msg-user {
  justify-content: flex-end;
}
.bot-bubble-bot {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 3px;
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text2);
  max-width: 84%;
}
.bot-bubble-user {
  background: rgba(124, 147, 195, 0.12);
  color: var(--accent);
  border-radius: 12px 12px 3px 12px;
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.55;
  max-width: 84%;
}
.typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 13px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 3px;
  width: fit-content;
}
.typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text3);
  animation: dot-bounce 0.9s ease-in-out infinite;
}
.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

/* ── Quick-Reply Chips ─────────────────────────────────────────────────── */
.bot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
}
.bot-chip {
  padding: 6px 12px;
  background: rgba(124, 147, 195, 0.08);
  border: 1px solid rgba(124, 147, 195, 0.15);
  border-radius: 20px;
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--ff);
  white-space: nowrap;
  border: 1px solid rgba(124, 147, 195, 0.15);
}
.bot-chip:hover {
  background: rgba(124, 147, 195, 0.15);
}

/* ── Email Bar ─────────────────────────────────────────────────────────── */
.bot-email-bar {
  padding: 7px 14px;
  background: rgba(124, 147, 195, 0.04);
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.bot-email-bar span {
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

/* ── Input Row ─────────────────────────────────────────────────────────── */
.bot-input-row {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.bot-inp {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 12px;
  height: 44px;
  font-family: var(--ff);
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.bot-inp:focus {
  border-color: rgba(124, 147, 195, 0.35);
}
.bot-inp::placeholder {
  color: var(--text3);
}
.bot-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--accent);
  color: #0a0a10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}
.bot-send-btn:hover {
  background: var(--accent2);
}
.bot-send-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Legacy email capture screen (hidden — skip straight to chat) ──── */
.bot-screen {
  display: none !important;
}
.bot-screen-icon,
.bot-screen-title,
.bot-screen-sub,
.bot-email-inp,
.bot-start-btn,
.bot-skip-btn {
  display: none !important;
}
