
#mensaje {
  resize: none;
  overflow-y: hidden;
  overflow-x: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 1rem 3.25rem 1rem 1.25rem;
  font-size: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #d0d0d0;
  outline: none;
  background-color: white;
  width: 100%;
  max-height: 240px;
  box-sizing: border-box;
}
.message {
  padding: 1em 1.25em;
  margin-bottom: 1.5em;
  border-radius: 1em;
  line-height: 1.5em;
  max-width: 75%;
  word-break: break-word;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  user-select: text !important;
  animation: fadeIn 0.3s ease-in;
}


.message.user {
  align-self: flex-end;
  color: black;
  background-color: var(--color-gris-usuario);
  border-radius: 1em 1em 0.25em 1em;
  box-shadow: 0px 1px 3px rgba(0,0,0,0.1);
}
.message.user p {
  color: black !important;
}

.message.bot {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  font-size: 1em;
  line-height: 1.6em;
  color: var(--color-texto);
  white-space: normal;
  width: 80%;
  max-width: 100%;
}

.message.bot.typing {
  font-style: italic;
  opacity: 0.6;
}

.chat-input-area button:disabled {
  background-color: grey;
  cursor: not-allowed;
}

.message.bot.typing::after {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  background-color: var(--color-principal);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}


.bienvenida {
  text-align: center;
  font-size: 1.8rem;
  color: var(--color-texto);
  margin-top: 4rem;
  opacity: 0.7;
  animation: fadeIn 0.4s ease-in;
}

.bienvenida.oculto {
  display: none;
}

.message.bot table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.message.bot th,
.message.bot td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: left;
}

.message.bot thead {
  background-color: #f2f2f2;
  font-weight: bold;
}

/* Asegura visibilidad de párrafos, listas, etc. */
.message.bot p,
.message.bot ul,
.message.bot ol {
  margin: 0.5rem 0;
}

.message.bot li {
  margin-left: 1.25rem;
  list-style-type: disc;
}

.message.bot strong {
  font-weight: 600;
}

.message.bot em {
  font-style: italic;
}

/* Hereda fuente y color en HTML insertado */
.message.bot * {
  font-family: inherit;
  color: inherit;
}

.message.bot.error {
  background-color: #ffecec;
  border: 1px solid #f5c2c2;
  color: #d8000c;
  padding: 1em 1.25em;
  border-radius: 1em;
  font-weight: 500;
  max-width: 75%;
  animation: fadeIn 0.3s ease-in;
}


.sugerencias-chat {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  animation: fadeIn 0.4s ease-in;
}

.sugerencia {
  background-color: var(--color-gris-usuario);
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  font-size: 1rem;
  color: var(--color-texto);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  text-align: center;
  max-width: 250px;
  flex: 1 1 auto; /* Permite que las sugerencias se ajusten al espacio disponible */
  align-items: center;
  display: flex;
  justify-content: center;
}

.sugerencia:hover {
  background-color: #e6e6e6;
  transform: translateY(-2px);
}

.sugerencias-chat:empty {
  display: none;
}
/* Fondo oscuro del modal */
.img-zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

/* Imagen dentro del overlay */
.img-zoom-overlay img {
  max-width: 80%;
  max-height: 80%;
  border-radius: 1rem;
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

/* Estado ampliado */
.img-zoom-overlay img.zoomed {
  transform: scale(1.8);
  cursor: zoom-out;
}

/* Imagenes que pueden abrir el modal */
.zoomable {
  transition: transform 0.3s ease;
  cursor: zoom-in;
  border-radius: 0.5rem;
}

/* Animación de fadeIn opcional si quieres usarla */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.contenedor-reporte-error {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.boton-reporte-error {
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius:99px;
  color: #e74c3c;
  font-size: 0.9rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.boton-reporte-error:hover {
  background-color: #fdecea;
  border-color: #f5b7b1;
  color: #c0392b;
}

.popover-confirmacion textarea.motivo-reporte {
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  resize: vertical;
  min-height: 60px;
  box-sizing: border-box;
}

.popover-confirmacion {
  background: white;
  border: 1px solid #ccc;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.75rem;
  font-size: 0.9rem;
  width: 260px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.popover-reporte textarea.motivo-reporte {
  width: 100%;
  height: 60px;
  padding: 0.5rem;
  font-size: 0.85rem;
  resize: none;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  font-family: inherit;
  box-sizing: border-box;
}

.popover-confirmacion .acciones {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.popover-confirmacion .acciones button {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
}

.popover-confirmacion .acciones .confirmar {
  background-color: #e74c3c;
  color: white;
}

.popover-confirmacion .acciones .cancelar {
  background-color: #e0e0e0;
  color: #333;
}
