/* ======================
   Global
   ====================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Brand colors */
:root {
  --va-orange-light: #ffb14a;
  --va-orange: #ff9500;
  --va-orange-dark: #ff7b00;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
}

/* ======================
   Launcher Button
   ====================== */
#va-chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--va-orange), var(--va-orange-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 9999;
  font-size: 26px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#va-chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}

/* ======================
   Chat Window
   ====================== */
#va-chat-window {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 360px;
  max-height: 540px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  display: none;           /* JS will set to flex */
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
}

@media (max-width: 480px) {
  #va-chat-window {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 80px;
    max-height: 70vh;
  }
}

/* Header */
.va-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--va-orange), var(--va-orange-dark));
  color: #fff;
}

.va-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.va-logo-badge {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.va-header-title {
  font-size: 14px;
  font-weight: 700;
}

.va-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.va-header-btn {
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background 0.15s ease;
}

.va-header-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ======================
   FAQ Section
   ====================== */
#va-faq-section {
  padding: 10px 12px;
  border-bottom: 1px solid #ffe0b3;
  background: #fff9f2;

  /* NEW: keep FAQ comfortably tall and prevent it from shrinking */
  min-height: 140px;     /* never get too tiny */
  max-height: 320px;     /* enough room for several questions */
  overflow-y: auto;
  flex-shrink: 0;        /* don't let messages squeeze it */
}


.va-faq-title {
  font-size: 13px;
  font-weight: 600;
  color: #9a4f00;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.va-faq-title::before {
  content: "❓";
  font-size: 14px;
}

#va-faq-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.va-faq-item {
  border: 1px solid #ffd199;
  border-radius: 6px;
  padding: 6px 8px;
  background: #ffffff;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.1s ease;
}

.va-faq-item:hover {
  background: #fff4e5;
  border-color: var(--va-orange);
  transform: translateY(-1px);
}

/* hide FAQ when collapsed */
.va-hidden {
  display: none !important;
}

/* ======================
   Messages
   ====================== */
#va-chat-messages {
  flex: 1;
  padding: 10px 12px;
  overflow-y: auto;
  background: #f9fafb;
}

.va-msg {
  display: flex;
  margin-bottom: 8px;
  font-size: 13px;
}

.va-msg span {
  display: inline-block;
  padding: 7px 9px;
  border-radius: 10px;
  max-width: 85%;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* Bot */
.va-msg.bot {
  justify-content: flex-start;
}
.va-msg.bot span {
  background: #e5e7eb;
  color: #111827;
}

/* User */
.va-msg.user {
  justify-content: flex-end;
}
.va-msg.user span {
  background: var(--va-orange);
  color: #ffffff;
}

/* ======================
   WhatsApp CTA
   ====================== */
.va-whatsapp-cta {
  padding: 8px 12px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.va-whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  text-decoration: none;
  color: #166534;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
}

.va-whatsapp-link:hover {
  background: #dcfce7;
}

.va-whatsapp-icon {
  width: 16px;
  height: 16px;
}

/* ======================
   Typing indicator
   ====================== */
#va-typing {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
  color: #6b7280;
  background: #f3f4f6;
  border-top: 1px solid #e5e7eb;
}

.va-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ca3af;
  animation: va-bounce 1s infinite;
}

.va-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.va-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes va-bounce {
  0%, 80%, 100% {
    transform: scale(0.7);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ======================
   Input area
   ====================== */
#va-chat-input-area {
  padding: 8px 10px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.va-input-row {
  display: flex;
  gap: 6px;
}

.va-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#va-chat-input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 7px 12px;
  font-size: 13px;
  outline: none;
}

#va-chat-input:focus {
  border-color: var(--va-orange);
  box-shadow: 0 0 0 1px rgba(255, 149, 0, 0.4);
}

#va-chat-send {
  min-width: 66px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  padding: 0 12px;
  background: var(--va-orange);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

#va-chat-send:hover {
  background: var(--va-orange-dark);
  transform: translateY(-1px);
}

#va-chat-error {
  display: none;
  font-size: 11px;
  color: #b91c1c;
}

/* Scrollbars */
#va-chat-messages::-webkit-scrollbar,
#va-faq-section::-webkit-scrollbar {
  width: 6px;
}
#va-chat-messages::-webkit-scrollbar-thumb,
#va-faq-section::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 999px;
}
/* ======================
   FIX: Force Chatbot Fonts
   ====================== */
#va-chat-window,
#va-chat-window * {
  font-family: acumin-pro, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}
