/* FAQ Chatbot Widget */
.chatbot-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-gradient);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(91,163,245,0.35);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.chatbot-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(91,163,245,0.45);
}
.chatbot-toggle svg { width: 28px; height: 28px; fill: #fff; }
.chatbot-toggle .chatbot-close-icon { display: none; }
.chatbot-toggle.open .chatbot-chat-icon { display: none; }
.chatbot-toggle.open .chatbot-close-icon { display: block; }

.chatbot-window {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 380px;
  max-height: 520px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  z-index: 9998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
}
.chatbot-window.open { display: flex; }

.chatbot-header {
  background: var(--brand-gradient);
  color: #fff;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
}
.chatbot-header small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

.chatbot-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chatbot-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  animation: chatFadeIn 0.25s ease;
}
@keyframes chatFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.chatbot-msg.bot {
  background: var(--bg-card);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chatbot-msg.user {
  background: var(--accent-purple);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chatbot-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: chatFadeIn 0.25s ease;
}
.chatbot-options button {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1.4;
}
.chatbot-options button:hover {
  border-color: var(--accent-purple);
  background: var(--brand-blue-light);
}

.chatbot-email-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: chatFadeIn 0.25s ease;
}
.chatbot-email-form input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.chatbot-email-form input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}
.chatbot-email-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}
.chatbot-email-form textarea:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}
.chatbot-email-form button {
  background: var(--accent-purple);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.chatbot-email-form button:hover { background: #7c3aed; }

.chatbot-link {
  color: var(--brand-blue);
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 84px;
    max-height: 70vh;
  }
  .chatbot-toggle {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
  }
}
