/* ===== Overlay Viewer ===== */
#wppp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.60);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  z-index: 99999;
}
#wppp-overlay.show { display: block; }

.wppp-modal {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 95vw);
  height: 90vh;
  background: #fff;
  color: #000;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wppp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f2f2f2;
  border-bottom: 1px solid #e6e6e6;
  font-weight: 600;
  color: #333;
}
.wppp-close {
  background: #8b1f1a;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 14px;
  cursor: pointer;
}
.wppp-pdf-container {
  padding: 12px 10px;
  overflow: auto;
  height: calc(90vh - 48px);
  outline: none;
  box-sizing: border-box;
  text-align: center;
}
.wppp-page {
  background: #fff;
  color: #000;
  margin: 0 auto 14px;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  overflow: hidden;
  max-width: calc(100% - 8px);
}
.wppp-skeleton {
  margin: 0 auto;
  width: 90%;
  max-width: 820px;
  height: 420px;
  border-radius: 8px;
  background: linear-gradient(90deg, #ececec 0%, #f7f7f7 50%, #ececec 100%);
  animation: wppp-shimmer 1.2s infinite linear;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
}
@keyframes wppp-shimmer {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.wppp-error {
  background: #ffe0e0;
  color: #a30000;
  padding: 12px 14px;
  border-radius: 8px;
  margin: 18px auto;
  width: 80%;
}
