/* Native and custom pop-ups share action geometry. Full-page detail views
   and navigation tiles keep their own layout, including when nested. */
@scope (:is(dialog,[role="dialog"],[role="alertdialog"],[aria-modal="true"],[popover],.biz-menu-panel,.tech-menu-panel):not(.property-job-dialog,.business-job-dialog,.customer-record,.hub-detail-fullscreen),
        dialog.hub-detail-fullscreen:not(.property-job-dialog,.business-job-dialog,.customer-record) :is([class$="-actions"],.hub-button-row))
 to (.property-job-dialog,.business-job-dialog,.customer-record,.hub-detail-fullscreen,.job-final-actions,.biz-tiles,.tech-navigation) {
 :scope {--dashboard-nav-height:44px}
 @layer hub-action-colors {
  :is(button,a.button,input[type="button"],input[type="submit"]):not([data-job-tile],[data-hub-nav],.dashboard-job-summary,.upcoming-job-entry,.business-job-card,.service-history-open) {
   box-sizing:border-box!important;height:44px!important;min-height:44px!important;max-height:44px!important;
   margin-block:0!important;padding-block:0!important;white-space:normal!important;
   text-align:center!important;align-content:center!important;
  }
  :scope:has(>button), :scope:is([open],[role],[popover],[aria-modal]) :is(div,section,footer,form,fieldset):has(>button:not([hidden])) {
   gap:6px!important;
  }
  :is([class*="actions"],.hub-button-row,.pair-actions,.service-confirmation,.technician-payment-methods,.transfer-choices,.appointment-choices)>:is(button,a.button,input[type="submit"]) {
   min-width:0!important;max-width:none!important;width:100%!important;flex:1 1 0!important;padding-inline:4px!important;
  }
  :scope.job-leave-prompt :is(.hub-confirm-actions,.job-leave-actions) {
   grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  :scope.job-leave-prompt [data-leave-choice] {grid-column:auto!important;padding-inline:0!important}
 }
 /* Give wrapped three-choice labels the available side padding on narrow phones. */
 @media(max-width:360px) {
  :scope.job-leave-prompt:lang(en) {--leave-row-inset:0px}
  :scope.job-leave-prompt:not(:lang(en)) {--leave-row-inset:10px}
  :scope.job-leave-prompt.hub-confirm-dialog:not(:lang(en)) {--leave-row-inset:17px}
  :scope.job-leave-prompt :is(.hub-confirm-actions,.job-leave-actions) {
   margin-inline:calc(-1 * var(--leave-row-inset,0px))!important;
   width:calc(100% + 2 * var(--leave-row-inset,0px))!important;max-width:none!important;
  }
 }
 @layer hub-button-typography {
  :scope.appointment-popup.appointment-selection[open]:modal .appointment-choices button:not([hidden]) {line-height:1.1!important}
 }
}
