.almila-entry-popup[hidden]{display:none!important}
.almila-entry-popup{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:20px}
.almila-entry-popup__backdrop{position:absolute;inset:0;background:rgba(15,23,42,.68);backdrop-filter:blur(10px)}
.almila-entry-popup__dialog{position:relative;z-index:1;width:auto;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);display:flex;align-items:center;justify-content:center;animation:almilaPopupIn .28s ease-out}
.almila-entry-popup__card{display:block;width:min(640px,calc((100dvh - 48px)*.8),calc(100vw - 40px));max-width:100%;max-height:calc(100dvh - 40px);border-radius:24px;overflow:hidden;box-shadow:0 24px 70px rgba(15,23,42,.24);background:#fff;transition:transform .18s ease,box-shadow .18s ease}
.almila-entry-popup__card:hover{transform:translateY(-2px);box-shadow:0 30px 82px rgba(15,23,42,.28)}
.almila-entry-popup__card img{display:block;width:100%;height:auto;max-height:calc(100dvh - 40px);object-fit:contain}
.almila-entry-popup__close{position:absolute;top:12px;right:12px;z-index:2;width:44px;height:44px;border:none;border-radius:999px;background:rgba(255,255,255,.97);color:#667085;font-size:34px;line-height:1;display:grid;place-items:center;box-shadow:0 8px 25px rgba(15,23,42,.15);cursor:pointer;transition:transform .18s ease,background .18s ease,color .18s ease}
.almila-entry-popup__close:hover{transform:scale(1.04);background:#fff;color:#e11d48}
.almila-entry-popup__close span{transform:translateY(-2px)}
.almila-entry-popup__fallback{padding:48px 28px;border-radius:22px;background:linear-gradient(135deg,#fff1f4,#fff);color:#101828;display:flex;flex-direction:column;gap:12px;text-align:center}
body.almila-popup-open{overflow:hidden}
@keyframes almilaPopupIn{from{transform:translateY(10px) scale(.98);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}
@media (max-width:767px){
  .almila-entry-popup{padding:10px}
  .almila-entry-popup__dialog{max-width:calc(100vw - 12px);max-height:calc(100dvh - 20px)}
  .almila-entry-popup__card{width:min(520px,calc((100dvh - 28px)*.8),calc(100vw - 20px));max-height:calc(100dvh - 20px);border-radius:18px}
  .almila-entry-popup__card img{max-height:calc(100dvh - 20px)}
  .almila-entry-popup__close{top:8px;right:8px;width:38px;height:38px;font-size:30px}
}
@supports not (height:100dvh){
  .almila-entry-popup__dialog{max-height:calc(100vh - 32px)}
  .almila-entry-popup__card{width:min(640px,calc((100vh - 48px)*.8),calc(100vw - 40px));max-height:calc(100vh - 40px)}
  .almila-entry-popup__card img{max-height:calc(100vh - 40px)}
  @media (max-width:767px){
    .almila-entry-popup__dialog{max-height:calc(100vh - 20px)}
    .almila-entry-popup__card{width:min(520px,calc((100vh - 28px)*.8),calc(100vw - 20px));max-height:calc(100vh - 20px)}
    .almila-entry-popup__card img{max-height:calc(100vh - 20px)}
  }
}
