/* =====================================================
   NP UI — toast + confirm modal + field tooltip
   Componentes custom para reemplazar alert/confirm/validation nativa
   ===================================================== */

/* ===== Toast (notificacion abajo-derecha) ===== */
.np-toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.np-toast {
  background: #1F1F1C;
  color: #fff;
  padding: 14px 20px;
  border-radius: 3px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
  min-width: 280px;
  max-width: 420px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(.22,.61,.36,1), opacity 0.3s ease;
  pointer-events: auto;
}
.np-toast.is-visible { transform: translateX(0); opacity: 1; }
.np-toast.is-leaving { transform: translateX(110%); opacity: 0; }
.np-toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: #fff;
  color: #1F1F1C;
}
.np-toast.success .np-toast-icon { background: #4A6B3F; color: #fff; }
.np-toast.error .np-toast-icon { background: #B00020; color: #fff; }
.np-toast.warning .np-toast-icon { background: #B59A6A; color: #fff; }
.np-toast-body { flex: 1; line-height: 1.4; }
.np-toast-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 4px;
  align-self: flex-start;
}
.np-toast-close:hover { color: #fff; }
@media (max-width: 540px) {
  .np-toast-stack { left: 16px; right: 16px; bottom: 16px; }
  .np-toast { min-width: 0; max-width: 100%; }
}

/* ===== Modal (confirm/alert) ===== */
.np-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 20px;
}
.np-modal-backdrop.is-visible { opacity: 1; }
.np-modal {
  background: #fff;
  width: 100%;
  max-width: 440px;
  border-radius: 4px;
  padding: 32px 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.32);
  transform: translateY(12px);
  transition: transform 0.25s cubic-bezier(.22,.61,.36,1);
  font-family: 'Inter', sans-serif;
}
.np-modal-backdrop.is-visible .np-modal { transform: translateY(0); }
.np-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #F7F4EF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.np-modal-icon svg { width: 28px; height: 28px; }
.np-modal.warning .np-modal-icon { background: #FBF4E4; color: #B59A6A; }
.np-modal.danger .np-modal-icon { background: #F4E4E4; color: #B00020; }
.np-modal.info .np-modal-icon { background: #E5EEF4; color: #2A5C8B; }
.np-modal-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  text-align: center;
  margin: 0 0 8px;
  color: #1F1F1C;
}
.np-modal-message {
  text-align: center;
  color: #4A4744;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 24px;
}
.np-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.np-modal-btn {
  padding: 12px 24px;
  font-family: inherit;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid #1F1F1C;
  cursor: pointer;
  border-radius: 2px;
  font-weight: 500;
  transition: all 0.18s ease;
}
.np-modal-btn-primary { background: #1F1F1C; color: #fff; }
.np-modal-btn-primary:hover { background: #000; }
.np-modal-btn-danger { background: #B00020; border-color: #B00020; color: #fff; }
.np-modal-btn-danger:hover { background: #8A0019; border-color: #8A0019; }
.np-modal-btn-secondary { background: #fff; color: #1F1F1C; }
.np-modal-btn-secondary:hover { background: #F7F4EF; }

/* ===== Field tooltip (validacion custom) ===== */
.np-field-tip {
  position: absolute;
  background: #B00020;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 3px;
  z-index: 9000;
  max-width: 280px;
  box-shadow: 0 4px 12px rgba(176,0,32,0.22);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  line-height: 1.35;
}
.np-field-tip.is-visible { opacity: 1; transform: translateY(0); }
.np-field-tip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 16px;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #B00020;
}
.np-invalid {
  border-color: #B00020 !important;
  box-shadow: 0 0 0 3px rgba(176,0,32,0.12) !important;
}
