/**
 * Low-spec lite motion — ~80ms opacity fade only (no zoom / animate.css / backdrop-filter).
 */
:root {
  --ppos-lite-ms: 80ms;
}

@keyframes ppos-lite-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes ppos-lite-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.pp-overlay-lite-in {
  animation: ppos-lite-fade-in var(--ppos-lite-ms) ease-out both !important;
}

.pp-overlay-lite-out {
  animation: ppos-lite-fade-out var(--ppos-lite-ms) ease-out both !important;
}

.swal2-popup.pp-swal-lite-in {
  animation: ppos-lite-fade-in var(--ppos-lite-ms) ease-out both !important;
}

.swal2-popup.pp-swal-lite-out {
  animation: ppos-lite-fade-out var(--ppos-lite-ms) ease-out both !important;
}

.swal2-container.pp-swal-lite-backdrop-in.swal2-backdrop-show {
  animation: ppos-lite-fade-in var(--ppos-lite-ms) ease-out both !important;
}

.swal2-container.pp-swal-lite-backdrop-out {
  animation: ppos-lite-fade-out var(--ppos-lite-ms) ease-out both !important;
}

html.ppos-low-motion .modal.fade,
html.ppos-low-motion .modal-backdrop.fade {
  transition: opacity var(--ppos-lite-ms) linear !important;
}

html.ppos-low-motion
  .modal.show:not(.modal-zoom-fade):not(.prod-modal-modern):not(.prod-tab-modal):not(.no-modal-md-pop)
  .modal-dialog {
  animation: ppos-lite-fade-in var(--ppos-lite-ms) ease-out both !important;
  transform: none !important;
}

html.ppos-low-motion .modal.modal-zoom-fade .modal-dialog {
  transition: opacity var(--ppos-lite-ms) linear !important;
  transform: none !important;
  opacity: 1 !important;
}

html.ppos-low-motion .app-overlay-panel.animate__animated,
html.ppos-low-motion .app-overlay-backdrop.animate__animated,
html.ppos-low-motion .pp-overlay-lite-in,
html.ppos-low-motion .pp-overlay-lite-out {
  animation-duration: var(--ppos-lite-ms) !important;
  --animate-duration: var(--ppos-lite-ms) !important;
}

html.ppos-low-motion .swal2-show,
html.ppos-low-motion .swal2-hide,
html.ppos-low-motion .swal2-backdrop-show,
html.ppos-low-motion .swal2-backdrop-hide {
  animation-duration: var(--ppos-lite-ms) !important;
}

html.ppos-low-motion .swal2-popup .swal2-icon,
html.ppos-low-motion .swal2-popup .swal2-icon * {
  animation: none !important;
}

html.ppos-low-motion .swal2-container.swal2-backdrop-show,
html.ppos-low-motion .swal2-container.pp-swal-container {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.ppos-low-motion .swal-stacked-overlay,
html.ppos-low-motion .swal-stacked-content {
  animation: ppos-lite-fade-in var(--ppos-lite-ms) ease-out both !important;
}

html.ppos-low-motion body.pos-sell-tab .modal.fade,
html.ppos-low-motion body.pos-sell-tab .modal-backdrop.fade {
  transition: opacity var(--ppos-lite-ms) linear !important;
}

/* POS sell tab disables all motion — restore lite dialog motion on weak devices */
html.ppos-low-motion body.pos-sell-tab .swal2-popup,
html.ppos-low-motion body.pos-sell-tab .swal2-container,
html.ppos-low-motion body.pos-sell-tab .modal,
html.ppos-low-motion body.pos-sell-tab .modal-backdrop,
html.ppos-low-motion body.pos-sell-tab .modal-dialog,
html.ppos-low-motion body.pos-sell-tab .app-overlay-panel,
html.ppos-low-motion body.pos-sell-tab .app-overlay-backdrop {
  animation-duration: var(--ppos-lite-ms) !important;
  transition-duration: var(--ppos-lite-ms) !important;
}
