/* ------------------------------------------------------------
   PARANICE POPUP MODAL — shared confirm / progress / result modal
   Used sitewide (admin + public) in place of native confirm()/alert()
   and small toast notifications. Namespaced with a ppm- prefix so it
   never collides with any page's own .modal-backdrop/.modal classes.
   ------------------------------------------------------------ */
.ppm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 30, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 100000;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.ppm-backdrop.ppm-show { opacity: 1; }

.ppm-card {
  width: min(440px, 100%);
  position: relative;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  padding: 30px 26px 24px;
  overflow: hidden;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  text-align: center;
}
.ppm-backdrop.ppm-show .ppm-card { transform: translateY(0) scale(1); }

.ppm-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(135deg, #ff3fa8, #7a2cff);
}

.ppm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
  color: #666;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ppm-close:hover { background: rgba(0, 0, 0, 0.08); }

.ppm-icon {
  width: 56px;
  height: 56px;
  margin: 4px auto 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ff3fa8, #7a2cff);
}
.ppm-icon:empty { display: none; }
.ppm-icon.ppm-success { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.ppm-icon.ppm-error { background: linear-gradient(135deg, #ff5f6d, #e0296b); }
.ppm-icon.ppm-warn { background: linear-gradient(135deg, #ffb347, #ffcc4d); }

.ppm-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 8px;
  line-height: 1.3;
}
.ppm-title:empty { display: none; }

.ppm-msg {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.55;
  margin: 0;
}
.ppm-msg:empty { display: none; }

.ppm-details {
  margin: 16px 0 0;
  padding: 4px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
}
.ppm-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 2px;
  font-size: 0.85rem;
}
.ppm-detail-row + .ppm-detail-row { border-top: 1px solid rgba(0, 0, 0, 0.06); }
.ppm-detail-label { color: #8a8a8a; font-weight: 700; flex-shrink: 0; }
.ppm-detail-value { color: #1a1a1a; font-weight: 700; text-align: right; word-break: break-word; }

.ppm-progress-wrap { margin-top: 18px; }
.ppm-progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(122, 44, 255, 0.1);
  overflow: hidden;
}
.ppm-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff3fa8, #7a2cff);
  transition: width 0.25s ease;
  box-shadow: 0 0 16px rgba(255, 63, 168, 0.35);
}
.ppm-progress-label {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #8a8a8a;
}
.ppm-progress-note {
  margin-top: 4px;
  font-size: 11.5px;
  color: #a3a3a3;
}

.ppm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.ppm-actions:empty { margin-top: 0; }

.ppm-btn {
  flex: 1;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f4f4f6;
  color: #333;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.ppm-btn:hover { opacity: 0.9; }
.ppm-btn:active { transform: scale(0.97); }
.ppm-btn-primary {
  border: 0;
  background: linear-gradient(135deg, #ff3fa8, #7a2cff);
  color: #fff;
}
.ppm-btn-danger {
  border: 0;
  background: linear-gradient(135deg, #ff5f6d, #e0296b);
  color: #fff;
}

@media (max-width: 480px) {
  .ppm-card { padding: 26px 20px 20px; border-radius: 20px; }
  .ppm-actions { flex-direction: column-reverse; }
}
