.chat_ {
      position: fixed;
      bottom: 0;
      left: 0;
      margin-bottom: 15px;
      margin-left: 15px;
      cursor: pointer;
      z-index: 999999;
  }

  .hidden {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, max-height 0.4s ease;
  pointer-events: none;
  }

  /* Estado visible */
  .visible {
  opacity: 1;
  max-height: 600px; /* ajusta según el contenido */
  pointer-events: auto;
  }

        /* Contenedor principal */
#chatForm_ {
  position: fixed;
  bottom: 90px;
  left: 15px;
  width: 375px;
  height: 550px; /* 650px */
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 0;
  box-sizing: border-box;
  z-index: 9999;
  transition: opacity 0.4s ease, max-height 0.4s ease;
  font-family: 'DM Sans', sans-serif;

  /* Quitamos overflow de aquí para que scroll solo en chatFormTexto */
  overflow: hidden;

  /* Flex para columna */
  display: flex;
  flex-direction: column;
}

/* Contenido con scroll: formulario + respuestas */
.chatFormTexto {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px;
  box-sizing: border-box;
}

.chatFormTexto p {
  margin-top: 0px;
  font-size: 13px;
  line-height: 15px;
}

/* Footer fijo en la parte inferior dentro de #chatForm_ */
.chatFooter {
  flex: 0 0 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid #ccc;
  color: #cccccc;
  font-size: 10px;
  background-color: #fff;
  box-sizing: border-box;
  user-select: none;
  padding: 0 15px;
  text-transform: uppercase;
}

.chatFooter img {
  height: 20px;
  user-select: none;
}

/* CABECERA */
.chatHeader {
  display: flex;
  background-color: #d9c9ae;
  color: #fff;
  padding: 10px;
  align-items: center;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

/* imagen cabecera */
.chatHeader__left img {
  height: 100px;
}

.chatHeader__center {
  flex: 1;
  padding: 0 10px;
}

.chatBubble {
  background-color: #fff;
  color: #000;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  position: relative;
}

.chatBubble::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 14px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 12px solid #fff;
}

/* Botón cerrar */
.chatHeader__right button {
  background: none;
  border: none;
  color: #000000;
  font-size: 24px;
  cursor: pointer;
  padding: 0 10px;
}

/* Responsive: ocupar todo el ancho y alto en móvil */
@media (max-width: 600px) {
  #chatForm_ {
    width: 94%;
    height: 100vh;
    left: 0;
    bottom: 0;
    border-radius: 0;
    margin-left: 15px;
    margin-top: 15px;
    margin-right: 15px;
  }
}

/* Estilo formulario */
.chatFormTexto p {
  margin-top: 0px;
  font-size: 13px;
  line-height: 15px;
}

#chatForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#chatForm .chatInputWrapper {
  display: flex;
  gap: 8px;
  margin-top: 0px;
  padding-top: 10px;
}

#chatForm input[type="text"] {
  flex: 1 1 80%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  height: 35px;
}

#chatForm button {
  flex: 0 0 20%;
  background-color: #cd423d;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

#chatForm button:hover {
  background-color: #b53a34;
}

#chatForm button svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}


.conversacion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 5px;
  max-height: 300px;
  overflow-y: auto;
}

.mensaje-usuario, .mensaje-asistente {
  max-width: 70%;
  padding: 5px 5px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.4;
}

.mensaje-usuario {
  align-self: flex-start;
  background-color: #e7e4e4;
}

.mensaje-asistente {
  align-self: flex-end;
  background-color: #f2f1f1;
}

.icon-loading {
  animation: spin 1s linear infinite;
  color: #ffffff !important;
}

.hidden {
  display: none !important;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.chat_ img {
  max-height: 70px;
}


    .form-table {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .form-table tr {
        display: contents; /* Para que los tr no afecten la estructura grid */
    }
    .form-table th, .form-table td {
        display: block;
        margin-bottom: 10px;
    }
