/* ═══════════════════════════════════════════════════════════════
   POPUP MANAGER — Frontend Popup Styles
   ═══════════════════════════════════════════════════════════════ */

#pm-popup {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999999;
  width: 320px;
  max-width: calc(100vw - 48px);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.10);
  border-left: 5px solid #2271b1;
  overflow: hidden;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}
#pm-popup.pm-popup--visible { transform: translateY(0); opacity: 1; }
#pm-popup.pm-popup--hiding  { transform: translateY(120%); opacity: 0; }

.pm-popup__inner {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px;
}
.pm-popup__image {
  width: 56px; height: 56px; border-radius: 8px; object-fit: cover;
  flex-shrink: 0; border: 1px solid rgba(0,0,0,.06);
}
.pm-popup__body  { flex: 1; min-width: 0; }
.pm-popup__title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; font-weight: 700; color: #1d2327; line-height: 1.3; margin: 0 0 5px 0;
}
.pm-popup__message {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px; color: #50575e; line-height: 1.5; margin: 0;
}
.pm-popup__close {
  position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.06); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #50575e; padding: 0;
  transition: background .15s, color .15s;
}
.pm-popup__close:hover { background: rgba(0,0,0,.14); color: #1d2327; }

.pm-popup__link {
  display: inline-block;
  margin-top: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #2271b1;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.pm-popup__link:hover { text-decoration: underline; }

.pm-popup__progress { height: 3px; background: rgba(34,113,177,.15); position: relative; overflow: hidden; }
.pm-popup__progress-bar {
  height: 100%; background: #2271b1; width: 100%; transform-origin: left;
  animation: pm-progress var(--pm-duration, 10s) linear forwards;
}
@keyframes pm-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 480px) {
  #pm-popup { bottom: 16px; left: 16px; right: 16px; width: auto; max-width: none; }
}
