@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

.chat-bot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  display: none; /* Oculto por defecto */
}

/* Clase para mostrar el chat cuando el parámetro está presente */
.chat-bot.show {
  display: block;
}

.chat-bot-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-color, #7ad410);
  color: var(--text-color, #ffffff);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.chat-bot-button:hover {
  transform: scale(1.05);
}

.chat-bot-container {
  position: absolute;
  bottom: 80px;
  right: -400px; /* Inicialmente fuera de la pantalla */
  width: 350px;
  height: 500px;
  background-color: #fff;
  border-radius: 16px 0px 0px 16px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: right 700ms ease; /* Transición suave de 700ms */
  opacity: 0;
}

.chat-bot-container.active {
  display: flex;
  right: -20px; /* Posición final cuando está activo */
  opacity: 1;
}

.chat-bot-container.active.closing {
  right: -400px; /* Posición final cuando está activo */
  transition: right 700ms ease; /* Transición suave de 700ms */
}

.chat-bot-header {
  padding: 15px;
  padding-right: 20px;
  color: var(--text-color, #ffffff);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #7ad410 0% 0% no-repeat padding-box;
  border-radius: 16px 0px 0px 0px;
}

.chat-bot-title {
  text-align: left;
  width: 100%;
  align-items: center;
  display: flex;
  justify-content: space-between;
  font: normal normal 600 14px/20px Poppins;
  letter-spacing: 0.14px;
  color: #ffffff;
}
.chat-bot-title svg {
  width: 13px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 13px;
}

.chat-bot-toggle {
  background: none;
  border: none;
  color: var(--text-color, #ffffff);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.chat-bot-messages {
  flex: 1;
  padding: 15px;
  padding-right: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #f7f8f8 0% 0% no-repeat padding-box;
}

.chat-bot-welcome {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-end;
}

.quick-replies-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.quick-reply-button {
  text-align: left;
  font: normal normal bold 12px/17px Poppins;
  letter-spacing: 0.12px;
  color: #13263e;
  border: 1px solid #13263e;
  border-radius: 16px;
  text-align: left;
  font: normal normal bold 12px/17px Poppins;
  letter-spacing: 0.12px;
  color: #13263e;
  padding: 6px 12px;
  background-color: #fff;
}

.quick-reply-button:hover {
  background-color: #e5e5e5;
}

.message-container {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}

.user-message .message-container {
  align-items: flex-end;
  max-width: 100%;
}

.chat-bot-bubble {
  background-color: #d6ffa5;
  padding: 12px 15px;
  border-radius: 10px 10px 10px 0;
  position: relative;
  font:
    normal normal 500 12px/17px "Poppins",
    sans-serif;
}

.chat-bot-timestamp {
  font-size: 10px;
  color: #999;
  margin-top: 4px;
  text-align: left;
}

.user-message {
  align-self: flex-end;
  display: flex;
  flex-direction: row-reverse;
  gap: 10px;
}

.user-message .message-container {
  align-items: flex-end;
}

.user-message .chat-bot-bubble {
  background-color: var(--primary-color, #fff);
  text-align: left;
  font:
    normal normal 500 12px/17px "Poppins",
    sans-serif;
    border-radius: 10px 10px 0 10px;
  letter-spacing: 0.12px;
  color: #13263e;
}

.bot-message {
  align-self: flex-start;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-bot-input {
  padding: 15px;
  display: flex;
  border-top: 1px solid #eee;
}

.chat-bot-input input {
  flex: 1;
  padding: 10px 15px;
  border: 0;
  outline: none;
  font-size: 14px;
  color: var(--unnamed-color-67737c);
text-align: left;
font: normal normal medium 12px/20px "Poppins", sans-serif;
letter-spacing: 0.12px;
color: #000;
opacity: 1;
}
.chat-bot-input input:focus {
  box-shadow: none;
}
.chat-bot-input button {
  background-color: var(--primary-color, #7ad410);
  color: var(--text-color, #ffffff);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-left: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#chat-messages-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chat-bot-init-timestamp {
  text-align: left;
  font:
    normal normal 400 11px/20px "Poppins",
    sans-serif;
  letter-spacing: 0.11px;
  color: #67737c;
  margin-left: 70px;
}

/* Estilos para el indicador de carga circular */
.chat-loading-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 200px;
  width: 100%;
  margin: 20px 0;
}

.chat-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(122, 212, 16, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color, #7ad410);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 15px;
}

.loading-text {
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  color: #666;
}

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

.loading-bubble {
  min-width: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 12px;
}

.loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 13px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #13263e;
  display: inline-block;
  animation: bounce 1.5s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
  animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.6;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.loading-bubble {
  margin-bottom: 12px;
}

.chat-bot-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.chat-bot h1,
.chat-bot h2,
.chat-bot h3 {
  font-size: calc(var(--font-heading-h3-scale) * 1.4rem);
}

.chat-bot-existing-conversation {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-end;
}

.existing-conversation-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 15px;
}