/* Demos personalizadas: lo que agregan la página pública, el chat por enlace y el panel interno sobre estilos.css. */

.boton.chico { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; text-decoration: none; }
.nota.centrada { text-align: center; }
.captcha:empty { display: none; }
.captcha { min-height: 65px; }

/* Lo que sabe hacer el agente */
.capacidad { margin: 10px 0 0; display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: baseline; padding: 8px 12px; border-radius: 12px; background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.3); color: #bbf7d0; font-size: 0.95rem; }
.capacidad b { color: #dcfce7; }
.capacidad:empty { display: none; }
.catalogo { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 4px; }
.catalogo li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed rgba(165,180,252,0.14); padding: 3px 0; }
.catalogo li b { color: var(--indigo-claro); font-weight: 600; white-space: nowrap; }
.catalogo li.mas { color: var(--texto-3); border: 0; }

.columna-avance .ficha { margin-top: 26px; }

/* Pestañas de prueba */
.prueba { display: grid; gap: 18px; animation: entra .45s ease both; }
.pestanas { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; padding: 5px; border-radius: 16px; background: rgba(10,8,24,0.5); border: 1px solid rgba(165,180,252,0.14); }
.pestanas button { font: inherit; font-family: var(--titulos); font-weight: 600; font-size: 1rem; color: var(--texto-2); background: none; border: 0; border-radius: 12px; padding: 11px 8px; cursor: pointer; }
.pestanas button[aria-selected="true"] { color: #fff; background: linear-gradient(135deg, var(--indigo), var(--indigo-fuerte)); box-shadow: 0 8px 24px -10px rgba(99,102,241,0.9); }
.pestanas button:focus-visible { outline: 3px solid rgba(129,140,248,0.5); outline-offset: 2px; }
.pestanas button[hidden] { display: none; }
.aviso-demo { margin: 0; font-size: 0.8rem; text-align: center; }
.estado-llamada { display: grid; gap: 10px; }
#form-llamar .boton { width: 100%; }

/* Chat con aspecto de WhatsApp (modo oscuro, colores de Neuropoint) */
.wa { display: grid; grid-template-rows: auto 1fr auto; height: min(560px, 70vh); min-height: 380px; border-radius: 18px; overflow: hidden; border: 1px solid rgba(165,180,252,0.16); background: #0b0a1c; }
.wa-cabecera { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: linear-gradient(135deg, rgba(79,70,229,0.55), rgba(55,48,163,0.45)); }
.wa-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #eef2ff; color: #3730a3; font-family: var(--titulos); font-weight: 700; font-size: 1.1rem; flex: none; }
.wa-titulos { display: grid; min-width: 0; }
.wa-titulos b { font-family: var(--titulos); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-titulos small { color: #c7d2fe; font-size: 0.8rem; }
.wa-mensajes { overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth;
  background-color: #0b0a1c; background-image: radial-gradient(rgba(129,140,248,0.07) 1px, transparent 1px); background-size: 18px 18px; }
.wa-burbuja { position: relative; max-width: 82%; padding: 8px 12px 18px; border-radius: 12px; font-size: 0.98rem; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; animation: entra .2s ease both; }
.wa-burbuja time { position: absolute; right: 10px; bottom: 4px; font-size: 0.68rem; color: rgba(226,232,255,0.55); }
.wa-burbuja.agente { align-self: flex-start; background: #1d1b3a; border: 1px solid rgba(129,140,248,0.18); border-top-left-radius: 4px; }
.wa-burbuja.cliente { align-self: flex-end; background: #4338ca; color: #eef2ff; border-top-right-radius: 4px; }
.wa-burbuja.sistema { align-self: center; max-width: 92%; background: rgba(252,211,77,0.12); border: 1px solid rgba(252,211,77,0.35); color: #fde68a; font-size: 0.88rem; padding: 8px 12px; text-align: center; }
.wa-burbuja.sistema time { display: none; }
.wa-reintentar { display: block; margin: 6px auto 0; font: inherit; font-weight: 600; color: #fde68a; background: none; border: 1px solid rgba(252,211,77,0.5); border-radius: 999px; padding: 3px 12px; cursor: pointer; }
.wa-escribiendo { display: inline-flex; gap: 4px; padding: 12px 14px; }
.wa-escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: #818cf8; animation: escribe 1.2s infinite ease-in-out; }
.wa-escribiendo i:nth-child(2) { animation-delay: .2s; }
.wa-escribiendo i:nth-child(3) { animation-delay: .4s; }
@keyframes escribe { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.wa-pie { display: flex; align-items: flex-end; gap: 8px; padding: 10px; background: #121029; border-top: 1px solid rgba(165,180,252,0.1); }
.wa-pie textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; border-radius: 22px; padding: 11px 16px; font-size: 1rem; line-height: 1.35; }
.wa-enviar { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: var(--indigo); cursor: pointer; }
.wa-enviar svg { width: 20px; height: 20px; }
.wa-enviar:disabled { opacity: .5; cursor: progress; }

/* Página del chat por enlace */
body.solo-chat main { max-width: 760px; }
.solo-chat .portada-chat { margin: 8px 0 18px; }
.solo-chat .portada-chat h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.solo-chat .wa { height: calc(100dvh - 220px); min-height: 420px; }
.no-disponible { text-align: center; }

@media (min-width: 1100px) {
  .publico #vista-vivo { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .publico #vista-vivo .columna-resultado { position: sticky; top: 16px; }
}
@media (max-width: 1099px) {
  /* En celular, la prueba va antes que la ficha: es lo que el prospecto vino a hacer. */
  .publico #vista-vivo { display: flex; flex-direction: column; }
  .publico #vista-vivo .columna-avance { display: contents; }
  .publico #vista-vivo .columna-avance > :not(.ficha):not(.acciones-vivo) { order: 0; }
  .publico #vista-vivo .columna-resultado { order: 1; }
  .publico #vista-vivo .ficha { order: 3; margin-top: 0; }
  .publico #vista-vivo .acciones-vivo { order: 2; margin-top: 0; }
  .publico #vista-vivo .acciones-vivo .boton { flex: 1 1 200px; }
}
@media (max-width: 560px) {
  .wa { height: 70vh; }
  .wa-burbuja { max-width: 90%; }
  .barra .boton.chico { display: none; }
}

#boton-contacto { text-decoration: none; }
