/* ==========================================================================
   Asistente de Conversa Pro — estilos
   Usa las mismas variables que styles.css para no romper la identidad.
   ========================================================================== */

.asistente {
  --as-verde: #25d366;
  --as-verde-osc: #1eb857;
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ── Botones flotantes ─────────────────────────────────────────────────── */
.asistente-flotantes {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.asistente-boton {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  position: relative;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.asistente-boton:hover {
  transform: translateY(-2px) scale(1.04);
}

.asistente-boton-chat {
  background: linear-gradient(135deg, var(--azul) 0%, #6a93ff 100%);
  box-shadow: 0 8px 24px rgba(76, 125, 255, 0.42);
}

.asistente-boton-chat.asistente-oculto {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.7);
}

.asistente-boton-wa {
  background: var(--as-verde);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.42);
  text-decoration: none;
}

.asistente-boton-wa:hover {
  background: var(--as-verde-osc);
}

/* Puntito de "hay algo nuevo" */
.asistente-punto {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  background: var(--ambar);
  border: 2.5px solid #fff;
  border-radius: 50%;
  animation: as-latido 2.4s ease-in-out infinite;
}

@keyframes as-latido {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); }
}

/* ── Panel ─────────────────────────────────────────────────────────────── */
.asistente-panel {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 901;
  width: 384px;
  max-width: calc(100vw - 32px);
  max-height: min(620px, calc(100vh - 130px));
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 4px 12px rgba(11, 22, 48, 0.08), 0 32px 80px rgba(11, 22, 48, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease), visibility 0.26s;
  border: 1px solid var(--linea);
}

.asistente-panel.asistente-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Cabecera */
.asistente-cabecera {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 16px;
  background: var(--noche);
  color: #fff;
  flex-shrink: 0;
}

.asistente-avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--azul) 0%, var(--agua) 100%);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.asistente-titulo {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  flex: 1;
  min-width: 0;
}

.asistente-titulo strong {
  font-size: 14px;
  font-weight: 700;
}

.asistente-titulo span {
  font-size: 11.5px;
  opacity: 0.6;
}

.asistente-titulo span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--as-verde);
  margin-right: 5px;
  vertical-align: middle;
}

.asistente-cerrar {
  background: transparent;
  border: none;
  color: #fff;
  opacity: 0.55;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  transition: opacity 0.2s, background 0.2s;
}

.asistente-cerrar:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

/* Cuerpo */
.asistente-cuerpo {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 8px;
  background: var(--fondo-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.asistente-cuerpo::-webkit-scrollbar {
  width: 6px;
}

.asistente-cuerpo::-webkit-scrollbar-thumb {
  background: var(--linea);
  border-radius: 3px;
}

/* Filas y burbujas */
.asistente-fila {
  display: flex;
  animation: as-entrar 0.3s var(--ease);
}

@keyframes as-entrar {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.asistente-bot {
  justify-content: flex-start;
}

.asistente-usuario {
  justify-content: flex-end;
}

.asistente-burbuja {
  max-width: 86%;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--texto);
  background: #fff;
  border: 1px solid var(--linea);
  border-bottom-left-radius: 5px;
  word-wrap: break-word;
}

.asistente-usuario .asistente-burbuja {
  background: var(--azul);
  color: #fff;
  border-color: var(--azul);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 5px;
}

.asistente-burbuja a {
  color: var(--azul-osc);
  font-weight: 600;
  text-decoration: underline;
}

/* Opciones rápidas */
.asistente-opciones {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 94%;
}

.asistente-opcion {
  background: #fff;
  border: 1.5px solid var(--azul);
  color: var(--azul-osc);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.18s;
  font-family: inherit;
}

.asistente-opcion:hover {
  background: var(--azul);
  color: #fff;
  transform: translateY(-1px);
}

/* Formulario de contacto */
.asistente-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 300px;
}

.asistente-form input,
.asistente-form select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--linea);
  border-radius: 11px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--tinta);
  background: #fff;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.asistente-form input:focus,
.asistente-form select:focus {
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(76, 125, 255, 0.14);
}

.asistente-form input.asistente-error {
  border-color: #e05252;
  box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.14);
}

.asistente-form button {
  margin-top: 3px;
  padding: 12px 16px;
  border: none;
  border-radius: 11px;
  background: var(--as-verde);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
}

.asistente-form button:hover {
  background: var(--as-verde-osc);
  transform: translateY(-1px);
}

.asistente-nota {
  font-size: 10.5px;
  color: var(--suave);
  text-align: center;
  line-height: 1.4;
}

/* Pie */
.asistente-pie {
  padding: 11px 16px 14px;
  background: #fff;
  border-top: 1px solid var(--linea);
  flex-shrink: 0;
}

.asistente-wa {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  border: none;
  border-radius: 12px;
  background: var(--as-verde);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
}

.asistente-wa:hover {
  background: var(--as-verde-osc);
  transform: translateY(-1px);
}

/* ── Celular ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .asistente-flotantes {
    right: 14px;
    bottom: 14px;
    gap: 10px;
  }

  .asistente-boton {
    width: 52px;
    height: 52px;
  }

  .asistente-panel {
    right: 10px;
    left: 10px;
    bottom: 80px;
    width: auto;
    max-height: calc(100vh - 110px);
    border-radius: 18px;
  }
}

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .asistente-panel,
  .asistente-boton,
  .asistente-fila,
  .asistente-punto {
    transition: none;
    animation: none;
  }
}

/* Botón de WhatsApp en las secciones del sitio */
.btn-wa {
  background: #25d366;
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.32);
}

.btn-wa:hover {
  background: #1eb857;
  color: #fff;
}

.servicio-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
