/* MAIN: reference workflow with ABGUL's existing colours, surfaces and buttons. */
body.builder-page .constructor-view { margin:12px 0; }
body.builder-page .constructor-checks {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
body.builder-page .constructor-check {display:flex!important;align-items:center;gap:9px;margin:0;min-width:0;min-height:44px;padding:8px;border:1px solid var(--border, #344055);border-radius:10px;font-size:12px;cursor:pointer;}
body.builder-page .constructor-check input {width:17px!important;height:17px!important;min-width:17px!important;flex:0 0 17px;margin:0!important;accent-color:#9270ff;}
body.builder-page .constructor-check span {min-width:0;line-height:1.4;}
body.builder-page .constructor-camera {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:12px;}
body.builder-page .constructor-camera .btn {min-width:0;min-height:38px;white-space:normal;}
body.builder-page .constructor-field {display:grid;gap:8px;margin-top:12px;font-size:12px;}
body.builder-page .constructor-field > span {display:flex;justify-content:space-between;}
body.builder-page .constructor-field input[type=range] {width:100%;margin:6px 0;accent-color:#9270ff;}
body.builder-page .constructor-note {font-size:12px;line-height:1.5;color:var(--muted,#9faec5);}
body.builder-page .constructor-export {display:flex;gap:8px;flex-wrap:wrap;margin:12px 0;}
body.builder-page .constructor-export .btn {flex:1 1 90px;min-width:0;}
body.builder-page .constructor-export-note {font-size:11px;color:var(--muted,#9faec5);margin:0;}
body.builder-page .constructor-view [hidden] {display:none!important;}
/* One scrolling parameter area; actions have their own non-scrolling row. */
@media(min-width:981px) {
  html body.builder-page:has(#constructor-view) #constructor-workspace > .builder-sidebar {overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:8px!important;}
  html body.builder-page:has(#constructor-view) #constructor-workspace .constructor-sidebar-scroll {flex:1 1 0;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;display:flex;flex-direction:column;gap:12px;scrollbar-gutter:stable;}
  html body.builder-page:has(#constructor-view) #constructor-workspace .constructor-sidebar-scroll > .builder-card {flex:0 0 auto!important;height:auto!important;overflow:visible!important;}
  html body.builder-page:has(#constructor-view) #constructor-workspace .builder-sidebar .builder-card--controls {display:block!important;max-height:none!important;height:auto!important;min-height:0!important;overflow:visible!important;padding:12px!important;}
  html body.builder-page:has(#constructor-view) #constructor-workspace .builder-sidebar #dynamic-form {flex:none!important;max-height:none!important;height:auto!important;overflow:visible!important;padding:0!important;}
}
html body.builder-page:has(#constructor-view) #constructor-workspace .builder-card--controls .form-group__summary {display:flex!important;align-items:center;justify-content:space-between;min-height:44px;padding:8px 10px;cursor:pointer;font-weight:700;}
html body.builder-page:has(#constructor-view) #constructor-workspace .builder-card--controls details.form-group {display:block!important;margin:0 0 10px!important;padding:0!important;}
html body.builder-page:has(#constructor-view) #constructor-workspace .builder-card--controls details.form-group:not([open]) > .form-group__body {display:none!important;}
html body.builder-page:has(#constructor-view) #constructor-workspace .builder-card--controls .form-group__body {padding:10px!important;}
html body.builder-page:has(#constructor-view) #constructor-workspace .constructor-actions {position:relative!important;display:grid!important;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)!important;gap:8px;flex:0 0 auto;margin:0!important;padding:10px!important;border:1px solid var(--border,#344055);border-radius:14px;background:var(--constructor-actions-bg,#111b2b);box-shadow:0 -5px 18px #0002;z-index:5;box-sizing:border-box;}
html[data-theme=light] .constructor-actions, body[data-theme=light] .constructor-actions {--constructor-actions-bg:#f8fafc;}
html body.builder-page:has(#constructor-view) #constructor-workspace .constructor-actions .btn {width:100%;min-width:0;min-height:46px;margin:0;padding:10px 8px;white-space:normal;line-height:1.25;font-size:13px;}
body.builder-page:has(#constructor-view) .cat-assistant {display:none!important;}
@media(max-width:980px) {
  html:not([data-abgul-auth-open]) body.builder-page:has(#constructor-view) .toast-host {bottom:calc(96px + env(safe-area-inset-bottom,0px))!important;}
  html body.builder-page:has(#constructor-view) #constructor-workspace .constructor-sidebar-scroll {display:contents;}
  html body.builder-page:has(#constructor-view) #constructor-workspace .constructor-actions {position:fixed!important;left:12px;right:12px;bottom:0;padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;z-index:85;}
  html body.builder-page:has(#constructor-view) #constructor-workspace {padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important;}
}
@media(max-width:480px) {
  body.builder-page .constructor-check {font-size:12px;padding:7px;}
}
