/* Pop-ups personalizables (dueño 2026-10-27). Diseño propio del club:
   en móvil una hoja que sube desde abajo; en escritorio una tarjeta
   centrada. Colores de la marca (verde Nanuc, crema), títulos Jost
   Black en mayúscula (.titulo-marca). Respeta prefers-reduced-motion. */
.np-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(11, 48, 39, .55);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0; opacity: 0; transition: opacity .25s ease;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.np-overlay.np-visible { opacity: 1; }
.np-caja {
  outline: none;
  position: relative; width: 100%; max-width: 100%;
  background: #fffdf7; color: #0b3027;
  border-radius: 28px 28px 0 0; overflow: hidden;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .25);
  transform: translateY(24px); transition: transform .32s cubic-bezier(.22, 1, .36, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Jost", system-ui, sans-serif;
}
.np-overlay.np-visible .np-caja { transform: translateY(0); }
.np-asa {
  width: 44px; height: 4px; border-radius: 4px; background: rgba(11, 48, 39, .18);
  margin: 10px auto 0;
}
.np-cerrar {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: #0b3027;
  display: grid; place-items: center; font-size: 20px; line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.np-cerrar:focus-visible { outline: 3px solid #e8632b; outline-offset: 2px; }
/* El foco inicial va al diálogo: sin anillo (el theme lo pinta en [tabindex]) */
.np-overlay .np-caja:focus, .np-overlay .np-caja:focus-visible { outline: 0; }
.np-media { position: relative; background: #0b3027; }
.np-media img { display: block; width: 100%; height: auto; max-height: 48vh; object-fit: cover; }
.np-area {
  position: absolute; display: block; border-radius: 10px;
  background: transparent; cursor: pointer;
}
.np-area:focus-visible { outline: 3px solid #e8632b; }
.np-cuerpo { padding: 20px 22px 24px; }
.np-titulo {
  margin: 0 0 8px; font-size: 26px; line-height: 1.05; letter-spacing: -.03em;
  font-weight: 900; text-transform: uppercase; text-wrap: balance;
}
.np-texto { margin: 0; font-size: 16px; line-height: 1.45; color: rgba(11, 48, 39, .82); }
.np-boton {
  display: block; margin-top: 18px; padding: 15px 18px; border-radius: 14px;
  background: #0b3027; color: #fffdf7; text-align: center; text-decoration: none;
  font-weight: 700; font-size: 16px; letter-spacing: .01em;
}
.np-boton:hover { background: #08251e; }
.np-caja[data-posicion="solo"] .np-cuerpo { display: none; }
.np-caja[data-posicion="solo"] .np-media img { max-height: 80vh; }
.np-caja.np-todo { cursor: pointer; }
.np-caja.np-todo .np-cuerpo, .np-caja.np-todo .np-media { pointer-events: none; }
.np-caja.np-todo .np-cerrar { pointer-events: auto; }

@media (min-width: 641px) {
  .np-overlay { align-items: center; padding: 24px; }
  .np-caja {
    max-width: 560px; border-radius: 24px; transform: translateY(12px) scale(.98);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
  }
  .np-asa { display: none; }
  .np-caja[data-posicion="izquierda"] { max-width: 720px; display: grid; grid-template-columns: 1fr 1fr; }
  .np-caja[data-posicion="izquierda"] .np-media img { height: 100%; max-height: none; min-height: 280px; }
  .np-caja[data-posicion="izquierda"] .np-cuerpo { padding: 32px 28px; align-self: center; }
  .np-titulo { font-size: 30px; }
}

/* Vista previa del editor: sin overlay, dentro de una caja fija */
.np-preview { position: relative; background: rgba(11, 48, 39, .08); border-radius: 16px; padding: 16px; overflow: hidden; }
.np-preview .np-overlay { position: relative; inset: auto; padding: 0; background: transparent; opacity: 1; backdrop-filter: none; -webkit-backdrop-filter: none; }
.np-preview .np-caja { transform: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); border-radius: 24px; }
.np-preview .np-media img { max-height: none; }
.np-preview .np-area { outline: 2px dashed #e8632b; background: rgba(232, 99, 43, .18); }
.np-preview .np-dibujo { position: absolute; inset: 0; cursor: crosshair; z-index: 2; }
.np-preview .np-dibujo-rect { position: absolute; border: 2px dashed #e8632b; background: rgba(232, 99, 43, .18); border-radius: 10px; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .np-overlay, .np-caja { transition: none; }
}
