/* WorkOps v169 — focused certificate entry and iOS form stability */

/* A certificate is a workflow, not one giant page. Keep one section visible at every width. */
.cert-wizardized{max-width:860px!important;margin:4px auto 0!important}
.cert-wizardized .cert-section{display:none!important;box-shadow:none!important}
.cert-wizardized .cert-section.wizard-active{display:block!important}
#modal>.sheet.cert-sheet{width:min(920px,100%)!important}

/* Calm the chrome around the active section. */
.cert-wizardized .cert-progress{gap:6px!important;margin:0 0 10px!important;padding:7px 0 10px!important;background:linear-gradient(180deg,#171c31 80%,rgba(23,28,49,0))!important}
.cert-wizardized .cert-progress,
.cert-wizardized .cert-wizard-controls{position:static!important;top:auto!important;bottom:auto!important;z-index:auto!important}
.cert-wizardized .cert-progress button{min-height:38px!important;box-shadow:none!important}
.cert-wizardized .cert-section{padding:16px!important;border-radius:16px!important}
.cert-wizardized .cert-section-title{margin-bottom:14px!important;padding-bottom:10px!important}
.cert-wizardized .cert-wizard-controls{display:flex!important;position:static!important;top:auto!important;bottom:auto!important;z-index:auto!important;margin-top:10px!important;background:#171c31!important;border-top:1px solid #3b435e!important;backdrop-filter:none!important;padding:12px 0 calc(10px + env(safe-area-inset-bottom,0px))!important}
.cert-wizardized .cert-section-nav,.cert-wizardized .sticky-actions{display:none!important}

/* Safari zooms focused controls when their effective font size is below 16px.
   Preserve normal pinch zoom; simply make editable controls iOS-safe. */
@media(max-width:1024px){
  #modal input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
  #modal textarea,
  #modal select,
  .inline-sheet input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
  .inline-sheet textarea,
  .inline-sheet select,
  .tool-drawer-panel input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
  .tool-drawer-panel textarea,
  .tool-drawer-panel select{font-size:16px!important}

  .cert-wizardized{max-width:none!important;margin-top:0!important}
  #modal>.sheet.cert-sheet{width:100%!important}
  .cert-wizardized .cert-progress{position:static!important;overflow-x:auto!important;overscroll-behavior-x:contain!important}
  .cert-wizardized .cert-progress button{padding:7px!important;min-width:38px!important;justify-content:center!important}
  .cert-wizardized .cert-progress button span{display:none!important}
  .cert-wizardized .cert-progress button.active{padding-right:11px!important}
  .cert-wizardized .cert-progress button.active span{display:inline!important;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .cert-wizardized .cert-section{padding:14px 12px!important;border-radius:14px!important}
  .cert-wizardized .cert-section-title{gap:4px!important;margin-bottom:12px!important}
  .cert-wizardized .cert-section-title b{font-size:16px!important}
  .cert-wizardized .cert-section-title span{font-size:11px!important;line-height:1.4}
  /* Tablet + phone: one column so Inspection date / Next check never overlap (701–1024 was still 2-col). */
  .cert-wizardized .cert-grid{grid-template-columns:1fr!important;gap:16px!important}
  .cert-wizardized .cert-grid > *{min-width:0!important;max-width:100%!important;overflow:hidden}
  .cert-wizardized .cert-wizard-controls{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;position:static!important}
  .cert-wizardized .cert-wizard-controls [data-w-next]{grid-column:1/-1!important;order:-1!important;min-height:52px!important}
  .cert-wizardized .cert-section-nav{display:none!important}
}

@media(max-width:700px){
  .cert-wizardized .appliance-checklist,
  .cert-wizardized .appliance-identity,
  .cert-wizardized .appliance-reading-row{grid-template-columns:1fr!important;gap:12px!important}
  .cert-wizardized .appliance-check-row{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;min-width:0!important}
  .cert-wizardized .appliance-check-row select:not(.choice-source){min-width:0!important;width:100%!important;max-width:100%!important}
}
.cert-wizardized select.choice-source{
  position:absolute!important;opacity:0!important;pointer-events:none!important;
  width:1px!important;height:1px!important;min-width:0!important;max-width:1px!important;
  margin:0!important;padding:0!important;border:0!important;overflow:hidden!important;
}
.wo-choice-radios{display:flex;flex-wrap:wrap;gap:8px;width:100%}
.wo-choice-radios label{flex:1 1 calc(50% - 8px);min-width:min(140px,100%);min-height:44px}
.cert-wizardized .appliance-card-v2,
.cert-wizardized .cert-appliance{overflow:visible!important;margin:0 0 18px!important}
.cert-wizardized .cert-section label,
.cert-wizardized .cert-grid label{min-width:0;max-width:100%}
.cert-wizardized .cert-section input:not(.choice-source),
.cert-wizardized .cert-section select:not(.choice-source),
.cert-wizardized .cert-section textarea{box-sizing:border-box;max-width:100%;min-width:0}
.addr-pair{gap:14px!important}