I have faced this issue when we upgrade to Magento 2.1.16:
I have resolved the issue by adding below changes to the theme
1) ~/app/design/frontend/ThemePackage/theme/web/css/source/_theme.less
add at line 29: @import 'components/_modals_extend.less';
2) Add
"components/_modals_extend.less" folder and file at
~/app/design/frontend/ThemePackage/theme/web/css/source/
3)
~/app/design/frontend/ThemePackage/theme/web/css/source/components/_modals_extend.less
add at line number 16**:**
@modal-slide-header__padding-vertical: 2.1rem;
// added from
\vendor\magento\magento2-base\lib\web\css\source\components_modals.less
@modal-popup__padding: 3rem; // added from
\vendor\magento\magento2-base\lib\web\css\source\components_modals.less
@media-common : false; //custom from
magento/theme-frontend-blank/web/css/styles-l.less
Here ThemePackage/theme can be any theme package and theme name.