/* v0.6 visual-only redesign. Preserve the CAD plugin field markup and native form. */
.gbc-cad-checkout{--gbc-blue:#153e73;--gbc-ink:#102e50;--gbc-teal:#009fad;--gbc-line:#dce6ee;font-family:Montserrat,Arial,sans-serif;max-width:1200px;margin:24px auto;padding:clamp(16px,3vw,38px);border:1px solid var(--gbc-line);background:#f3f7fa;border-radius:24px;color:var(--gbc-ink);box-shadow:0 14px 48px #153e7310}
.gbc-cad-checkout *{box-sizing:border-box}
.gbc-cad-head{max-width:850px}
.gbc-cad-head>span{color:var(--gbc-teal);letter-spacing:1.5px;font-size:12px;font-weight:800}
.gbc-cad-head h2{font-family:'Fjalla One',sans-serif;font-weight:400;font-size:clamp(30px,3.1vw,44px);line-height:1.13;margin:10px 0 14px;color:var(--gbc-ink)}
.gbc-cad-head p{font-size:15px;color:#53677f}
.gbc-cad-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:25px 0 12px}
.gbc-cad-steps span{position:relative;background:#e4ebf1;color:#526780;border-radius:10px;padding:15px 9px;text-align:center;font-size:13px;font-weight:700;min-width:0}
.gbc-cad-steps span.current{background:var(--gbc-blue);color:white;box-shadow:0 6px 15px #153e7326}
.gbc-cad-step-help{color:#576f86;margin:0 0 22px;font-size:14px}
.gbc-cad-layout{display:grid;grid-template-columns:minmax(0,1.95fr) minmax(255px,.85fr);gap:22px;align-items:start}
.gbc-cad-main{min-width:0}
.gbc-cad-native{display:block!important;background:#fff;border:1px solid var(--gbc-line);border-radius:18px;padding:clamp(16px,2.4vw,30px);width:100%;max-width:100%;box-shadow:0 10px 28px #153e7309}
.gbc-cad-native .stampa-digitale-form-container,.gbc-cad-native .stampa-cad-field{width:100%;max-width:100%;min-width:0}
.gbc-cad-native .stampa-cad-add-to-cart-container{display:none!important}
.gbc-cad-aside{position:sticky;top:100px;padding:25px;background:#fff;border:1px solid var(--gbc-line);border-radius:18px;box-shadow:0 10px 28px #153e7309}
.gbc-cad-aside h3{font-size:21px;font-weight:800;color:var(--gbc-ink);margin:0 0 15px}
.gbc-cad-summary-row{display:flex;align-items:start;justify-content:space-between;gap:12px;border-bottom:1px solid #edf1f5;padding:15px 0;font-size:13px}
.gbc-cad-summary-row span{color:#667991}.gbc-cad-summary-row strong{text-align:right;overflow-wrap:anywhere;color:var(--gbc-ink)}
.gbc-cad-summary-row:has(.gbc-cad-summary-total){align-items:baseline;display:block}
.gbc-cad-summary-total{display:block;text-align:left!important;margin-top:8px;font-size:20px;color:var(--gbc-blue)!important}
.gbc-cad-summary-foot{margin:15px 0 0;font-size:12px;color:#61768b;line-height:1.55}
.gbc-cad-nav{display:flex;justify-content:space-between;gap:16px;margin:19px 0 0}
.gbc-cad-nav button,.gbc-cad-submit button{border:0;border-radius:9px;background:var(--gbc-blue);color:white;padding:13px 23px;min-height:48px;font-family:Montserrat,Arial,sans-serif;font-size:14px;font-weight:700;cursor:pointer}
.gbc-cad-nav .gbc-back{background:white;color:var(--gbc-blue);border:1px solid var(--gbc-line)}
.gbc-cad-nav button:disabled{opacity:.45;cursor:not-allowed}
.gbc-cad-nav .gbc-next{margin-left:auto}
.gbc-cad-submit{display:none;gap:15px;align-items:center;flex-wrap:wrap;margin-top:25px;padding-top:15px;border-top:1px solid var(--gbc-line)}
.gbc-cad-submit label{display:flex;align-items:center;gap:9px;font-size:13px}.gbc-cad-submit input{max-width:80px;min-height:39px}
.gbc-cad-testnote{font-size:12px;margin:16px 0 0;color:#64788d}
.gbc-cad-checkout .gbc-hidden-step,.gbc-cad-nav [hidden],.gbc-cad-status[hidden]{display:none!important}
.gbc-cad-status{background:#fff3e4;color:#824200;border-left:4px solid #ef9c28;padding:12px 16px;border-radius:8px;margin:14px 0}
.gbc-cad-checkout .stampa-cad-grand-total{max-width:100%}
.gbc-cad-native input,.gbc-cad-native select,.gbc-cad-native textarea{max-width:100%}
@media(max-width:850px){.gbc-cad-layout{grid-template-columns:1fr}.gbc-cad-aside{position:static}.gbc-cad-checkout{padding:18px}}
@media(max-width:540px){.gbc-cad-checkout{border-radius:14px;padding:12px}.gbc-cad-native{padding:14px}.gbc-cad-steps{gap:5px}.gbc-cad-steps span{font-size:11px;padding:12px 4px}.gbc-cad-aside{padding:18px}.gbc-cad-nav button{flex:1;padding:12px 8px}.gbc-cad-head h2{font-size:31px}}
/* v0.7 compact UX: design-only overrides, native form and pricing preserved. */
.gbc-cad-checkout{max-width:1160px;margin:10px auto;padding:12px 16px;border-radius:14px;box-shadow:none;background:#f5f8fb}
.gbc-cad-head{max-width:none;display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.gbc-cad-head>span{font-size:10px;letter-spacing:.8px}
.gbc-cad-head h2{font-size:25px;margin:0;line-height:1.2}
.gbc-cad-head p{margin:0;font-size:12px}
.gbc-cad-steps{margin:10px 0 6px;gap:5px}
.gbc-cad-steps span{padding:8px 6px;border-radius:7px;font-size:12px;line-height:1.25;box-shadow:none!important}
.gbc-cad-step-help{font-size:12px;margin:0 0 8px}
.gbc-cad-layout{grid-template-columns:minmax(0,2.35fr) minmax(230px,.9fr);gap:11px}
.gbc-cad-native{padding:12px;border-radius:11px;box-shadow:none}
.gbc-cad-native h3{font-size:16px!important;margin:5px 0 8px!important}
.gbc-cad-native .stampa-cad-field{margin-bottom:8px!important}
.gbc-cad-native label{font-size:13px;line-height:1.35}
.gbc-cad-native input,.gbc-cad-native select,.gbc-cad-native textarea{padding:7px;min-height:34px}
.gbc-cad-native .stampa-cad-tavole-container,.gbc-cad-native .stampa-cad-relazioni-container{padding:6px!important;margin:0 0 8px!important}
.gbc-cad-native .stampa-cad-upload-limit-note,.gbc-cad-native .stampa-cad-multiple-hint{font-size:11px}
.gbc-cad-native .stampa-cad-print-options-row{gap:8px!important;margin:4px 0!important}
.gbc-cad-native .stampa-cad-option-group{padding:6px!important;margin:0!important}
.gbc-cad-aside{top:12px;padding:14px;border-radius:11px;box-shadow:none}
.gbc-cad-aside h3{font-size:16px;margin:0 0 5px}
.gbc-cad-summary-row{padding:7px 0;font-size:12px;gap:8px}
.gbc-cad-summary-total{font-size:19px;margin-top:3px}
.gbc-cad-summary-foot{font-size:10px;margin:8px 0 0}
.gbc-cad-nav{position:sticky;bottom:0;z-index:20;display:flex;gap:8px;margin:6px 0 0;padding:9px 0 3px;background:linear-gradient(0deg,#f5f8fb 90%,#f5f8fb00)}
.gbc-cad-nav button,.gbc-cad-submit button{min-height:40px;padding:8px 16px;font-size:13px}
.gbc-cad-submit{margin-top:7px;padding-top:8px;gap:10px}
.gbc-cad-submit input{max-width:68px;min-height:34px}
.gbc-cad-testnote{font-size:10px;margin:6px 0 0}
.gbc-cad-status{font-size:12px;padding:7px 10px;margin:5px 0}
@media(min-width:851px){.gbc-cad-main{min-height:260px}.gbc-cad-native{max-height:min(58vh,600px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.gbc-cad-aside{position:sticky}}
@media(max-width:850px){.gbc-cad-layout{grid-template-columns:1fr}.gbc-cad-aside{position:static;order:-1;padding:10px}.gbc-cad-aside h3{font-size:14px}.gbc-cad-summary-row{display:inline-flex;width:32%;vertical-align:top;flex-direction:column;gap:2px;border:0;padding:3px}.gbc-cad-summary-foot{display:none}.gbc-cad-checkout{padding:10px}.gbc-cad-nav{background:#f5f8fb}}
@media(max-width:540px){.gbc-cad-head h2{font-size:22px}.gbc-cad-head p{display:none}.gbc-cad-steps span{font-size:10px;padding:7px 2px}.gbc-cad-native{padding:10px}.gbc-cad-aside{padding:9px}.gbc-cad-summary-row{font-size:11px}.gbc-cad-summary-total{font-size:15px}.gbc-cad-nav button{flex:1;padding:8px}.gbc-cad-checkout{border-radius:10px}}

/* v0.8: faithful two-column configurator, right navigation above right summary. */
.gbc-cad-layout{grid-template-columns:minmax(0,1.75fr) minmax(250px,.78fr);gap:14px;align-items:start}
.gbc-cad-aside{display:flex;flex-direction:column;gap:11px;position:sticky;top:16px;padding:0;background:transparent;border:0;box-shadow:none;border-radius:0}
.gbc-cad-aside .gbc-cad-nav{position:static;display:grid;grid-template-columns:1fr 1.25fr;gap:8px;margin:0;padding:11px;background:#fff;border:1px solid var(--gbc-line);border-radius:12px;box-shadow:none}
.gbc-cad-aside .gbc-cad-nav button{width:100%;min-width:0;min-height:44px;padding:10px 8px;margin:0;line-height:1.2;white-space:normal}
.gbc-cad-summary{padding:14px;background:white;border:1px solid var(--gbc-line);border-radius:12px}
.gbc-cad-summary h3{font-size:16px;margin:0 0 7px}
.gbc-cad-summary-row{padding:10px 0}
.gbc-cad-native{max-height:min(67vh,680px)}
@media(max-width:850px){
 .gbc-cad-layout{grid-template-columns:1fr;gap:10px}
 .gbc-cad-aside{order:0;position:static;gap:8px}
 .gbc-cad-aside .gbc-cad-nav{position:sticky;bottom:0;z-index:20;background:#fff;box-shadow:0 3px 12px #153e7318}
 .gbc-cad-summary{padding:12px}
 .gbc-cad-summary-row{display:flex;width:auto;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid #edf1f5;padding:7px 0}
 .gbc-cad-summary-foot{display:block}
}
@media(max-width:540px){.gbc-cad-aside .gbc-cad-nav{grid-template-columns:1fr 1.3fr;padding:8px}.gbc-cad-aside .gbc-cad-nav button{min-height:42px}.gbc-cad-summary-row{font-size:12px}}

/* v0.9: usable compact interface. Repair DOM location in checkout.js, then enforce grid. */
.gbc-cad-checkout{width:100%;max-width:1140px;margin:8px auto;padding:12px 14px;background:#f7f9fc;border-radius:13px}
.gbc-cad-head{gap:8px;align-items:baseline}
.gbc-cad-head h2{font-size:23px;line-height:1.25}
.gbc-cad-head p{font-size:11px;color:#64748b}
.gbc-cad-steps{gap:6px;margin:9px 0 7px}
.gbc-cad-steps span{padding:8px 5px;font-size:12px}
.gbc-cad-step-help{margin-bottom:9px;font-size:12px}
.gbc-cad-layout,.gbc-cad-layout.gbc-cad-layout-fixed{display:grid!important;grid-template-columns:minmax(0,1.9fr) minmax(285px,0.92fr)!important;gap:12px!important;align-items:start;width:100%;}
.gbc-cad-layout>.gbc-cad-main{grid-column:1!important;grid-row:1!important;min-width:0;width:100%;margin:0}
.gbc-cad-layout>.gbc-cad-aside{grid-column:2!important;grid-row:1!important;min-width:0;width:100%;margin:0;display:flex!important;flex-direction:column;gap:10px;align-self:start;position:sticky;top:75px;z-index:5}
.gbc-cad-native{padding:12px 13px;max-height:68vh;overflow-y:auto;scrollbar-width:thin;border-radius:10px}
.gbc-cad-native h3{margin:3px 0 7px!important;font-size:15px!important}
.gbc-cad-native .stampa-cad-field{margin-bottom:6px!important}
.gbc-cad-native .stampa-cad-tavole-container,.gbc-cad-native .stampa-cad-relazioni-container{padding:3px!important}
.gbc-cad-native .stampa-cad-dropzone,.gbc-cad-native .stampa-cad-drop-zone,.gbc-cad-native .stampa-cad-upload-zone,.gbc-cad-native [class*="dropzone"]{min-height:104px!important;padding:12px!important}
.gbc-cad-aside .gbc-cad-nav{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)!important;position:static!important;margin:0!important;padding:9px!important;gap:7px!important;background:#fff;border:1px solid #dce6ee;border-radius:10px;box-shadow:none!important}
.gbc-cad-aside .gbc-cad-nav button{width:100%;min-width:0;min-height:42px;padding:9px 6px;font-size:12px;line-height:1.3}
.gbc-cad-summary{background:#fff;padding:13px 14px;border:1px solid #dce6ee;border-radius:10px}
.gbc-cad-summary h3{margin:0 0 4px!important;font-size:16px!important}
.gbc-cad-summary-row{display:flex!important;align-items:center!important;justify-content:space-between!important;width:100%!important;gap:12px;border-bottom:1px solid #edf1f5;padding:9px 0;font-size:12px}
.gbc-cad-summary-row:has(.gbc-cad-summary-total){display:flex!important;align-items:center!important}
.gbc-cad-summary-total{margin:0;font-size:18px;max-width:65%;text-align:right!important}
.gbc-cad-summary-foot{font-size:10px;margin:9px 0 0}
.gbc-cad-native .gbc-cad-submit{margin-top:6px}
@media (max-width:850px){
 .gbc-cad-layout,.gbc-cad-layout.gbc-cad-layout-fixed{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
 .gbc-cad-layout>.gbc-cad-main{grid-column:1!important;grid-row:1!important}
 .gbc-cad-layout>.gbc-cad-aside{grid-column:1!important;grid-row:2!important;position:static!important}
 .gbc-cad-native{max-height:none;overflow:visible}
 .gbc-cad-aside .gbc-cad-nav{position:sticky!important;bottom:6px!important;z-index:30}
}
@media (max-width:540px){
 .gbc-cad-checkout{padding:10px}
 .gbc-cad-head h2{font-size:21px}
 .gbc-cad-summary{padding:10px}
 .gbc-cad-aside .gbc-cad-nav{padding:7px!important}
}

/* v0.10: cost breakdown lives visually below the order summary in the right column. */
.gbc-cad-aside>.gbc-cad-cost-copy{width:100%;padding:0;border-radius:10px;min-width:0}
.gbc-cad-aside>.gbc-cad-cost-copy[hidden]{display:none!important}
.gbc-cad-aside .gbc-cad-cost-copy>.stampa-cad-grand-total{display:block!important;width:100%;max-width:100%;max-height:none!important;overflow:visible!important;margin:0!important;padding:10px!important;font-size:12px}
.gbc-cad-cost-copy .stampa-cad-grand-total *{max-width:100%;overflow-wrap:anywhere}
.gbc-cost-in-sidebar .gbc-cad-native .stampa-cad-grand-total{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;pointer-events:none!important;padding:0!important;margin:0!important;border:0!important}
@media(max-width:850px){.gbc-cad-aside>.gbc-cad-cost-copy{position:static}}
