.coai-vfaq {
  max-width: 920px;
  margin: 18px auto;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.coai-vfaq-header { margin-bottom: 12px; }
.coai-vfaq-title { font-size: 18px; font-weight: 700; }
.coai-vfaq-sub { font-size: 13px; color: #6b7280; margin-top: 4px; }

.coai-vfaq-row {
  display: grid;
  grid-template-columns: 140px 1fr 90px;
  gap: 10px;
  align-items: center;
}

.coai-vfaq-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
}

.coai-vfaq-mic, .coai-vfaq-ask, .coai-vfaq-speak-btn, .coai-vfaq-copy-btn, .coai-vfaq-contact-btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.coai-vfaq-ask {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.coai-vfaq-mic.is-disabled { opacity: 0.6; cursor: not-allowed; }

.coai-vfaq-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #6b7280;
}

.coai-vfaq-status { font-weight: 600; color: #374151; }
.coai-vfaq-answer-wrap { margin-top: 14px; }

.coai-vfaq-answer {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fcfcfd;
  min-height: 54px;
  font-size: 14px;
  line-height: 1.45;
  white-space: normal;
}

.coai-vfaq-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.coai-vfaq-footnote {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.coai-vfaq-contact-line {
  display: inline-block;
  margin-top: 6px;
  font-weight: 500;
  color: #374151;
}

.coai-vfaq-contact-line a {
  color: #1f2937;
  text-decoration: underline;
}

.coai-vfaq.is-busy { opacity: 0.9; }
.coai-vfaq.is-busy .coai-vfaq-answer { filter: grayscale(0.1); }

@media (max-width: 640px) {
  .coai-vfaq-row { grid-template-columns: 1fr; }
  .coai-vfaq-mic, .coai-vfaq-ask { width: 100%; }
}

/* Hide answer area until there is content */
.coai-vfaq-answer:empty {
  display: none;
}

.coai-vfaq-answer-wrap {
  margin-top: 4px;
}

/* =========================================
   COMPACT MODE — Match Member Login Card
   ========================================= */

.coai-vfaq {
  max-width: 520px;        /* Match login card width */
  padding: 12px;           /* Reduce padding */
  margin: 14px auto;
}

/* Header tightening */
.coai-vfaq-header {
  margin-bottom: 8px;
}

.coai-vfaq-title {
  font-size: 16px;
  font-weight: 600;
}

.coai-vfaq-sub {
  font-size: 12px;
  line-height: 1.35;
  margin-top: 2px;
}

/* Input row */
.coai-vfaq-row {
  gap: 6px;
}

.coai-vfaq-input {
  padding: 8px 10px;
  font-size: 13px;
}

.coai-vfaq-mic,
.coai-vfaq-ask {
  padding: 8px 10px;
  font-size: 13px;
}

/* Meta line */
.coai-vfaq-meta {
  margin-top: 6px;
  font-size: 11px;
}

/* Answer box */
.coai-vfaq-answer-wrap {
  margin-top: 8px;
}

.coai-vfaq-answer {
  padding: 10px;
  font-size: 13px;
  min-height: auto;        /* IMPORTANT: removes tall empty box */
}

/* Action buttons row */
.coai-vfaq-actions {
  margin-top: 6px;
  gap: 6px;
}

.coai-vfaq-actions button,
.coai-vfaq-actions a {
  padding: 6px 8px;
  font-size: 12px;
}

/* Footer / contact line */
.coai-vfaq-footnote {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
}

.coai-vfaq-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Constrain the widget width so it doesn't span the full page */
.coai-vfaq {
  width: 100%;
}

.coai-vfaq-inner {
  max-width: 560px;     /* tweak: 520–640px depending on your sign-in box */
  margin: 0 auto;       /* center */
}

/* Optional: keep it tidy on small screens */
@media (max-width: 640px) {
  .coai-vfaq-inner {
    max-width: 100%;
    margin: 0;
  }
}

/* HOME PAGE: make Voice FAQ match login card width */
.coai-vfaq[data-mode="home"] .coai-vfaq-inner {
  max-width: 640px;   /* ⬅️ key change (was ~560) */
  margin: 0 auto;
  background: #fafafa;
  border-color: #e5e7eb;
}
