/* Modal de confirmación: hoja aparte (sin @tailwind) para que siempre se sirva y parsee bien.
   El body del layout es flex column; sin position:fixed el modal cae debajo del footer. */

html body .app-confirm-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100dvh !important;
  z-index: 999999 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)) !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

html body .app-confirm-modal-overlay:not([hidden]) {
  display: flex !important;
}

html body .app-confirm-modal-overlay[hidden] {
  display: none !important;
}

html body .app-confirm-modal-panel {
  width: 100%;
  max-width: 28rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  border: 1px solid #e2e8f0;
  padding: 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
  max-height: min(90vh, 90dvh);
  overflow-y: auto;
}

html body .app-confirm-modal-panel h2 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
}

html body .app-confirm-modal-panel p {
  margin: 0 0 1.5rem 0;
  color: #374151;
  font-size: 0.9375rem;
  line-height: 1.5;
}

html body .app-confirm-modal-panel .app-confirm-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

html body .app-confirm-modal-panel .btn-confirm-danger {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  border: none !important;
  cursor: pointer;
  background: #dc2626 !important;
  color: #fff !important;
  text-decoration: none !important;
  -webkit-appearance: none;
  appearance: none;
}

html body .app-confirm-modal-panel .btn-confirm-danger:hover {
  background: #b91c1c !important;
}

html body .app-confirm-modal-panel .btn-confirm-muted {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  border: none !important;
  cursor: pointer;
  background: #e5e7eb !important;
  color: #374151 !important;
  text-decoration: none !important;
  -webkit-appearance: none;
  appearance: none;
}

html body .app-confirm-modal-panel .btn-confirm-muted:hover {
  background: #d1d5db !important;
}

html body.app-confirm-modal-open {
  overflow: hidden !important;
}
