/* ============================================================
   Blocos interativos da MotriX — usados na página principal e na
   proposta (/apresenta1). Um arquivo só pras duas: a proposta é
   cifrada, mas carrega este CSS e o interativos.js do próprio site.

   - .mx-sim  simulador da IA SDR (conversa + as 6 etapas)
   - .mx-mod  "O que entregamos" (8 módulos + painel de detalhe)

   Tudo prefixado com mx- e com cores próprias: os dois blocos são
   escuros nas duas páginas e não podem herdar nada de nenhuma delas.
   ============================================================ */

.mx-sim,
.mx-mod {
  --mx-verde: #22c55e;
  --mx-verde-forte: #12a650;
  --mx-verde-claro: #4ade80;
  --mx-fundo: #121517;
  --mx-fundo-2: #181c1e;
  --mx-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --mx-borda: rgba(255, 255, 255, 0.09);
  --mx-texto: #ffffff;
  --mx-texto-2: rgba(255, 255, 255, 0.68);
  --mx-texto-3: rgba(255, 255, 255, 0.42);
  color: var(--mx-texto);
  font-family: inherit;
}

.mx-sim *,
.mx-mod * {
  box-sizing: border-box;
}

/* ------------------------------------------------------------
   Simulador da IA SDR
   ------------------------------------------------------------ */

.mx-sim {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.mx-chat {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 470px;
  background: var(--mx-fundo);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  overflow: hidden;
}

.mx-chat-topo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--mx-borda);
  font-size: 13px;
  font-weight: 600;
}

.mx-ponto {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mx-verde);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
  flex-shrink: 0;
}

.mx-chat-topo small {
  margin-left: auto;
  font-family: var(--mx-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--mx-texto-3);
}

.mx-chat-corpo {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.mx-msg {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-line;
  animation: mx-entra 0.28s ease both;
}

.mx-msg-cliente {
  align-self: flex-start;
  background: #1c201d;
  border-bottom-left-radius: 4px;
}

.mx-msg-ia,
.mx-msg-vendedor {
  align-self: flex-end;
  background: #10331f;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-bottom-right-radius: 4px;
}

.mx-msg-vendedor {
  background: #16211a;
  border-color: rgba(255, 255, 255, 0.1);
}

.mx-autor {
  display: block;
  margin-bottom: 3px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--mx-verde-claro);
}

.mx-msg-vendedor .mx-autor {
  color: #93c5fd;
}

.mx-carro {
  align-self: flex-end;
  display: flex;
  gap: 11px;
  align-items: center;
  width: min(290px, 82%);
  padding: 8px;
  background: #0f1712;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 14px;
  animation: mx-entra 0.28s ease both;
}

.mx-carro img {
  width: 92px;
  height: 64px;
  object-fit: cover;
  border-radius: 9px;
  background: #1a1f1b;
  flex-shrink: 0;
}

.mx-carro b {
  display: block;
  font-size: 12.5px;
  line-height: 1.3;
}

.mx-carro i {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--mx-texto-3);
  margin-top: 2px;
}

.mx-carro strong {
  display: block;
  margin-top: 4px;
  font-family: var(--mx-mono);
  font-size: 13px;
  color: var(--mx-verde-claro);
}

.mx-evento {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
  color: var(--mx-verde-claro);
  font-size: 11.5px;
  font-weight: 600;
  animation: mx-entra 0.28s ease both;
}

.mx-digitando {
  display: inline-flex;
  gap: 4px;
  padding: 11px 14px;
  border-radius: 14px;
  background: #10331f;
  align-self: flex-end;
}

.mx-digitando.mx-lado-cliente {
  align-self: flex-start;
  background: #1c201d;
}

.mx-digitando span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  animation: mx-pula 1s infinite ease-in-out;
}

.mx-digitando span:nth-child(2) { animation-delay: 0.15s; }
.mx-digitando span:nth-child(3) { animation-delay: 0.3s; }

.mx-chat-respostas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 62px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--mx-borda);
  align-content: center;
}

.mx-chat-respostas:empty::before {
  content: "Aguardando a resposta…";
  font-size: 12px;
  color: var(--mx-texto-3);
  align-self: center;
}

.mx-resposta {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--mx-texto);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.1);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  animation: mx-entra 0.25s ease both;
}

.mx-resposta:hover,
.mx-resposta:focus-visible {
  background: rgba(34, 197, 94, 0.22);
  border-color: var(--mx-verde);
  outline: none;
  transform: translateY(-1px);
}

.mx-resposta-secundaria {
  border-color: var(--mx-borda);
  background: transparent;
  color: var(--mx-texto-2);
}

.mx-dica {
  width: 100%;
  font-size: 11px;
  color: var(--mx-texto-3);
}

/* As 6 etapas ao lado da conversa: acendem conforme ela avança. */
.mx-etapas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mx-etapa {
  padding: 16px 16px 15px;
  border-radius: 16px;
  border: 1px solid var(--mx-borda);
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease;
  opacity: 0.55;
}

