/* Scoped to construction-site quote / SAL workspaces; no global table overrides. */
#detail-content:has(>.quote-detail-head)>.quote-editor-body{overflow:hidden!important}
.quote-editor-main{padding:12px 14px 24px;overflow:auto!important}
.quote-editor-main #quote-workspace-results{min-width:1180px}
.quote-editor-main .quote-room,.quote-editor-main .quote-workspace-group{overflow:visible}
.quote-editor-main .table-wrap{max-height:none!important;overflow:visible!important}
.quote-editor-main .quote-lines-editor{min-width:0;width:100%;white-space:normal}
.quote-editor-main .quote-lines-editor th,.quote-editor-main .quote-lines-editor td{padding:7px 6px}
.quote-editor-main .quote-lines-editor th:nth-child(2){width:29%;min-width:300px}
.quote-editor-main .quote-lines-editor:has(tbody button) th:last-child{width:150px;min-width:150px}
.quote-editor-main .quote-lines-editor td:last-child{white-space:normal}
.quote-editor-main .quote-lines-editor button{font-size:12px;min-height:32px;padding:6px 9px;margin:2px 0}
.quote-editor-main .quote-room>p{margin:6px 10px;display:flex;flex-wrap:wrap;gap:5px}
.quote-editor-main .quote-room>p button{padding:7px 10px;font-size:12px;min-height:32px}
.quote-detail-head{padding:10px 14px 8px}
.quote-detail-head h2{font-size:20px}.quote-detail-head>p{margin:2px 0}
.quote-head-tools{margin-top:6px;gap:4px}.quote-head-row button{padding:6px 9px;min-height:32px}
.quote-workspace-bar{margin-top:6px;padding:6px 8px}.quote-workspace-line+.quote-workspace-line{margin-top:4px;padding-top:4px}
.quote-workspace-heading small{display:none}.quote-workspace-heading{min-width:100px}
.quote-workspace-status{margin-top:3px}.quote-workspace-field input,.quote-workspace-field select{height:32px}
.editor-action-menu{display:inline-block;vertical-align:top;white-space:normal;color:#17345d}
.editor-action-menu>summary{cursor:pointer;border:1px solid #c4d3e7;border-radius:6px;background:#edf3fc;padding:6px 9px;font-size:12px;font-weight:700;min-height:32px;box-sizing:border-box}
.editor-action-menu>div{display:flex;flex-direction:column;gap:3px;padding:5px;background:#f3f7fc;border-radius:6px}
.editor-action-menu>div button{white-space:normal!important;text-align:left}
.editor-action-menu:focus-within{outline:2px solid #7ba5de;outline-offset:2px}
.editor-group-jump{min-width:180px;max-width:340px;flex:1 1 190px}.editor-group-jump select{width:100%}
.editor-jump-target{outline:2px solid #df9d33;outline-offset:-2px}
#detail-content>.sal-editor-body .table-wrap{max-height:none!important;overflow:visible!important}
.sal-editor-body{overflow:auto!important}.sal-editor-body>.grid{gap:7px}.sal-editor-body>.grid .panel{padding:9px 12px}.sal-editor-body>.grid .panel p{margin:4px 0}
#detail-content:has(#edit-site)>.detail-body>.tabs{gap:4px;flex-wrap:wrap;overflow:visible}
#detail-content:has(#edit-site)>.detail-body>.tabs button{padding:8px 11px}
@media(max-width:1050px){.quote-workspace-heading{flex:0 0 auto}.quote-view-modes{width:auto}.quote-detail-head h2{font-size:18px}}
@media(max-width:720px){.quote-detail-head{max-height:46dvh;overflow-y:auto}.quote-workspace-field,.quote-room-jump{flex:1 1 180px;width:auto}.quote-view-modes{flex-wrap:wrap;overflow:visible}.quote-editor-main{padding:8px}.editor-group-jump{max-width:100%}}

/* Site document lists retain horizontal scrolling only when their columns need it. */
#detail-content:has(.site-head-actions) [data-panel="preventivi"] .table-wrap,
#detail-content:has(.site-head-actions) [data-panel="sal"] .table-wrap{max-height:none!important}

/* Header refinement: wrap according to available width, not fixed toolbar rows. */
.quote-detail-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;padding:8px 12px}
.quote-detail-head>p{font-size:12px;line-height:1.3;margin:0;min-width:0;overflow-wrap:anywhere}
.quote-detail-head>h2{flex:1 1 340px;min-width:0;font-size:16px;line-height:1.25;margin:0;overflow-wrap:anywhere}
.quote-detail-head>.site-record-nav{flex-basis:100%}
.quote-detail-head>.quote-head-tools{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:4px 5px;margin-top:2px;min-width:0}
.quote-detail-head .quote-head-tools>.quote-head-row{display:contents}
.quote-detail-head .quote-head-document{padding:0;border:0}
.quote-detail-head .quote-head-tools button,.quote-detail-head .quote-head-tools .editor-action-menu>summary{font-size:11px;line-height:1.25;min-height:28px;padding:5px 8px}
.quote-detail-head .quote-head-tools label{font-size:11px;min-width:0}
.quote-detail-head .quote-head-tools select{font-size:11px;min-height:28px;padding:4px 6px;max-width:100%}
.quote-detail-head>#quote-workspace-controls{flex:1 1 100%;min-width:0}
@media(max-width:720px){.quote-detail-head .quote-head-tools button,.quote-detail-head .quote-head-tools .editor-action-menu>summary{min-height:32px}.quote-detail-head>h2{flex-basis:260px}}

/* Navigation belongs to the document heading, outside document functions. */
.quote-detail-head>.quote-editor-navigation{display:flex;align-items:center;flex:0 1 auto;gap:5px;padding-right:10px;border-right:1px solid #ffffff40;max-width:100%}
.quote-editor-navigation button{font-size:11px;line-height:1.25;min-height:28px;padding:5px 8px}
/* View modes, filters and jump controls share a wrapping flow. */
.quote-detail-head .quote-workspace-bar{display:flex;flex-wrap:wrap;align-items:center;gap:5px 8px;width:100%;box-sizing:border-box}
.quote-workspace-bar>.quote-workspace-line{display:contents}
.quote-workspace-bar .quote-workspace-heading{flex:0 0 auto;min-width:0;margin:0}
.quote-workspace-bar .quote-workspace-heading strong{font-size:11px}
.quote-workspace-bar .quote-view-modes{display:flex;flex-wrap:wrap;width:auto;gap:4px;overflow:visible;padding:0}
.quote-workspace-bar .quote-view-modes button{font-size:11px;padding:5px 7px;min-height:28px}
.quote-workspace-bar .quote-workspace-field{display:flex;align-items:center;gap:5px;flex:0 1 auto;min-width:0;width:auto;max-width:100%;margin:0}
.quote-workspace-bar .quote-workspace-field>input,.quote-workspace-bar .quote-workspace-field>select{font-size:11px;height:28px;min-width:0;width:210px;max-width:100%;padding:4px 7px}
.quote-workspace-bar .quote-workspace-search>input{width:190px}
.quote-workspace-bar .quote-workspace-primary{flex-wrap:wrap}
.quote-workspace-bar .quote-workspace-primary>small{flex-basis:100%}
.quote-workspace-bar .quote-workspace-zero,.quote-workspace-bar .quote-workspace-reset{font-size:11px;min-height:28px;padding:4px 7px}
.quote-workspace-bar .quote-workspace-status{flex:0 1 auto;margin:0 0 0 auto;font-size:10px;text-align:left}
.quote-workspace-bar .quote-lot-filter{flex:0 1 auto;width:auto;max-width:100%}
.quote-workspace-bar .quote-lot-filter>summary{font-size:11px;min-height:28px;padding:5px 7px}
@media(max-width:720px){.quote-editor-navigation button,.quote-workspace-bar .quote-view-modes button,.quote-workspace-bar .quote-workspace-zero,.quote-workspace-bar .quote-workspace-reset,.quote-workspace-bar .quote-lot-filter>summary{min-height:32px}.quote-workspace-bar .quote-workspace-field>input,.quote-workspace-bar .quote-workspace-field>select{height:32px}}


/* BUILDY 4.12.60 — Preventivi: densità operativa e scrolling razionalizzato. */
.quote-editor-main{padding:8px 10px 18px!important;overflow-y:auto!important;overflow-x:hidden!important}
.quote-editor-main #quote-workspace-results{min-width:0!important;width:100%}
.quote-editor-main .quote-room>.table-wrap,.quote-editor-main .quote-workspace-group>.table-wrap{overflow-x:auto!important;overflow-y:visible!important;max-width:100%;scrollbar-gutter:auto}
.quote-editor-main .quote-lines-editor{min-width:1120px;width:100%}
.quote-summary-grid{display:grid!important;grid-template-columns:repeat(5,minmax(125px,1fr))!important;gap:7px!important;margin-bottom:5px}
.quote-summary-grid>.panel{min-width:0!important;padding:8px 10px!important;border-radius:8px}
.quote-summary-grid>.quote-summary-primary{min-height:52px}
.quote-summary-grid>.quote-summary-primary strong{font-size:10px;line-height:1.15}
.quote-summary-grid>.quote-summary-primary p{font-size:15px;line-height:1.2;margin:5px 0 0;font-weight:700}
.quote-summary-grid>.quote-summary-secondary{min-height:36px;padding:6px 9px!important;background:#f7f9fc}
.quote-summary-grid>.quote-summary-secondary strong{font-size:9px;line-height:1.1}
.quote-summary-grid>.quote-summary-secondary p{font-size:12px;line-height:1.15;margin:3px 0 0;font-weight:650}
.quote-original-texts{margin:6px 0;border:1px solid #dbe4ef;border-radius:7px;background:#fafcff}
.quote-original-texts>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;padding:7px 10px;list-style:none}
.quote-original-texts>summary::-webkit-details-marker{display:none}
.quote-original-texts>summary:before{content:'▸';font-size:12px;transition:transform .15s ease}
.quote-original-texts[open]>summary:before{transform:rotate(90deg)}
.quote-original-texts>summary strong{font-size:12px;margin-right:auto}
.quote-original-texts-body{padding:0 8px 8px}
.quote-original-texts-body>.quote-room{margin-top:5px}
.quote-editor-main>.section-title{margin:7px 0 4px}
.quote-editor-main>.section-title h3{font-size:14px;margin:0}
.quote-detail-head{padding:6px 10px 6px!important;gap:3px 8px!important}
.quote-detail-head>.quote-head-tools{margin-top:0!important;gap:3px 4px!important}
.quote-detail-head .quote-workspace-bar{margin-top:2px!important;padding:4px 6px!important;gap:4px 6px!important}
.quote-detail-head .quote-head-tools button,.quote-detail-head .quote-head-tools .editor-action-menu>summary,.quote-workspace-bar .quote-view-modes button,.quote-workspace-bar .quote-workspace-zero,.quote-workspace-bar .quote-workspace-reset,.quote-workspace-bar .quote-lot-filter>summary{min-height:26px!important;padding:4px 7px!important}
.quote-detail-head .quote-head-tools select,.quote-workspace-bar .quote-workspace-field>input,.quote-workspace-bar .quote-workspace-field>select{height:26px!important;min-height:26px!important}
@media(max-width:1050px){.quote-summary-grid{grid-template-columns:repeat(3,minmax(130px,1fr))!important}}
@media(max-width:720px){.quote-summary-grid{grid-template-columns:repeat(2,minmax(125px,1fr))!important}.quote-editor-main{padding:6px!important}.quote-detail-head{max-height:50dvh}.quote-original-texts>summary{padding:8px}}
