/* =======================================================
   CONTADOR DE VISTAS LRPD (COMPONENTE INDEPENDIENTE)
   Todas las clases empiezan por .vc- para NO chocar con nada.
   Paleta: blanco / grises / negro, con un ligero brillo tipo radar.
   ======================================================= */

/* POSICIÓN DEL CONTADOR
   --------------------------------------
   - Ahora está en la ESQUINA INFERIOR DERECHA.
   - Para moverlo, cambia estas propiedades:

       bottom: 16px;   // distancia al borde inferior
       right: 16px;    // cambia a left: 16px; si lo quieres a la izquierda
       top: 16px;      // si prefieres parte superior, usa top + left/right
   -------------------------------------- */
.vc-counter {
  position: fixed;
  bottom: 67px; /* <-- modifica aquí la posición vertical */
  right: 16px; /* <-- cámbialo a left: 16px si lo quieres al otro lado */

  z-index: 99999;
  pointer-events: none; /* no bloquea clics de otros botones debajo */

  /* área del radar, centrada en su contenido */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* halo de radar (círculo suave que pulsa) */
.vc-counter::before {
  content: '';
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.16),
    transparent 60%
  );
  opacity: 0.6;
  transform: scale(0.9);
  mix-blend-mode: screen;
  animation: vc-radar 2.8s ease-out infinite;
}

/* núcleo del contador */
.vc-core {
  pointer-events: auto; /* el núcleo sí recibe clics si algún día lo necesitas */

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 6px 12px;
  border-radius: 999px;

  background: linear-gradient(
    135deg,
    rgba(15, 15, 15, 0.95),
    rgba(24, 24, 27, 0.98)
  );
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(17, 24, 39, 0.9);

  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  color: #e5e7eb;

  backdrop-filter: blur(12px);
}

/* pequeño punto luminoso */
.vc-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #e5e7eb; /* casi blanco */
  box-shadow: 0 0 6px rgba(248, 250, 252, 0.9),
    0 0 20px rgba(148, 163, 184, 0.7);
  animation: vc-dot-pulse 1.8s ease-in-out infinite;
}

/* bloque de texto */
.vc-text-block {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.vc-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #9ca3af;
}

.vc-number {
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #f9fafb;
}

/* Animación suave cuando sube el número */
.vc-number-bump {
  animation: vc-bump 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ========== Animaciones ========== */

/* radar suave (halo) */
@keyframes vc-radar {
  0% {
    opacity: 0.55;
    transform: scale(0.85);
  }
  40% {
    opacity: 0.9;
    transform: scale(1.05);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

/* pulso del punto central */
@keyframes vc-dot-pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

/* pequeño salto del número */
@keyframes vc-bump {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.8;
  }
  30% {
    transform: translateY(-1px) scale(1.16);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 768px) {
  .vc-counter {
    bottom: 12px; /* puedes ajustar sólo para móvil si quieres */
    right: 12px;
  }

  .vc-core {
    padding: 5px 10px;
  }

  .vc-counter::before {
    width: 64px;
    height: 64px;
  }

  .vc-number {
    font-size: 0.9rem;
  }

  .vc-label {
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  .vc-counter {
    bottom: 56px;
    right: 10px;
  }

  .vc-core {
    padding: 4px 8px;
    gap: 6px;
  }

  .vc-counter::before {
    width: 54px;
    height: 54px;
  }

  .vc-dot {
    width: 8px;
    height: 8px;
  }

  .vc-number {
    font-size: 0.82rem;
  }

  .vc-label {
    font-size: 0.58rem;
    letter-spacing: 0.18em;
  }
}

/* Respeto a usuarios que prefieren menos animación */
@media (prefers-reduced-motion: reduce) {
  .vc-counter::before,
  .vc-dot,
  .vc-number {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
