/* Contenedor general del chat */
#chat-widget {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 350px;
  height: 500px;
  display: flex;
  flex-direction: column;
  border: 1px solid #ccc;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  z-index: 1000;
  /* ?? arranca oculto */
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  max-height: calc(100vh - 190px);
}



/* Header */
#chat-header {
  background: #123263;
  color: #fff;
  padding: 12px 15px;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Cuerpo del chat (contenedor de mensajes) */
#chat-body {
  flex: 1;
  display: flex;            /* lo hace flexbox */
  flex-direction: column;   /* mensajes en columna */
  gap: 6px;                 /* separaciÃ³n entre mensajes */
  padding: 10px;
  overflow-y: auto;
  font-size: 15px;
  box-sizing: border-box;
}
/* Footer fijo al final */
#chat-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #ddd;
  background: #fff;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* Input */
#chat-input {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;      /* evita zoom automático en móviles */
  min-width: 0;         /* permite que el input se reduzca */
  box-sizing: border-box;
}
#chat-widget.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#chat-widget.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Contenedor interno */
#chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* evita que todo se desborde */
}