
/* Perbaikan form input: selalu popup, halaman belakang tidak ikut bergeser, isi popup bisa digulir */
html.modal-open, body.modal-open{overflow:hidden!important;overscroll-behavior:none;}
#modal.modal{position:fixed;inset:0;z-index:9999;display:none;align-items:center;justify-content:center;padding:12px;overflow-y:auto;overscroll-behavior:contain;background:rgba(8,18,38,.64);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);box-sizing:border-box;}
#modal.modal.show{display:flex;}
#modal .modalbox{display:flex;flex-direction:column;position:relative;z-index:10000;pointer-events:auto;width:min(820px,100%);height:auto;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow:hidden;margin:auto;border-radius:18px;padding:0;box-sizing:border-box;}
#modal .modalhead{position:relative;top:auto;z-index:2;flex:0 0 auto;padding:16px 18px;margin:0;background:linear-gradient(145deg,#fff,#f3f7fd);border-bottom:1px solid #dbe4f0;}
#modal #modalBody{position:relative;z-index:1;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:16px 18px 20px;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;pointer-events:auto;}
#modal #modalBody form{margin:0;pointer-events:auto;}
#modal #modalBody input,#modal #modalBody select,#modal #modalBody textarea,#modal #modalBody button{pointer-events:auto;user-select:auto;-webkit-user-select:auto;}
#modal #modalBody input:not([type=checkbox]):not([type=radio]):not([type=hidden]),#modal #modalBody select,#modal #modalBody textarea{position:relative;z-index:1;min-width:0;touch-action:manipulation;}
#modal #modalBody .actions{position:sticky;bottom:-20px;z-index:1;background:linear-gradient(to top,#f3f7fd 75%,rgba(243,247,253,0));padding:14px 0 4px;margin-top:12px;}
@media(max-width:600px){#modal.modal{padding:6px;align-items:flex-start;}#modal .modalbox{max-height:calc(100vh - 12px);max-height:calc(100dvh - 12px);width:100%;border-radius:14px;margin:auto 0;}#modal .modalhead{padding:13px 14px;}#modal #modalBody{padding:13px 14px 18px;}#modal #modalBody .formgrid{grid-template-columns:minmax(0,1fr)!important;}}
@media(prefers-reduced-motion:reduce){#modal.modal{backdrop-filter:none;-webkit-backdrop-filter:none;}}
