/* v16.4.53 targeted UAT Notes 17–20 — scoped to the canonical Pay & deductions dialog. */
#modal.open:has(.kv-pay-overview) { padding: min(3vh,24px) min(3vw,28px); overflow:hidden; }
#modal.open:has(.kv-pay-overview) #modalCard.modal-card {
  width:min(1520px,94vw)!important;max-width:none!important;
  height:min(82dvh,820px);max-height:calc(100dvh - 44px)!important;
  display:grid!important;grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden!important;background:#fff;
}
#modal.open:has(.kv-pay-overview) .modal-head{min-height:78px;flex-shrink:0;padding:18px 24px;}
#modal.open:has(.kv-pay-overview) .modal-head h2{font-size:clamp(17px,1.7vw,22px);}
#modal.open:has(.kv-pay-overview) .modal-body{
 min-height:0;max-height:none!important;overflow-y:auto;overscroll-behavior:contain;
 padding:22px 28px;font-size:13px;line-height:1.55;
}
#modal.open:has(.kv-pay-overview) .modal-body h3{margin:16px 0 10px;font-size:16px;}
#modal.open:has(.kv-pay-overview) .modal-body p{margin:7px 0 11px;}
#modal.open:has(.kv-pay-overview) .modal-foot{
 flex:none;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;
 gap:9px;max-height:min(31dvh,220px);overflow-y:auto;padding:15px 22px;background:#f7fbfa;
}
#modal.open:has(.kv-pay-overview) .modal-foot .btn{
 min-height:42px;min-width:135px;max-width:235px;flex:0 1 auto;
 white-space:normal;line-height:1.35;padding:10px 14px;font-size:12px;
}
#modal.open:has(.kv-pay-overview) .modal-foot .btn:nth-child(2){min-width:190px;}
#modal.open:has(.kv-pay-overview) .modal-foot .btn.primary{min-width:145px;}
@media(max-width:680px){
 #modal.open:has(.kv-pay-overview){padding:0;}
 #modal.open:has(.kv-pay-overview) #modalCard.modal-card{width:100%!important;height:100dvh;max-height:100dvh!important;border-radius:0;}
 #modal.open:has(.kv-pay-overview) .modal-head{padding:13px 16px;}
 #modal.open:has(.kv-pay-overview) .modal-body{padding:16px;}
 #modal.open:has(.kv-pay-overview) .modal-foot{padding:12px;max-height:35dvh;justify-content:stretch;}
 #modal.open:has(.kv-pay-overview) .modal-foot .btn{flex:1 1 145px;max-width:none;}
}
