/* v2.20.1 beta: scoped to the open Driver T&C step. */
body.driver-mode .driver-selected-pane:has(#driverTermsInline){
  overflow-y:auto!important;overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch;overscroll-behavior-y:contain!important;
  touch-action:auto!important;
}
body.driver-mode .driver-selected-pane:has(#driverTermsInline) .driver-main-stack{
  padding-bottom:0!important;overflow:visible!important;
}
/* Focus the selected job on signing; closing restores the existing job view. */
body.driver-mode .driver-main-stack:has(#driverTermsInline) > :not(#driverTermsInline){display:none!important;}
body.driver-mode #driverTermsInline{
  height:auto!important;max-height:none!important;overflow:visible!important;
  padding-bottom:0!important;margin-bottom:0!important;touch-action:auto!important;
}
body.driver-mode #driverTermsInline .driver-terms-copy{margin:8px 12px!important;overflow:visible!important;}
body.driver-mode #driverTermsInline .driver-terms-copy-body{max-height:none!important;overflow:visible!important;}
body.driver-mode #driverTermsInline .driver-terms-sign-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;align-items:stretch!important;
}
body.driver-mode #driverTermsInline .driver-terms-sign-grid > div{
  min-width:0;display:flex;flex-direction:column;padding:10px!important;
}
body.driver-mode #driverTermsInline .driver-terms-sign-grid label{
  display:block;font-weight:800;margin:0 0 8px;
}
body.driver-mode #driverTermsInline .driver-terms-sign-grid input{
  box-sizing:border-box;width:100%;min-width:0;min-height:44px;font-size:16px;margin-top:4px;
}
body.driver-mode #driverTermsInline .driver-terms-driver > strong{margin-top:auto;}
body.driver-mode #driverTermsInline canvas{
  box-sizing:border-box;width:100%!important;height:160px!important;min-height:160px!important;
  flex:none;touch-action:none!important;margin:8px 0!important;
}
body.driver-mode #driverTermsInline .driver-terms-clear{min-height:44px;white-space:normal;}
body.driver-mode #driverTermsInline .driver-terms-actions{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;padding:10px 12px max(12px,env(safe-area-inset-bottom))!important;
}
body.driver-mode #driverTermsInline .driver-terms-actions .spacer{display:none!important;}
body.driver-mode #driverTermsInline #driverTermsCnpBtn{grid-column:1/-1;}
body.driver-mode #driverTermsInline .driver-terms-actions button{min-width:0;min-height:48px!important;width:100%!important;white-space:normal;}
@media(max-width:599px){
  body.driver-mode #driverTermsInline .driver-terms-sign-grid{grid-template-columns:minmax(0,1fr)!important;}
  body.driver-mode #driverTermsInline .driver-terms-driver > strong{margin-top:0;}
}
