/* Popup base */
#wpip-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 16px;
  box-sizing: border-box;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
#wpip-overlay.wpip-show { display: flex; }

/* Modal contenedor: limitado a viewport */
.wpip-modal {
  background: #fff;
  border-radius: 10px;
  width: auto;
  max-width: min(92vw, 760px);
  max-height: 92vh;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: wpipIn .24s ease-out;
}
@keyframes wpipIn { from{ transform: translateY(10px); opacity: .0; } to{ transform: translateY(0); opacity: 1; } }

/* Cuerpo con scroll si la imagen es más alta */
.wpip-body {
  padding: 12px;
  text-align: center;
  overflow: auto;
}

/* Imagen ajustada a viewport: nunca recorta, mantiene proporción */
.wpip-body img {
  display: block;
  margin: 0 auto 12px;
  height: auto;
  max-width: 100%;
  max-height: calc(92vh - 88px); /* resta paddings y botón */
  border-radius: 8px;
}

.wpip-btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  background: #111;
  color: #fff !important;
  font-weight: 600;
  line-height: 1;
}

.wpip-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
  color: #333;
  font-size: 24px;
  line-height: 32px;
}
.wpip-close:hover { background: rgba(0,0,0,.06); }
