/* Componentes de la conversación con Provi, compartidos por /app y la portada.
   Viven aquí, y no en shell.css, porque la portada (index.html) también monta el chat en vivo
   (rumbo.js) y sin estas reglas sus iconos salían a tamaño natural: la portada se veía rota
   (24-sep). shell.css se queda con el armazón de /app (cabecera, vistas, barra inferior). */
/* Provi sin globo: texto limpio con una barra naranja a la izquierda. El usuario sigue en globo.
   Que se note quién asesora y quién pregunta. */
.msg.bot {
  background: transparent; border: 0; border-radius: 0; padding: 2px 0 2px 14px;
  border-left: 3px solid var(--accent); max-width: 96%; line-height: 1.5;
}
.msg.bot.typing { border-left-color: var(--line); padding: 10px 0 10px 14px; }
.msg.bot.wide { border-left: 0; padding: 0; max-width: 100%; }
.msg.bot.apertura .titulo {
  display: block; font-family: 'Bricolage', sans-serif; font-weight: 700; font-size: 22px;
  line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; margin-bottom: 6px;
}
.msg.bot.apertura .sub { color: var(--muted); font-size: 14px; }
.msg.bot.apertura .sub b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Necesidades de ejemplo en el chat vacío: filas tocables, no píldoras. Desaparecen al primer mensaje. */
.ejemplos { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ejemplos .eti { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-left: 2px; }
.ejemplo {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 44px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer;
  transition: border-color .12s, transform .12s;
}
.ejemplo:hover { border-color: var(--accent); transform: translateY(-1px); }
.ejemplo:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ejemplo svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.ejemplo svg.flecha { margin-left: auto; width: 18px; height: 18px; color: var(--muted); }
.ejemplos .menor { align-self: center; font-size: 13.5px; font-weight: 600; color: var(--muted); background: none; border: 0; padding: 8px 4px; cursor: pointer; font-family: inherit; }
.ejemplos .menor b { color: var(--accent); font-weight: 600; }
/* Apertura «viva» (rumbo.js): los ejemplos entran uno tras otro, como si Provi los fuera escribiendo. */
.entra .ejemplos > * { animation: pop .3s ease both; }
.entra .ejemplos > :nth-child(2) { animation-delay: .12s; }
.entra .ejemplos > :nth-child(3) { animation-delay: .24s; }
.entra .ejemplos > :nth-child(4) { animation-delay: .36s; }
.entra .ejemplos > :nth-child(5) { animation-delay: .48s; }
@media (prefers-reduced-motion: reduce) { .entra .ejemplos > * { animation: none; } }

/* El contador: lo que Provi hizo en este turno, en una franja. */
.contador {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 12px; margin: 2px 0;
  border-radius: 10px; background: var(--surface2); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.contador b { color: var(--ink); font-weight: 600; }
.contador svg { width: 12px; height: 12px; flex: none; color: var(--muted); }
.contador svg.ok { width: 15px; height: 15px; color: var(--ok); }

/* Fichas de proveedor: el dato estructurado se pinta estructurado. */
.fichas { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 2px; }
.ficha {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.ficha .nombre { font-family: 'Bricolage', sans-serif; font-weight: 700; font-size: 16.5px; line-height: 1.2; }
.ficha .linea { font-size: 13.5px; color: var(--muted); }
.ficha .desc { font-size: 13.5px; line-height: 1.4; margin-top: 2px; }
.ficha .senales { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.estrellas { color: var(--warn); font-weight: 700; letter-spacing: .04em; }
.calif { width: 100%; margin-top: 6px; font-size: 13.5px; }
.calif.hecha { color: var(--muted); }
.calif-form { width: 100%; margin-top: 8px; display: grid; gap: 8px; }
.calif-form .stars { display: flex; gap: 4px; }
.calif-form .star { font-size: 26px; line-height: 1; background: none; border: 0; color: var(--line); cursor: pointer; padding: 0 2px; }
.calif-form .star.on { color: var(--warn); }
.calif-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; font-size: 14px; }
.calif-acts { display: flex; gap: 8px; }
.ficha .num { display: none; }
/* Tabla compacta (más de 3 resultados): numerada, una línea de servicio, acciones a la derecha en escritorio. */
.fichas.compactas { gap: 6px; }
.fichas.compactas .ficha { padding: 10px 12px 10px 38px; position: relative; }
.fichas.compactas .ficha .num { display: block; position: absolute; left: 12px; top: 11px; width: 20px; height: 20px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-deep); font-size: 12px; font-weight: 700; text-align: center; line-height: 20px; }
.fichas.compactas .ficha .nombre { font-size: 15px; }
.fichas.compactas .ficha .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fichas.compactas .ficha .insignias { margin-top: 4px; }
.ficha .insignias { display: flex; gap: 6px; flex-wrap: wrap; }
.ficha .insignia { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface2); color: var(--muted); border: 1px solid var(--line); }
.ficha .insignia.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.ficha .acts { display: flex; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.ficha .acts .btn-sm { min-height: 36px; }
.fichas .mas { align-self: center; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); background: none; border: 0; padding: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.fichas .mas svg { width: 16px; height: 16px; }
.entra .ejemplos > :nth-child(6) { animation-delay: .6s; }

/* Requerimiento adjunto (RFP / TDR, 11-oct): el clip junto al campo, el documento como mensaje del
   usuario y la conversación resaltada al arrastrar un archivo encima. */
.adjbtn {
  flex: none; width: 44px; align-self: stretch; min-height: 44px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface2); color: var(--muted);
  display: grid; place-items: center; transition: border-color .12s, color .12s;
}
.adjbtn:hover, .adjbtn:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.adjbtn svg { width: 20px; height: 20px; }
.view-chat .adjbtn { border-radius: 50%; height: 44px; align-self: center; }
.msg.user.adjunto { display: inline-flex; align-items: center; gap: 8px; align-self: flex-end; }
.msg.user.adjunto svg { width: 18px; height: 18px; flex: none; }
.msg.user.adjunto .adj-nombre { font-weight: 600; overflow-wrap: anywhere; }
.msg.user.adjunto small { opacity: .75; white-space: nowrap; }
.msg.user.adjunto.fallo { opacity: .7; }
.soltar { outline: 2px dashed var(--accent); outline-offset: -6px; }
