/* INFOTECH 3.10L — FixtureBuilder layout containment + AVA dock fix */
body:has(.builder-app-shell){
  overflow-x:hidden!important;
}

/* Main Builder shell must never exceed viewport or let output escape. */
.builder-app-shell{
  width:min(1320px, calc(100vw - 48px))!important;
  max-width:1320px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  display:grid!important;
  grid-template-columns:280px minmax(0,1fr)!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
.builder-sidebar,
.builder-main-content,
.builder-grid,
.input-panel,
.output-panel,
.panel{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
.builder-main-content{
  overflow:hidden!important;
}
.builder-grid{
  width:100%!important;
  max-width:100%!important;
  grid-template-columns:minmax(300px,360px) minmax(0,1fr)!important;
  align-items:start!important;
  overflow:hidden!important;
}
.output-panel{
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
}
.output-panel .output,
#builderOutput{
  width:100%!important;
  max-width:100%!important;
  overflow:auto!important;
  box-sizing:border-box!important;
  white-space:pre-wrap!important;
}
.output-panel .table-wrap,
.table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow:auto!important;
  box-sizing:border-box!important;
}
.channel-table{
  width:100%!important;
  max-width:100%!important;
  table-layout:fixed!important;
}
.channel-table th,
.channel-table td{
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}

/* Export buttons must wrap inside output, not push the panel outward. */
.output-panel .actions,
.builder-export-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  max-width:100%!important;
  overflow:hidden!important;
}
.output-panel .actions .btn,
.builder-export-actions button{
  flex:0 1 auto!important;
  max-width:100%!important;
  white-space:normal!important;
}

/* AVA: docked and visually scaled; bubble attached to mascot. */
body .infotech-support-float{
  position:fixed!important;
  right:18px!important;
  bottom:18px!important;
  z-index:9998!important;
  width:340px!important;
  max-width:calc(100vw - 36px)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  gap:0!important;
  pointer-events:none!important;
}
body .infotech-support-float > *{
  pointer-events:auto!important;
}
body .infotech-support-float .support-bubble{
  position:relative!important;
  width:100%!important;
  max-width:100%!important;
  margin:0 0 -10px 0!important;
  align-self:center!important;
  transform:none!important;
  z-index:2!important;
}
body .infotech-support-float .support-card{
  right:0!important;
  bottom:340px!important;
  width:min(320px, calc(100vw - 36px))!important;
}
body .infotech-support-float .support-mascot-btn{
  width:340px!important;
  height:300px!important;
  max-width:100%!important;
  max-height:none!important;
  overflow:visible!important;
  transform:none!important;
  transform-origin:center bottom!important;
}
body .infotech-support-float .support-mascot-btn video,
body .infotech-support-float .support-mascot-btn img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  transform:scale(1.85)!important;
  transform-origin:center center!important;
  will-change:transform!important;
}

/* Prevent AVA from covering the Builder panel on medium screens. */
@media(max-width:1500px){
  body .infotech-support-float{
    width:300px!important;
    right:12px!important;
  }
  body .infotech-support-float .support-mascot-btn{
    width:300px!important;
    height:270px!important;
  }
  body .infotech-support-float .support-card{
    bottom:305px!important;
  }
  body .infotech-support-float .support-mascot-btn video,
  body .infotech-support-float .support-mascot-btn img{
    transform:scale(1.7)!important;
  }
}
@media(max-width:1180px){
  .builder-app-shell{
    width:min(760px,100vw)!important;
    grid-template-columns:1fr!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0 0 22px 22px!important;
  }
  .builder-grid{
    grid-template-columns:1fr!important;
  }
  .builder-main-content{
    overflow:visible!important;
  }
  body .infotech-support-float{
    width:190px!important;
    right:8px!important;
    bottom:8px!important;
  }
  body .infotech-support-float .support-bubble{
    display:none!important;
  }
  body .infotech-support-float .support-card{
    bottom:190px!important;
  }
  body .infotech-support-float .support-mascot-btn{
    width:190px!important;
    height:170px!important;
  }
  body .infotech-support-float .support-mascot-btn video,
  body .infotech-support-float .support-mascot-btn img{
    transform:scale(1.25)!important;
  }
}
@media(max-width:560px){
  .builder-app-shell{
    width:100vw!important;
  }
  body .infotech-support-float{
    width:132px!important;
  }
  body .infotech-support-float .support-mascot-btn{
    width:132px!important;
    height:120px!important;
  }
  body .infotech-support-float .support-card{
    bottom:132px!important;
  }
}

/* INFOTECH 3.10M — AVA micro-scale after approved dock pattern */
@media(min-width:1181px){
  body .infotech-support-float{
    width:360px!important;
  }
  body .infotech-support-float .support-mascot-btn{
    width:360px!important;
    height:315px!important;
  }
  body .infotech-support-float .support-mascot-btn video,
  body .infotech-support-float .support-mascot-btn img{
    transform:scale(2.05)!important;
  }
  body .infotech-support-float .support-card{
    bottom:370px!important;
  }
}
