/* Chat con el asistente del CV. La lógica está en js/chat.js. */
#chat-widget { position: fixed; bottom: 24px; right: 24px; z-index: 9999; font-family: 'DM Sans', sans-serif; }
#chat-box { display: none; width: 340px; height: 480px; margin-bottom: 14px; background: #1d2130; border: 1px solid rgba(0,212,200,0.35); border-radius: 16px; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.04); }
#chat-box.abierto { display: flex; }
.chat-cabeza { padding: 16px 20px; background: #262b3d; border-bottom: 1px solid #353b52; display: flex; justify-content: space-between; align-items: center; }
.chat-titulo { font-weight: 700; color: #f0f0f5; font-size: 0.9rem; }
.chat-estado { font-size: 0.75rem; color: #00d4c8; }
.chat-cerrar { background: none; border: none; color: #b4b8cc; cursor: pointer; font-size: 1.2rem; }
#chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; height: 340px; background: #1d2130; }
.chat-pie { padding: 12px; border-top: 1px solid #353b52; display: flex; gap: 8px; background: #232839; }
#chat-input { flex: 1; background: #151824; border: 1px solid #3a4158; border-radius: 8px; padding: 10px 14px; color: #f0f0f5; font-size: 16px; outline: none; }
.chat-enviar { background: linear-gradient(135deg,#4f8ef7,#00d4c8); border: none; border-radius: 8px; padding: 10px 16px; color: #000; font-weight: 700; cursor: pointer; }
#chat-btn { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg,#4f8ef7,#00d4c8); border: none; cursor: pointer; font-size: 1.4rem; box-shadow: 0 8px 30px rgba(79,142,247,0.4); display: flex; align-items: center; justify-content: center; }
.burbuja { padding: 10px 14px; font-size: 0.85rem; max-width: 80%; }
.burbuja.usuario { align-self: flex-end; background: #4f8ef7; color: #000; border-radius: 12px 12px 2px 12px; }
.burbuja.bot { align-self: flex-start; background: #2b3145; color: #f0f0f5; border-radius: 12px 12px 12px 2px; border: 1px solid #3d4560; }
.burbuja a { color: #00d4c8; text-decoration: underline; word-break: break-all; }
#typing { align-self: flex-start; color: #b4b8cc; font-size: 0.85rem; padding: 10px 14px; }

/* Teléfono: el chat cabe en la pantalla y se adapta cuando sale el teclado */
@media (max-width: 640px) {
  #chat-widget { right: 16px; bottom: 16px; }
  #chat-box { width: calc(100vw - 32px); height: min(480px, 64dvh); }
  #chat-messages { height: auto; }
}
