/* Botón flotante del asistente */
.chat-button {
  position: fixed !important;
  bottom: 10px !important;
  right: 20px !important;  
  min-width: 65px !important;
  height: 55px !important;
  padding: 0 20px !important;
  background: linear-gradient(135deg, var(--c2), var(--c2b)) !important;
  border-radius: 20px !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 8px 25px rgba(11, 34, 39, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  transition: all 0.3s ease !important;
  z-index: 99999 !important;
  color: white !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

.chat-button:hover {
  background: linear-gradient(135deg, var(--c2b), var(--c2)) !important;
  transform: translateX(-5%) scale(1.05) !important;
  box-shadow: 0 8px 25px rgba(11, 34, 39, 0.75);
}

.chat-button i {
  font-size: 24px !important;
  color: white !important;
}

.chat-button-avatar {
  width: 40px !important;
  height: 40px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18) !important;
}

.chat-button.active {
  background: linear-gradient(135deg, var(--c2) 0%, var(--c2b) 100%) !important;
}

/* Ventana del chat */
.chat-window {
  position: fixed !important;
  bottom: 70px !important;
  right: 25px !important;  
  width: 380px !important;
  height: 500px !important;
  background: var(--c2) !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
  display: none !important;
  flex-direction: column !important;
  overflow: hidden !important;
  z-index: 99998 !important;
  
}

.chat-window.active {
  display: flex !important;
}

.inp-chat-close{
  filter:brightness(0) invert(1);
  opacity:.9;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.chat-header {
  color: white !important;
  padding: 5px 10px !important; /* Cambiado de 10px a 5px arriba/abajo */
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.chat-header-avatar {
  width: 40px !important;
  height: 40px !important; 
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 30px !important;
  transform-origin: 70% 70% !important;
}

.chat-header-avatar.is-waving {
  animation: assistantWave 0.9s ease-in-out 2 !important;
}

@keyframes assistantWave {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  15% {
    transform: rotate(18deg) scale(1.08);
  }
  30% {
    transform: rotate(-12deg) scale(1.04);
  }
  45% {
    transform: rotate(16deg) scale(1.08);
  }
  60% {
    transform: rotate(-8deg) scale(1.02);
  }
  75% {
    transform: rotate(10deg) scale(1.05);
  }
}

.chat-header-info h1 {
  font-size: 35px !important;
  margin-top: 15px !important; /* Reducido de 10px a 5px */
  margin-bottom: 2px !important; /* Reducido de 3px a 2px */
  margin-left: 5px !important;
  color: white !important;
}

/* Cuerpo del chat */
.chat-body {
  flex: 1 !important;
  padding: 10px !important;
  overflow-y: auto !important;
  background: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Contenedor de mensajes */
.chat-messages {
  display: flex !important;
  flex-direction: column !important;
  gap: 15px !important;
  flex: 1 !important;
}

/* Estructura de cada mensaje */
.message {
  display: flex !important;
  gap: 10px !important;
  align-items: flex-start !important;
  animation: fadeIn 0.3s ease !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  flex-direction: row-reverse !important;
}

.message.assistant {
  justify-content: flex-start !important;
  flex-direction: row !important;
}

/* Avatar del mensaje */
.message-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  flex-shrink: 0 !important;
  background: white !important;
  color: white !important;
}

.message.user .message-avatar {
  background: var(--c2b) !important;
}

.message.assistant .message-avatar {
  background: var(--c2b) !important;
}

/* Contenido del mensaje */
.message-content {
  max-width: 70% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

/* Burbuja del mensaje */
.message-bubble {
  padding: 12px 16px !important;
  border-radius: 18px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  word-wrap: break-word !important;
  background-color: white !important;
}

.message.assistant .message-bubble {
  background: white !important;
  color: #333 !important;
  border-bottom-left-radius: 4px !important;
}

.message.user .message-bubble {
  background: linear-gradient(135deg, white 0%, white 100%) !important;
  border-bottom-right-radius: 4px !important;
}

/* Tiempo del mensaje */
.message-time {
  font-size: 11px !important;
  color: #727171 !important;
  padding: 0 5px !important;
}

.message.user .message-time {
  text-align: right !important;
}

/* Pie del chat */
.chat-footer {
  padding: 8px !important;
  background: white !important;
  border-top: 1px solid #eee !important;
  display: none !important;
  gap: 5px !important;
  align-items: center !important;
}

.chat-footer.active {
  display: flex !important;
}

.chat-input {
  flex: 1 !important;
  padding: 10px 16px !important;
  border: 1px solid #ddd !important;
  border-radius: 15px !important;
  font-size: 14px !important;
  outline: none !important;
  transition: border-color 0.2s ease !important;
}

.chat-input:focus {
  border-color: var(--c2b) !important;
}

.send-button {
  width: 45px !important;
  height: 45px !important;
  background: linear-gradient(135deg, var(--c2b) 0%, var(--c2) 100%) !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  flex-shrink: 0 !important;
  color: white !important;
  box-shadow: 0 6px 16px rgba(253, 118, 28, 0.35) !important;
}

.send-button:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 8px 20px rgba(255, 102, 0, 0.4) !important;
}

.send-button i {
  font-size: 18px !important;
  color: white !important;
}

.clear-button {
  width: 45px !important;
  height: 45px !important;
  background: linear-gradient(135deg, #fff3eb 0%, #ffe2d0 100%) !important;
  border: 1px solid rgba(253, 118, 28, 0.35) !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
  color: var(--c2b) !important;
  box-shadow: 0 4px 12px rgba(253, 118, 28, 0.18) !important;
}

.clear-button:hover {
  transform: scale(1.05) !important;
  background: linear-gradient(135deg, #ffe9dc 0%, #ffd4bc 100%) !important;
  border-color: rgba(255, 102, 0, 0.45) !important;
  box-shadow: 0 6px 16px rgba(253, 118, 28, 0.24) !important;
}

.clear-button i {
  font-size: 18px !important;
  color: var(--c2b) !important;
}

/* Indicador de escritura */
.typing-indicator {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 12px 16px !important;
  background: white !important;
  border-radius: 18px !important;
  width: fit-content !important;
}

.typing-indicator span {
  display: block !important;
  width: 8px !important;
  height: 8px !important;
  background: var(--c2) !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  animation: typing 1.4s infinite !important;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s !important;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s !important;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Mensaje de bienvenida */
.welcome-message {
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  flex: 1 !important;
}

.welcome-message .message-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: var(--c2) !important;
  color: white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  flex-shrink: 0 !important;
}

.welcome-message .message-content {
  background: white !important;
  padding: 12px 16px !important;
  border-radius: 18px !important;
  border-bottom-left-radius: 4px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: #333 !important;
  max-width: 70% !important;
}

/* Responsive */
@media (max-width: 480px) {
  .chat-window {
    width: calc(100vw - 20px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    height: calc(100vh - 250px) !important;
  }

  .message-content {
    max-width: 75% !important;
  }
}

#buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: min(100%, 320px);
  margin: 0 auto;
  padding: 12px;
  
 
}

#buttons-grid .btn {
  display: flex;
  flex-direction: row;  
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  text-decoration: none;
  border: 2px solid;
  text-align: left;
  cursor: pointer;
}


#btn-whatsapp {
  background: #fff;
  color: #1e7d3a;
  border-color: #25d366;
}

/* Botón Teléfono */
#btn-phone {
  background: #fff;
  color: #1f4fa3;
  border-color: #3b82f6;
}

/* Botón Ubicación */
#btn-location {
  background: #fff;
  color: #d32f2f;
  border-color: #ef5350;
}


.btn-Chat {
  background: linear-gradient(135deg, #fff7f2 0%, #ffe7d6 100%);
  color: #b94f0b;
  border: 2px solid rgba(253, 118, 28, 0.22);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: "Nunito", sans-serif;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(253, 118, 28, 0.16);
}

.btn-Chat .icon,
.btn-Chat .text {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-Chat:hover {
  background: linear-gradient(135deg, var(--c2b), var(--c2));
  border-color: rgba(255, 102, 0, 0.35);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(253, 118, 28, 0.28);
}

.inp-Chat {
  background: linear-gradient(135deg, #fff7f2 0%, #ffe7d6 100%);
  color: #b94f0b;
  border: 2px solid rgba(253, 118, 28, 0.22);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: "Nunito", sans-serif;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(253, 118, 28, 0.16);
}

.reg-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
}

.reg-header {
  font-size: 13px;
  font-weight: 600;
  color: #b94f0b;
  text-align: center;
}

#regForm {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 12px !important;
}

.reg-input {
  width: 100% !important;
  padding: 10px 12px !important;
  border: 2px solid rgba(253, 118, 28, 0.22) !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-family: "Nunito", sans-serif !important;
  outline: none !important;
  background: #fff !important;
  color: #333 !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease !important;
}

.reg-input:focus {
  border-color: var(--c2b) !important;
}

.reg-btn {
  width: 100% !important;
  padding: 10px !important;
  background: linear-gradient(135deg, var(--c2b), var(--c2)) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  font-family: "Nunito", sans-serif !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(253, 118, 28, 0.25) !important;
}

.reg-btn:hover {
  transform: scale(1.02) !important;
  box-shadow: 0 6px 16px rgba(253, 118, 28, 0.35) !important;
}

#regForm.hidden {
  display: none !important;
}
