/* NextPing Floating Cart v0.1.0 — autónomo, sin CSS Master.
   Posición: encima de WhatsApp en escritorio, encima de Subir en móvil. */
.npfc-float {
  position: fixed !important;
  z-index: 2147481300 !important;
  right: max(18px, env(safe-area-inset-right, 0px)) !important;
  left: auto !important;
  bottom: calc(158px + env(safe-area-inset-bottom, 0px)) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
  min-height: 54px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
  background: #1769e0 !important;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(15,42,86,.24) !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease !important;
  -webkit-tap-highlight-color: transparent;
}
.npfc-float[hidden] { display: none !important; }
.npfc-float svg {
  display: block !important;
  flex: none !important;
  width: 27px !important;
  height: 27px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
}
.npfc-float:hover, .npfc-float:focus-visible {
  background: #1159c4 !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(15,42,86,.30) !important;
}
.npfc-float:focus-visible { outline: 3px solid #0f2a56 !important; outline-offset: 3px !important; }
.npfc-count {
  position: absolute !important;
  top: -7px !important;
  right: -7px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 22px !important;
  height: 22px !important;
  padding: 0 5px !important;
  border: 2px solid #fff !important;
  border-radius: 100px !important;
  box-sizing: border-box !important;
  background: #e74149 !important;
  color: #fff !important;
  font: 700 11px/1 system-ui, -apple-system, sans-serif !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.18) !important;
  pointer-events: none !important;
}
.npfc-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 1024px) {
  .npfc-float {
    right: max(16px, env(safe-area-inset-right, 0px)) !important;
    bottom: calc(106px + env(safe-area-inset-bottom, 0px)) !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
  }
  /* Dock NextPing activo: la flecha Subir está aprox. a 88px del borde. */
  body.npmn-enabled .npfc-float {
    bottom: calc(156px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
/* En horizontal, WhatsApp vuelve al lado derecho. */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .npfc-float { bottom: calc(158px + env(safe-area-inset-bottom, 0px)) !important; }
  body.npmn-enabled .npfc-float { bottom: calc(166px + env(safe-area-inset-bottom, 0px)) !important; }
}
@keyframes npfc-cart-pulse {
  0% { box-shadow: 0 6px 20px rgba(15,42,86,.24); }
  50% { box-shadow: 0 0 0 8px rgba(23,105,224,.17), 0 8px 22px rgba(15,42,86,.25); }
  100% { box-shadow: 0 6px 20px rgba(15,42,86,.24); }
}
.npfc-float.npfc-pulse { animation: npfc-cart-pulse .58s ease-out !important; }
/* Igual que WhatsApp: no interrumpir clases, lecciones ni exámenes. */
body.ld-in-focus-mode .npfc-float,
body:has(.npqb-exam-launcher, .npqb-demo-shell, .npqb-exam-stage:not([hidden])) .npfc-float {
  display: none !important;
  pointer-events: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .npfc-float { transition: none !important; }
  .npfc-float.npfc-pulse { animation: none !important; }
}
@media print { .npfc-float { display: none !important; } }