.mx-etapa b {
  display: block;
  font-family: var(--mx-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--mx-verde);
  margin-bottom: 6px;
}

.mx-etapa span {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.mx-etapa i {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--mx-texto-3);
  margin-top: 2px;
}

.mx-etapa.mx-feita {
  opacity: 1;
  border-color: rgba(34, 197, 94, 0.25);
}

.mx-etapa.mx-agora {
  opacity: 1;
  border-color: var(--mx-verde);
  background: rgba(34, 197, 94, 0.08);
}

/* ------------------------------------------------------------
   O que entregamos: 8 módulos + painel
   ------------------------------------------------------------ */

.mx-mod {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.mx-mod-grade {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mx-mod-item {
  font: inherit;
  text-align: left;
  color: var(--mx-texto);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  min-height: 104px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--mx-borda);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.mx-mod-item svg {
  width: 20px;
  height: 20px;
  color: var(--mx-texto-2);
  transition: color 0.25s ease;
}

.mx-mod-item span {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
}

.mx-mod-item:hover,
.mx-mod-item:focus-visible {
  border-color: rgba(34, 197, 94, 0.45);
  outline: none;
  transform: translateY(-2px);
}

.mx-mod-item[aria-selected="true"] {
  border-color: var(--mx-verde);
  background: rgba(34, 197, 94, 0.07);
}

.mx-mod-item[aria-selected="true"] svg {
  color: var(--mx-verde);
}

.mx-mod-painel {
  position: relative;
  padding: 26px 26px 24px;
  border-radius: 20px;
  border: 1px solid var(--mx-borda);
  background: var(--mx-fundo);
  overflow: hidden;
}

.mx-mod-conteudo {
  animation: mx-entra 0.35s ease both;
}

.js .mx-mod-conteudo:not(.mx-ativo) {
  display: none;
}

.mx-mod-conteudo + .mx-mod-conteudo {
  margin-top: 28px;
}

.js .mx-mod-conteudo + .mx-mod-conteudo {
  margin-top: 0;
}

.mx-mod-ico {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.12);
  color: var(--mx-verde);
  margin-bottom: 16px;
}

.mx-mod-ico svg {
  width: 20px;
  height: 20px;
}

.mx-mod-num {
  font-family: var(--mx-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mx-texto-3);
  margin: 0 0 6px;
}

.mx-mod-titulo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--mx-texto);
}

.mx-mod-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--mx-texto-2);
  margin: 0 0 18px;
}

.mx-mod-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.mx-mod-lista li {
  position: relative;
  padding-left: 24px;
  font-size: 13.5px;
  color: var(--mx-texto);
}

.mx-mod-lista li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.16)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 10px no-repeat;
}

/* A barrinha que mostra quanto falta pro próximo módulo no automático. */
.mx-mod-tempo {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--mx-verde);
  opacity: 0.7;
}

.mx-mod-tempo.mx-correndo {
  animation: mx-tempo var(--mx-intervalo, 4.5s) linear forwards;
}

/* Versão clara do "O que entregamos" (.mx-claro), pra seção branca da
   página principal. Só troca as cores: a estrutura é a mesma. */
.mx-mod.mx-claro {
  --mx-verde: #12a650;
  --mx-fundo: #f6f7f7;
  --mx-borda: #e7eae8;
  --mx-texto: #0b0d0e;
  --mx-texto-2: #5c6560;
  --mx-texto-3: #98a29c;
}

.mx-claro .mx-mod-item {
  background: #ffffff;
}

.mx-claro .mx-mod-item:hover,
.mx-claro .mx-mod-item:focus-visible {
  border-color: rgba(18, 166, 80, 0.45);
}

.mx-claro .mx-mod-item[aria-selected="true"] {
  border-color: #12a650;
  background: rgba(18, 166, 80, 0.06);
}

.mx-claro .mx-mod-ico {
  background: rgba(18, 166, 80, 0.1);
}

/* ------------------------------------------------------------
   Animações e telas menores
   ------------------------------------------------------------ */

@keyframes mx-entra {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes mx-pula {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@keyframes mx-tempo {
  from { width: 0; }
  to { width: 100%; }
}

@media (max-width: 900px) {
  .mx-sim,
  .mx-mod {
    grid-template-columns: 1fr;
  }

  .mx-chat {
    height: 440px;
  }
}

@media (max-width: 560px) {
  .mx-mod-grade {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mx-mod-item {
    min-height: 92px;
    gap: 14px;
  }

  .mx-etapa {
    padding: 13px;
  }

  .mx-msg {
    max-width: 88%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mx-msg,
  .mx-carro,
  .mx-evento,
  .mx-resposta,
  .mx-mod-conteudo {
    animation: none;
  }

  .mx-digitando span {
    animation: none;
  }

  .mx-mod-tempo.mx-correndo {
    animation: none;
  }
}
