/* Modal base */
.fmem-modal{position:fixed;inset:0;z-index:100000;display:none;}
.fmem-modal__overlay{position:absolute;inset:0;background:rgba(0,0,0,.6);}
.fmem-modal__dialog{position:relative;background:#fff;max-width:960px;margin:4vh auto;border-radius:12px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.35);max-height:92vh;display:flex;flex-direction:column;}
.fmem-modal__close{position:absolute;top:8px;right:12px;border:0;background:transparent;font-size:28px;line-height:1;cursor:pointer;padding:6px 10px;}
.fmem-modal__content{overflow:auto;padding:24px;}
.fmem-modal__header{margin-bottom:12px;border-bottom:1px solid #eee;padding-bottom:8px;}
.fmem-modal__title{margin:0;font-size:1.6rem;line-height:1.2;}
.fmem-modal__meta{color:#444;font-size:.95rem;margin-top:6px;}
.fmem-meta-list{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:12px;}
.fmem-meta-item strong{font-weight:600;margin-right:4px;}
.fmem-modal__body img{max-width:100%;height:auto;}
.fmem-modal__loader{width:32px;height:32px;border-radius:50%;border:3px solid #ddd;border-top-color:#333;animation:fmemspin 1s linear infinite;margin:40px auto;}
@keyframes fmemspin{to{transform:rotate(360deg);}}
body.fmem-modal-opened{overflow:hidden;}

/* Always mobile width when class present */
.fmem-modal--mobile .fmem-modal__dialog{
  width: var(--fmem-mobile-width, 420px);
  max-width: none;
  margin: 4vh auto;
  min-height: auto;
  max-height: 92vh;
}

/* Mobile */
@media (max-width: 768px){
  .fmem-modal__dialog{margin:0;max-width:100%;border-radius:0;min-height:100vh;max-height:100vh;}
  .fmem-modal--mobile .fmem-modal__dialog{ width:100%; }
  .fmem-modal__content{padding:16px;}
}
