/* importarcoche.es · chat con IA (1.6). Se apoya en los estilos del widget de WhatsApp (.wa-*). */
.ic-chat .wa-panel { display: none; flex-direction: column; width: min(380px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 110px)); }
.ic-chat.abierto .wa-panel { display: flex; }
.ic-chat .wa-cab { grid-template-columns: 42px 1fr auto auto; padding: 14px 12px 14px 16px; }
.chat-cab-wa { display: inline-flex; align-items: center; gap: 5px; color: #fff; text-decoration: none; font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,.14); border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
.chat-cab-wa:hover { background: rgba(255,255,255,.24); }
.chat-cab-wa span { opacity: 1; font-size: 12.5px; }
.chat-cerrar { border: 0; background: transparent; color: #fff; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; opacity: .85; }
.chat-cerrar:hover { background: rgba(255,255,255,.14); opacity: 1; }
.chat-cuerpo { flex: 1 1 auto; min-height: 180px; overflow-y: auto; overscroll-behavior: contain; align-content: start; scroll-behavior: smooth; }
.chat-msg { font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.chat-bot p { margin: 0; }
.chat-bot p + p, .chat-bot p + ul, .chat-bot ul + p { margin-top: 8px; }
.chat-bot ul { margin: 4px 0 0; padding-left: 18px; }
.chat-bot li + li { margin-top: 3px; }
.chat-bot a { color: #0B5C3B; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.chat-tu { justify-self: end; max-width: 85%; background: #D9FDD3; border-radius: 12px 0 12px 12px; padding: 9px 12px; box-shadow: 0 1px 1px rgba(0,0,0,.08); white-space: pre-wrap; }
.chat-error { background: #FFF4E5; }
.chat-ir-wa { display: inline-block; margin-top: 8px; background: #1FA855; color: #fff !important; text-decoration: none !important; font-weight: 600; font-size: 14px; border-radius: 999px; padding: 6px 14px; }
.chat-escribiendo { display: inline-flex; gap: 4px; width: auto; justify-self: start; padding: 13px 14px; }
.chat-escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: #8a9497; animation: chatPunto 1.1s infinite ease-in-out; }
.chat-escribiendo i:nth-child(2) { animation-delay: .15s; }
.chat-escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes chatPunto { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-escribiendo i { animation: none; opacity: .7; } .chat-cuerpo { scroll-behavior: auto; } }
.chat-tarjeta { background: #fff; border-radius: 12px; padding: 12px 14px 14px; display: grid; gap: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.1); border-top: 3px solid var(--naranja, #FF7E00); }
.chat-tarjeta b { font-size: 15px; margin-bottom: 4px; }
.chat-tarjeta label { font-size: 12.5px; color: var(--acero, #59656c); margin-top: 4px; }
.chat-tarjeta input[type=text], .chat-tarjeta input[type=tel], .chat-tarjeta input[type=email] { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid #cfd6d1; border-radius: 6px; width: 100%; min-height: 40px; }
.chat-tarjeta .chat-check { display: flex; gap: 8px; align-items: flex-start; color: inherit; font-size: 13.5px; margin: 8px 0 4px; line-height: 1.35; }
.chat-tarjeta .chat-check input { margin-top: 2px; width: 18px; height: 18px; flex: none; accent-color: #0B5C3B; }
.chat-tarjeta .chat-check a { color: #0B5C3B; }
.chat-tarjeta button { margin-top: 6px; justify-self: start; }
.chat-t-error { font-size: 13px; color: #a32222; margin: 2px 0 0; }
.chat-tarjeta.enviada { border-top-color: #1FA855; gap: 2px; }
.chat-tarjeta.enviada b { color: #0B5C3B; margin: 0; }
.chat-tarjeta.enviada span { font-size: 13px; color: var(--acero, #59656c); }
.ic-chat .wa-escribir { align-items: end; border-top: 1px solid #ece7df; }
.ic-chat .wa-escribir textarea { max-height: 120px; overflow-y: auto; line-height: 1.4; }
.ic-chat .wa-escribir button:disabled { opacity: .5; cursor: progress; }
.ic-chat .wa-aviso { padding-top: 0; }
.ic-chat .wa-aviso a { color: inherit; }
@media (max-width: 560px) {
  .ic-chat.abierto { left: 0; right: 0; bottom: 0; top: 0; padding: 0; gap: 0; z-index: 70; }
  .ic-chat.abierto .wa-panel { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .ic-chat.abierto .wa-boton { display: none; }
  .ic-chat .wa-escribir textarea { font-size: 16px; }
}
