:root{
  --eip-z: 2147483647;
  --eip-backdrop: rgba(0,0,0,.55);
}
.eip-hidden{ display:none !important; }
.eip-lock { overflow:hidden !important; }
#eip-overlay{
  position:fixed; inset:0; z-index:var(--eip-z);
  display:flex; align-items:center; justify-content:center;
}
#eip-overlay .eip-backdrop{ position:absolute; inset:0; background:var(--eip-backdrop); }
#eip-overlay .eip-modal{
  position:relative; background:#fff0; border-radius:14px;
  max-width:min(90vw, 720px); max-height:85vh;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:0; box-shadow:0 10px 30px rgba(0,0,0,.25); z-index:1;
  opacity:0; transform:scale(.96) translateY(8px);
  overflow:visible;
}
#eip-overlay .eip-img{
  display:block; max-width:100%; max-height:calc(85vh - 42px);
  height:auto; width:auto; border-radius:12px;
}
#eip-overlay .eip-img-link{ display:inline-block; line-height:0; }

/* Close button base */
.eip-close{
  position:absolute; width:38px; height:38px; border-radius:50%;
  border:0; box-shadow:0 4px 12px rgba(0,0,0,.28);
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  font-size:22px; font-weight:800; line-height:1;
  transition:transform .18s ease-in-out, background .18s;
  z-index:3;
}
.eip-close:hover{ transform:scale(1.08); }

/* Positions */
.eip-close--tri{ top:8px; right:8px; }
.eip-close--tli{ top:8px; left:8px; }
.eip-close--tro{ top:-14px; right:-14px; }
.eip-close--tlo{ top:-14px; left:-14px; }

/* Styles */
.eip-close--light{ background:#fff; color:#222; outline:2px solid rgba(0,0,0,.04); }
.eip-close--light:hover{ background:#f5f5f5; }
.eip-close--dark{ background:#111; color:#fff; outline:2px solid rgba(255,255,255,.06); }
.eip-close--dark:hover{ background:#000; }

#eip-overlay .eip-powered{
  margin-top:8px; font-size:12px; color:#ffffff;
  background:rgba(0,0,0,.55); padding:4px 8px; border-radius:999px; user-select:none;
}

/* Animations */
@keyframes eipFadeIn { from {opacity:0; transform:scale(.98)} to {opacity:1; transform:scale(1)}}
@keyframes eipZoomIn { from {opacity:0; transform:scale(.85)} to {opacity:1; transform:scale(1)}}
@keyframes eipSlideUp { from {opacity:0; transform:translateY(24px)} to {opacity:1; transform:translateY(0)}}

.eip-animate-fade { animation: eipFadeIn .28s ease-out forwards; }
.eip-animate-zoom { animation: eipZoomIn .28s ease-out forwards; }
.eip-animate-slide{ animation: eipSlideUp .28s ease-out forwards; }

@media (max-width: 480px){
  #eip-overlay .eip-modal{ max-width:92vw; }
  .eip-close{ width:34px; height:34px; font-size:20px; }
  .eip-close--tri{ top:6px; right:6px; }
  .eip-close--tli{ top:6px; left:6px; }
  .eip-close--tro{ top:-12px; right:-12px; }
  .eip-close--tlo{ top:-12px; left:-12px; }
  #eip-overlay .eip-img{ max-height:calc(80vh - 40px); border-radius:10px; }
}
@media (prefers-reduced-motion: reduce){
  #eip-overlay * { animation:none !important; transition:none !important; }
}