/* Container do assistente */
#ia-assistente {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

/* Balão da fala */
#ia-balao {
  position: relative;
  max-width: 320px;
  min-width: 180px;
  background: #ffffff;
  color: #222;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  border: 1px solid #e5e5e5;
  font-size: 14px;
  line-height: 1.45;
  display: none;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Triângulo do balão apontando para o ícone */
#ia-balao::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: 18px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid #ffffff;
  filter: drop-shadow(1px 0 0 #e5e5e5);
}

#ia-balao.visivel {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

#ia-balao-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

#ia-balao-titulo {
  font-size: 12px;
  font-weight: bold;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

#ia-balao-fechar {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #888;
  padding: 0;
}

#ia-balao-fechar:hover {
  color: #222;
}

#ia-balao-conteudo {
  white-space: pre-wrap;
  word-break: break-word;
}

/* Ícone da IA */
#ia-icone {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #115293, #1e1e2f);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  position: relative;
  z-index: 9999;
}

#ia-icone.piscando::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(17, 82, 147, 0.25);
  animation: pulso 1.4s infinite;
}

@keyframes pulso {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.18);
    opacity: 0;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

/* Exemplo apenas para testar */
.area-teste {
  padding: 30px;
}

.area-teste button {
  padding: 10px 14px;
  margin-right: 10px;
  cursor: pointer;
}

@media (max-width: 600px) {
  #ia-assistente {
    right: 12px;
    bottom: 12px;
    gap: 8px;
  }

  #ia-balao {
    max-width: 220px;
    font-size: 13px;
  }

  #ia-icone {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
}
