/* QPal Subject Performance Clear All Stats confirmation fix.
   The confirmation must sit above the centered Subject Performance modal and
   remain fully interactive without changing the underlying reset operation. */

.confirm-overlay.qpal-subject-stats-clear-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 5600 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  place-items: center !important;
  box-sizing: border-box !important;
  padding:
    max(16px, env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px)) !important;
  overflow: auto !important;
  pointer-events: auto !important;
  overscroll-behavior: contain;
  background: var(--overlay-bg) !important;
  backdrop-filter: blur(10px) saturate(92%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(92%) !important;
}

.confirm-overlay.qpal-subject-stats-clear-overlay > .confirm-box {
  position: relative !important;
  z-index: 1 !important;
  align-self: center !important;
  justify-self: center !important;
  width: min(100%, 390px) !important;
  max-height: min(var(--qpal-popup-max-height, calc(100dvh - 32px)), calc(100dvh - 32px)) !important;
  margin: auto !important;
  overflow: auto !important;
  overscroll-behavior: contain;
}

@supports not (height: 100dvh) {
  .confirm-overlay.qpal-subject-stats-clear-overlay > .confirm-box {
    max-height: min(var(--qpal-popup-max-height, calc(100vh - 32px)), calc(100vh - 32px)) !important;
  }
}
