@import url("./back-control.css");
html body [data-hub-nav]{box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 44px!important;width:44px!important;min-width:44px!important;max-width:44px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:4px!important;border:1px solid #9ca9b8!important;border-radius:8px!important;background:#fff!important;color:#172d71!important;font:700 22px/1 system-ui!important;box-shadow:none!important;text-decoration:none!important;text-align:center!important}
html body [data-hub-nav][hidden]{display:none!important}
html body [data-hub-nav]:disabled{opacity:.5;cursor:default}
html body .hub-delete-control{background:#b4232c!important;border-color:#b4232c!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
html body .hub-delete-control:disabled{opacity:.5}
html body :is(.hub-dialog-heading,.hub-action-heading){display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;align-items:center;width:100%;box-sizing:border-box;margin:0 0 12px;min-height:44px}
html body :is(.hub-dialog-heading,.hub-action-heading)>[data-hub-nav]{position:static!important;inset:auto!important;grid-column:1;grid-row:1}
html body :is(.hub-dialog-heading,.hub-action-heading)>:is(h1,h2){grid-column:2;grid-row:1;margin:0!important;min-width:0;text-align:center;font-size:clamp(18px,5vw,24px);line-height:1.25;overflow-wrap:break-word}
html body .hub-dialog-heading>.hub-detail-close{position:static!important;grid-column:3;grid-row:1;box-sizing:border-box;width:44px;height:44px;min-height:44px;margin:0;padding:4px;border:1px solid #9ca9b8;border-radius:8px;background:white;color:#172d71;font:700 24px/1 system-ui}
html body dialog.hub-detail-fullscreen:has(>.hub-dialog-heading){padding:max(12px,env(safe-area-inset-top)) 12px 12px!important}
html body .job-detail-actions.job-final-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:stretch;width:100%;margin:12px 0}
html body .job-final-actions>button{box-sizing:border-box;min-width:0;width:100%;height:100%;min-height:44px;margin:0;padding:8px 4px;font-size:14px;line-height:1.25;white-space:normal;word-break:normal;overflow-wrap:normal}
html body dialog.hub-confirm-dialog{box-sizing:border-box;position:fixed;inset:0;width:calc(100% - 32px);max-width:420px;height:auto;max-height:calc(100dvh - 32px);margin:auto;padding:20px;border:1px solid #9ca9b8;border-radius:12px;background:#fff;color:#172d71;overflow:auto;text-align:center}
html body .hub-confirm-dialog::backdrop{background:#10205066}
html body .hub-confirm-dialog>p{margin:0 0 18px;font:600 17px/1.4 system-ui;white-space:normal}
html body .hub-confirm-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
html body .hub-confirm-actions>button{width:100%;min-width:0;min-height:44px;margin:0;padding:10px 6px;border:1px solid #9ca9b8;border-radius:8px;background:#fff;color:#172d71;font:600 15px/1.3 system-ui;white-space:normal}

/* The heading row already reserves space for Back; do not reserve it twice. */
html body main :is(.hub-action-heading,.hub-page-heading,.business-page-heading)>#category-choice-heading{padding-inline:0;white-space:normal;word-break:normal}

/* Compact confirmations and attachment picker, below midpoint with viewport-safe scrolling. */
html body dialog.hub-confirm-dialog,html body dialog.hub-attachment-dialog{
 position:fixed!important;inset:10dvh 0 0!important;box-sizing:border-box!important;
 width:calc(100% - 32px)!important;max-width:420px!important;height:fit-content!important;min-height:0!important;
 max-height:calc(90dvh - 32px)!important;margin:auto!important;padding:16px!important;
 border:1px solid #9ca9b8!important;border-radius:12px!important;background:#fff;color:#172d71;
 overflow:auto!important;transform:none!important;text-align:center;overscroll-behavior:contain;
}
html body dialog.hub-attachment-dialog[open]{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important}
html body dialog.hub-attachment-dialog[hidden]{display:none!important}
html body dialog.hub-attachment-dialog::backdrop{background:#10205066}
html body dialog.hub-attachment-dialog>.job-attachment-title{grid-column:1/-1;margin:0 0 8px;font:600 17px/1.4 system-ui}
html body dialog.hub-attachment-dialog>select,html body dialog.hub-attachment-dialog>.job-attachment-close{grid-column:1/-1;width:100%;box-sizing:border-box;margin:0}
html body dialog.hub-attachment-dialog>button{min-width:0;width:100%;min-height:44px;margin:0;padding:8px}

html body dialog.hub-attachment-dialog>.job-upload-status{grid-column:1/-1;margin:0;font-size:13px}
html body dialog.hub-attachment-dialog>.job-upload-status:empty{display:none}

/* Match the payment popup controls, retaining each action's resting fill. */
html body :is(dialog,[role="dialog"],[role="alertdialog"]) button {
  border-radius:8px!important;
  font-weight:700!important;
  color:#172d61;
  box-shadow:1px 2px 0 rgba(34,43,58,.38),0 2px 5px rgba(34,43,58,.08)!important;
}
html body :is(dialog,[role="dialog"],[role="alertdialog"]) button.upload-source-button:not(:active) {
  background:#ffda4d!important;
  color:#172d61!important;
}
html body :is(dialog,[role="dialog"],[role="alertdialog"]) button:enabled:not([aria-disabled="true"]):active {
  background:#eaf4ff!important;
  color:#172d61!important;
  -webkit-text-fill-color:#172d61!important;
}
html body dialog.hub-attachment-dialog>.job-attachment-title{grid-row:1}
html body dialog.hub-attachment-dialog>select{grid-row:2}
html body dialog.hub-attachment-dialog>button.upload-source-button{grid-row:3;width:100%!important;align-self:stretch}
html body dialog.hub-attachment-dialog>.job-attachment-close{grid-row:4;grid-column:1/-1;justify-self:center}
html body dialog:is(.hub-attachment-dialog,.company-label-picker,.product-source-picker)>button:is(.job-attachment-close,:last-child):not(.upload-source-button){
  display:block;width:auto!important;min-width:76px;margin-inline:auto!important;justify-self:center;
}

/* Each existing footer keeps its own column count, order, and action colors. */
@layer hub-action-colors {
 html:root body :is(.upcoming-jobs-actions,.tech-notification-actions,.sc-actions,.hub-confirm-actions,
 .appointment-actions,.appointment-offer-actions,.nc-review-actions,.hub-password-actions,.new-service-actions,
 .job-final-actions,.customer-job-actions,.company-job-actions,.job-note-actions,.product-actions,
 .property-detail-footer>.property-footer-white,.property-detail-footer>.property-footer-colors){
  gap:8px!important;align-items:stretch;justify-content:center;box-sizing:border-box;min-width:0;
 }
 html:root body :is(.upcoming-jobs-actions,.tech-notification-actions,.sc-actions,.hub-confirm-actions,
 .appointment-actions,.appointment-offer-actions,.nc-review-actions,.hub-password-actions,.new-service-actions,
 .job-final-actions,.customer-job-actions,.company-job-actions,.job-note-actions,.product-actions,
 .property-detail-footer>.property-footer-white,.property-detail-footer>.property-footer-colors)>:is(button,a.button):not([hidden]){
  box-sizing:border-box;min-width:0;min-height:max(44px,var(--dashboard-nav-height,76px))!important;
  border-radius:10px!important;font-weight:700!important;line-height:1.15;
  white-space:normal;overflow-wrap:break-word;text-align:center;
 }
}

@layer hub-action-colors {
 html:root body :is(.appointment-actions,.nc-review-actions){
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;
 }
 html:root body :is(.upcoming-jobs-actions,.tech-notification-actions,.sc-actions)>button{
  flex:1 1 0;min-width:0;
 }
 html:root body dialog.sc-popup .sc-actions>button{
  min-height:max(44px,var(--dashboard-nav-height,76px))!important;
 }
}
