.up-modal-wrap{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:999999;display:none;align-items:center;justify-content:center;padding:20px}
.up-modal{background:#fff;max-width:520px;width:100%;border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.2);overflow:hidden}
.up-modal-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #eee}
.up-modal-body{padding:16px}
.up-modal-foot{padding:12px 16px;border-top:1px solid #eee;text-align:right}
.upm-x{background:none;border:none;font-size:20px;cursor:pointer}
/* Full-screen overlay, centered with flex */
.up-modal-wrap{
  position: fixed;
  inset: 0;                /* top:0; right:0; bottom:0; left:0 */
  display: none;           /* JS toggles to flex when opened */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  z-index: 999999;         /* above headers/toolbars */
}

/* The dialog itself */
.up-modal{
  background: #fff;
  width: 92%;
  max-width: 520px;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  overflow: hidden;
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Head / body / foot */
.up-modal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 14px; border-bottom: 1px solid #ececec;
}
.up-modal-body{ padding: 14px; }
.up-modal-foot{ padding: 12px 14px; border-top: 1px solid #ececec; text-align: right; }

.upm-x{
  background: transparent; border: 0; font-size: 20px; line-height: 1; cursor: pointer;
}

.up-modal .up-rsn-list label{ display:block; margin: 6px 0; }
.up-modal textarea.widefat{ width: 100%; min-height: 96px; }
