@charset "utf-8";
/* ======================================================================
   SISTEMA DE ASISTENTE DE IA - ESTILOS PREMIUM (paginaweb.io)
   ====================================================================== */

/* El Botón Flotante Estilo Akky */
.pw-chat-float-btn {
  position: fixed;
  bottom: 45px;
  right: 45px;
  background: linear-gradient(135deg, #6366f1, #3b82f6); /* Tonos morado/azul de paginaweb.io */
  color: #ffffff;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pw-chat-float-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

/* Contenedor Principal de la Ventana de Chat */
.pw-chat-container {
  position: fixed;
  bottom: 95px;
  right: 25px;
  width: 380px;
  max-width: 90vw;
  height: 520px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 35px rgba(0, 0, 0, 0.15);
  display: none; /* Controlado por JS */
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border: 1px solid #f1f5f9;
}

/* Encabezado Corporativo */
.pw-chat-header {
  background: #1e293b; /* Gris oscuro institucional */
  color: #ffffff;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Área de Flujo de Mensajes */
.pw-chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f8fafc;
  font-size: 14px;
  line-height: 1.5;
}

/* Estilos de las Burbujas de Mensaje */
.pw-msg {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 12px;
  max-width: 85%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.pw-msg-ia {
  background: #ffffff;
  color: #334155;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid #e2e8f0;
}

.pw-msg-user {
  background: #3b82f6;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

/* Contenedor de Botones de Clic Rápido */
.pw-suggestions-holder {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.pw-btn-suggest {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pw-btn-suggest:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* Barra de Entrada de Texto */
.pw-chat-input-bar {
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 8px;
}

.pw-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.pw-input:focus {
  border-color: #3b82f6;
}

.pw-send-btn {
  background: #3b82f6;
  border: none;
  color: #ffffff;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.pw-send-btn:hover {
  background: #2563eb;
}
/* ======================================================================
   ETIQUETA FLOTANTE DEL BOTÓN (Optimizado para PC y Móviles)
   ====================================================================== */

/* Diseño base para computadoras */
.pw-chat-tooltip {
  position: absolute;
  right: 75px; /* La separa a la izquierda del botón de robot */
  background-color: #ffffff;
  color: var(--pw-text-dark);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  font-family: system-ui, -apple-system, sans-serif;
  pointer-events: none;
  animation: pwFadeInLeft 0.5s ease forwards;
  z-index: 9998;
}

/* El pequeño triángulo indicador que apunta al robot */
.pw-chat-tooltip::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent #ffffff;
}

/* Animación de entrada suave */
@keyframes pwFadeInLeft {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ======================================================================
   CÓDIGO ADAPTATIVO PARA MÓVILES (Para que SÍ se vea en tu Celular)
   ====================================================================== */
@media screen and (max-width: 768px) {
  .pw-chat-tooltip {
    display: inline-block !important; /* Forzamos a que aparezca en pantallas táctiles */
    right: 70px; /* Lo acercamos un poquito más al botón en pantallas chicas */
    padding: 6px 12px; /* Reducimos el colchón interno para ahorrar espacio */
    font-size: 11px; /* Letra ligeramente más pequeña y estilizada para cel */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  }
  
  /* Ajuste dinámico: si el chat móvil se abre a pantalla completa, la etiqueta se esconde automáticamente */
  .pw-chat-container[style*="display: flex"] ~ .pw-chat-float-btn .pw-chat-tooltip {
    display: none !important;
  }
}

.pw-whatsapp-header-btn:hover {
  transform: scale(1.18);
  filter: drop-shadow(0 0 4px rgba(37, 211, 102, 0.4));
}