/* Loaded after the consolidated desktop rules: readable controls at zoom too. */
/* Native disclosure keeps secondary tools discoverable without an overlay. */
.hq-estimate-tools{flex:0 1 auto;max-width:100%;border:1px solid var(--border2);border-radius:8px}
.hq-estimate-tools summary{cursor:pointer;min-height:44px;padding:10px 13px;box-sizing:border-box;color:var(--text);font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.hq-estimate-tools-list{display:flex;flex-wrap:wrap;gap:8px;padding:0 10px 10px}
#estimate-panel{box-sizing:border-box}
#estimate-panel label,#estimate-panel label span{font-size:13px!important;line-height:1.5!important}
#estimate-panel input:not([type="range"]),#estimate-panel select{min-height:44px!important;font-size:16px!important;min-width:0;max-width:100%;box-sizing:border-box}
#estimate-panel .btn,#estimate-panel .tbtn{min-height:44px!important;font-size:13px!important;white-space:normal!important}
#estimate-panel .crow{flex-wrap:wrap;gap:6px}
#estimate-panel .crow label{flex:1 1 100%}
.hq-template-label{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px}
/* The former 560px center minimum pushed Job Info underneath the sidebar
   when keyboard focus scrolled a 1440px workspace horizontally. */
@media(min-width:1151px){
  body:has(#page-trades.on){--c1-side:264px}
  #page-trades>div:first-child{grid-template-columns:260px minmax(0,1fr) 260px!important}
}
@media(min-width:1600px){body:has(#page-trades.on){--c1-side:280px}}
#page-trades :is(button,input,select,textarea,summary):focus-visible,
.hdr button:focus-visible{outline:3px solid #f4d578!important;outline-offset:3px!important;scroll-margin-block:80px}
:root{--hq-muted:#a0aab1;--hq-faint:#909da5}
input::placeholder,textarea::placeholder{color:#98a5ae!important;opacity:1}
#page-trades .hq-estimate-toolbar{
  display:flex!important;flex-wrap:wrap!important;gap:12px!important;min-width:0;
}
#page-trades .hq-estimate-toolbar-left,
#page-trades .hq-estimate-actions{
  display:flex;flex-wrap:wrap!important;gap:8px!important;min-width:0;max-width:100%;
}
#page-trades .hq-estimate-toolbar-left{flex:1 1 580px}
#page-trades .hq-estimate-actions{flex:1 1 520px}
#page-trades .hq-estimate-toolbar .btn{
  min-height:44px!important;height:auto!important;max-width:100%;
  padding:10px 13px!important;font-size:14px!important;line-height:1.4!important;
  white-space:normal!important;overflow-wrap:anywhere;text-align:center;
}
#page-trades .hq-estimate-toolbar #clear-btn{
  width:auto!important;min-width:82px!important;margin-left:auto;color:var(--hq-red)!important;
}
#page-trades .hq-estimate-toolbar .btn:disabled{
  opacity:.55!important;cursor:not-allowed!important;
}
@media(max-width:820px){
  #page-trades .hq-estimate-toolbar-left,#page-trades .hq-estimate-actions{flex:0 1 auto;width:100%}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  #page-trades .hq-estimate-toolbar .btn{transition:none!important}
}

/* Field calculators: keep labels, inputs and result cards usable when zoomed. */
#calc-toggle{
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:48px;padding:10px 0;background:transparent;border:0;
  color:var(--hq-text);text-align:left;cursor:pointer;
}
#calc-toggle .ctitle{margin:0!important;font-size:14px!important}
#calc-body .card>div[style*="display:grid"],#calc-body .g3{
  display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr))!important;
  gap:12px!important;
}
#calc-body .field{min-width:0}
#calc-body .g3>div>div:first-child,#calc-body .g3 div[style*="font-size:9px"]{font-size:13px!important;line-height:1.5!important}
#calc-body .g3 input{min-height:44px!important;font-size:16px!important;box-sizing:border-box}
#calc-body .field label{display:block;font-size:13px!important;line-height:1.5!important;margin-bottom:6px}
#calc-body .field input,#calc-body .field select{width:100%;box-sizing:border-box;min-height:44px!important;font-size:16px!important}
#calc-body .metric{min-width:0;padding:12px!important}
#calc-body .metric .ml{font-size:13px!important;line-height:1.5}
#calc-body .metric .mv{font-size:20px!important;overflow-wrap:anywhere}
#calc-body .card>div[style*="display:flex"]{flex-wrap:wrap;gap:10px}
#calc-body .card>div>span{font-size:13px!important;line-height:1.5}
#calc-body .btn{min-height:44px!important;height:auto!important;font-size:14px!important;white-space:normal!important}
