/* Estilos do diagnóstico interativo (extraídos da versão anterior da página; o diagnostico.js depende destas classes). */
.diagnostic-skip {
  display: inline-block;
  color: #6941C6;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s ease;
}
.diagnostic-skip:hover { color: #53389E; }

/* ─── Wizard de diagnóstico ──────────────────────────────────────────────── */
.dw-loading { color: #667085; font-size: .95rem; }

.dw-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8f6ff 100%);
  border: 1px solid #e4def7;
  border-radius: 18px;
  padding: 16px;
}

/* ─── Chat ───────────────────────────────────────────────────────────────── */
.dw-chat {
  background: linear-gradient(180deg, #ffffff 0%, #f8f6ff 100%);
  border: 1px solid #e4def7;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.dw-chat-progress:empty { margin: 0; }
.dw-chat-progress { margin-bottom: 10px; }

.dw-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding: 4px 4px 10px;
  scroll-behavior: smooth;
}
.dw-chat-thread:empty { display: none; }

.dw-msg { display: flex; gap: 8px; align-items: flex-end; }
.dw-msg--user { justify-content: flex-end; }
.dw-msg--ai { justify-content: flex-start; }

.dw-msg-avatar {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #6941C6;
  color: #fff;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

.dw-msg-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: .86rem;
  line-height: 1.45;
  text-align: left; /* .hero-center cascateia text-align:center até aqui */
}
.dw-msg--ai .dw-msg-bubble {
  background: #fff;
  border: 1px solid #e4def7;
  color: #344054;
  border-bottom-left-radius: 4px;
}
.dw-msg--user .dw-msg-bubble {
  background: #6941C6;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.dw-msg--typing .dw-msg-bubble {
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
}
.dw-msg-bubble .dw-badge { margin-bottom: 8px; }
.dw-msg-bubble .dw-result-text { margin-bottom: 0; color: inherit; }
.dw-msg-bubble .dw-result-paragraph { color: inherit; }
.dw-msg-bubble .dw-result-text strong { color: #101828; }

/* Grupo de controles (opções, campo livre, formulário) sempre alinhado
   à direita, como se fosse a "vez de responder" do usuário no chat. */
.dw-chat-input {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 4px;
}
.dw-options { max-width: 420px; }
.dw-freetext-wrap { max-width: 420px; }

.dw-progress { margin-bottom: 14px; }
.dw-progress-bar {
  height: 4px; border-radius: 99px;
  background: #ebe7f7;
  overflow: hidden; margin-bottom: 8px;
}
.dw-progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #6941C6 0%, #8b6cd9 100%);
  transition: width .3s ease;
}
.dw-progress-label {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: #98A2B3;
}

.dw-question {
  color: #101828; font-size: .92rem; font-weight: 700;
  line-height: 1.25; margin-bottom: 14px;
}

.dw-options {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 4px;
}
.dw-option {
  text-align: center;
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid #ddd6f3;
  background: #fff;
  color: #344054;
  font-family: 'Manrope', sans-serif;
  font-size: .82rem; font-weight: 500; line-height: 1.3;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.dw-option:hover:not(:disabled) {
  border-color: rgba(105,65,198,.35);
  background: #faf8ff;
  transform: translateY(-1px);
}
.dw-option:disabled { opacity: .4; cursor: default; }
.dw-option.is-selected {
  border-color: #6941C6;
  background: #f4efff;
  color: #101828;
  opacity: 1;
}
.dw-option--segment { font-weight: 700; }
.dw-option--free {
  border-style: dashed;
  border-color: rgba(105,65,198,.4);
  background: linear-gradient(90deg, rgba(105,65,198,.05), rgba(220,252,23,.06));
  font-weight: 600;
}
.dw-option--free:hover:not(:disabled) {
  border-style: solid;
  border-color: #6941C6;
  background: linear-gradient(90deg, rgba(105,65,198,.08), rgba(220,252,23,.1));
}
.dw-option--free.is-selected { border-style: solid; }

.dw-question-hint {
  color: #667085; font-size: .76rem;
  margin: -8px 0 10px;
}

.dw-option--multi { display: flex; align-items: center; gap: 10px; }
.dw-option--multi::before {
  content: '';
  flex-shrink: 0;
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid #ddd6f3;
  background: #fff;
  transition: border-color .2s ease, background .2s ease;
}
.dw-option--multi.is-selected::before {
  border-color: #6941C6;
  background: #6941C6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/10px no-repeat;
}

.dw-multi-submit { margin-top: 6px; padding: 11px 22px !important; font-size: 14px !important; }
.dw-multi-submit:disabled { opacity: .4; cursor: default; }

.dw-freetext-wrap { margin-top: 14px; }
.dw-freetext {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d6d0eb;
  background: #fff;
  color: #344054;
  font-family: 'Manrope', sans-serif;
  font-size: .9rem;
  resize: vertical;
  margin-bottom: 12px;
  outline: none;
}
.dw-freetext:focus {
  border-color: #6941C6;
  box-shadow: 0 0 0 3px rgba(105,65,198,.12);
}
.dw-freetext-submit { padding: 11px 22px !important; font-size: 14px !important; }

.dw-back {
  display: inline-block;
  margin-top: 18px;
  background: none; border: none;
  color: #667085;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: color .2s ease;
}
.dw-back:hover { color: #101828; }

.dw-card--result { text-align: left; }
.dw-badge {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 16px;
}
.dw-badge--alto  { background: #DCFC17; color: #17230a; }
.dw-badge--medio { background: #FFE3B3; color: #7a4300; }
.dw-badge--baixo { background: #f2f4f7; color: #667085; }
.dw-badge--neutro { background: rgba(105,65,198,.16); color: #4a2f8f; }

.dw-loading-state {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.dw-loading-dots { display: inline-flex; gap: 4px; flex-shrink: 0; }
.dw-loading-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #6941C6;
  animation: dw-loading-bounce 1.2s infinite ease-in-out both;
}
.dw-loading-dots span:nth-child(1) { animation-delay: -.28s; }
.dw-loading-dots span:nth-child(2) { animation-delay: -.14s; }
@keyframes dw-loading-bounce {
  0%, 80%, 100% { transform: scale(.6); opacity: .5; }
  40% { transform: scale(1); opacity: 1; }
}
.dw-loading-text { color: #475467; font-size: 1rem; line-height: 1.5; margin: 0; }

.dw-result-text {
  color: #344054;
  font-size: 1rem; line-height: 1.65;
  margin-bottom: 24px;
}
.dw-result-paragraph {
  margin: 0 0 12px;
  color: #344054;
}
.dw-result-paragraph:last-child { margin-bottom: 0; }
.dw-result-text strong {
  color: #101828;
  font-weight: 800;
}
.dw-continue { padding: 13px 26px !important; font-size: 15px !important; }

/* Form de contato tratado como a "resposta" do usuário no chat: alinhado
   à direita, com cara de balão (mesmo lado das bolhas dw-msg--user). */
.dw-lead-form-wrap { display: flex; justify-content: flex-end; }
.dw-lead-form {
  text-align: left;
  width: 100%;
  max-width: 320px;
  background: #f4f2fb;
  border: 1px solid #ddd6f3;
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  padding: 16px;
}

.dw-lead-form .form-group:last-of-type { margin-bottom: 20px; }

/* Labels/bordas do .form-group compartilhado foram feitos pro form-card
   escuro original — aqui o wizard fica num card claro, então precisam de
   cor legível própria. */
.dw-lead-form label { color: #344054; }
.dw-lead-form input[type="text"],
.dw-lead-form input[type="email"],
.dw-lead-form .iti input[type="tel"] {
  border-color: #ddd6f3;
}
.dw-lead-form input[type="text"]:focus,
.dw-lead-form input[type="email"]:focus,
.dw-lead-form .iti input[type="tel"]:focus {
  border-color: #6941C6;
  box-shadow: 0 0 0 3px rgba(105,65,198,.14);
}
.dw-lead-form .iti--separate-dial-code .iti__selected-flag {
  background: #f4f2fb;
  border-right-color: #ddd6f3;
}
@media (max-width: 768px) { .dw-card { padding: 22px; } }
