/* ── CHATBOT WIDGET ── */
#chatbot-launch {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(217,119,6,0.35);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
#chatbot-launch:hover { transform: scale(1.07); box-shadow: 0 6px 28px rgba(217,119,6,0.45); }
#chatbot-launch svg { width: 28px; height: 28px; }

#chatbot-window {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 400px;
  max-width: calc(100vw - 48px);
  height: 580px;
  max-height: calc(100vh - 140px);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 998;
}
#chatbot-window.open { display: flex; }

.chatbot-header {
  background: var(--fg);
  color: var(--bg);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chatbot-business-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--bg);
}
.chatbot-tagline { font-size: 12px; color: #A8A8A0; margin-top: 2px; }
.chatbot-close { background: none; border: none; color: #A8A8A0; cursor: pointer; font-size: 22px; line-height: 1; padding: 4px; }

#chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.message {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}
.message.bot {
  background: var(--bg-alt);
  color: var(--fg);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.message.user {
  background: var(--accent);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}

.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-radius: 10px;
  align-self: flex-start;
  width: 60px;
}
.typing-indicator span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--fg-muted);
  animation: typing-bounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%,60%,100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

.chatbot-footer { padding: 14px 16px; border-top: 1px solid var(--border); }
.chatbot-input-row { display: flex; gap: 8px; }
#chatbot-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: 'DM Sans', system-ui, sans-serif;
  outline: none;
  background: var(--bg);
}
#chatbot-input:focus { border-color: var(--accent); }
#chatbot-send {
  padding: 10px 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', system-ui, sans-serif;
}
#chatbot-send:hover { background: var(--accent-dark); }
#chatbot-send:disabled { opacity: 0.5; cursor: not-allowed; }