.ps-popup {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 20px;
  pointer-events: none;
  position: fixed;
  transition: opacity .2s ease;
  visibility: hidden;
  z-index: 999999;
}

.ps-popup--visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.ps-popup__overlay {
  background: rgba(0, 0, 0, .62);
  inset: 0;
  position: absolute;
}

.ps-popup__overlay--clear { background: transparent; }

.ps-popup__dialog {
  background: var(--ps-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  color: var(--ps-text, #222);
  max-height: calc(100vh - 40px);
  max-width: var(--ps-width, 600px);
  overflow: auto;
  padding: clamp(24px, 5vw, 42px);
  position: relative;
  transform: translateY(15px) scale(.98);
  transition: transform .25s ease;
  width: 100%;
}

.ps-popup--visible .ps-popup__dialog { transform: translateY(0) scale(1); }
.ps-popup__title { color: inherit; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; margin: 0 35px 16px 0; }
.ps-popup__content { color: inherit; line-height: 1.65; }
.ps-popup__content > :last-child { margin-bottom: 0; }

.ps-popup__remember {
  align-items: flex-start;
  border-top: 1px solid rgba(127, 127, 127, .25);
  cursor: pointer;
  display: flex;
  font-size: .92rem;
  gap: 10px;
  line-height: 1.4;
  margin-top: 24px;
  padding-top: 18px;
}

.ps-popup__remember input { flex: 0 0 auto; height: 18px; margin: 1px 0 0; width: 18px; }

.ps-popup__close {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
  display: flex;
  font: 32px/1 Arial, sans-serif;
  height: 40px;
  justify-content: center;
  opacity: .65;
  padding: 0;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 40px;
}

.ps-popup__close:hover, .ps-popup__close:focus { background: rgba(127, 127, 127, .14); opacity: 1; outline: none; }
body.ps-popup-open { overflow: hidden; }

@media (max-width: 480px) {
  .ps-popup { align-items: flex-end; padding: 10px; }
  .ps-popup__dialog { border-radius: 12px 12px 8px 8px; max-height: calc(100dvh - 20px); padding: 26px 20px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .ps-popup, .ps-popup__dialog { transition: none; }
}
