/* Opt-in da integração: não editar os chunks gerados pelo Lab. */
html[data-crm-embed] { height:100%; }
html[data-crm-embed] body { margin:0; min-width:0; }
html[data-crm-embed] .c2-app { min-height:100dvh; }
html[data-crm-embed] .c2-app > :is(.c2-header,.c2-intro,.c2-warning,.c2-bottom,.c2-footer) { display:none; }
html[data-crm-embed] .c2-grid { max-width:none; padding:12px; grid-template-columns:minmax(0,1fr) minmax(0,1.5fr); }
html[data-crm-embed] .c2-panel { min-width:0; }
html[data-crm-embed] .c2-quote { grid-column:1/-1; }
@media(max-width:1100px) {
  /* Previa 3D e etapas permanecem visiveis, com tabs SEMPRE abaixo da cena. */
  html[data-crm-embed] .c2-grid { display:flex; flex-direction:column; gap:12px; padding:0 12px 12px; }
  html[data-crm-embed] .c2-panel { width:100%; }
  html[data-crm-embed] .c2-preview { order:-1; position:sticky; top:0; z-index:20; align-self:stretch; min-height:0; border-radius:0 0 14px 14px; }
  html[data-crm-embed] .c2-scene { height:clamp(220px,45dvh,600px); }
  html[data-crm-embed] .c2-preview-header { height:auto; min-height:32px; padding:6px 12px; }
  html[data-crm-embed] .c2-preview-footer { padding:8px 12px; }
  html[data-crm-embed] .c2-preview-footer h2 { font-size:18px; margin:0 0 4px; }
  html[data-crm-embed] .c2-preview-footer > :is(span,.c2-fine) { display:none; }
  html[data-crm-embed] .c2-editor { order:0; display:block; padding:12px; height:auto; min-height:0; max-height:none; overflow:visible; }
  html[data-crm-embed] .c2-editor-body { overflow:visible; padding:0; }
  html[data-crm-embed] .c2-editor-body * { scroll-margin-top:calc(var(--c2-preview-h, 310px) + 76px); }
  html[data-crm-embed] .c2-step-nav { position:sticky; top:calc(var(--c2-preview-h, 310px) + 6px); z-index:15; margin:0 0 12px; }
  html[data-crm-embed] .c2-step-nav button { font-size:11px; padding:8px 0; min-height:44px; min-width:0; }
  html[data-crm-embed] .c2-category-grid { grid-template-columns:repeat(auto-fit,minmax(64px,1fr)); }
  html[data-crm-embed] .c2-category-grid button { min-height:64px; }
  html[data-crm-embed] .c2-category-grid b { font-size:11px; overflow-wrap:anywhere; }
  html[data-crm-embed] .c2-catalog-list { max-height:none; overflow:visible; }
  html[data-crm-embed] .c2-quote { order:1; }
}

/* Ponte Lab → orçamento (#15/#83): ação fixa no rodapé do iframe do CRM. */
html[data-crm-context] body { padding-bottom:calc(72px + env(safe-area-inset-bottom, 0px)); }
.crm-use-bar { position:fixed; left:0; right:0; bottom:0; z-index:40; display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; padding:10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background:rgba(255,255,255,.96); border-top:1px solid rgba(113,40,62,.18); box-shadow:0 -6px 18px rgba(0,0,0,.08); box-sizing:border-box; }
.crm-use-button { min-height:44px; padding:10px 18px; border:0; border-radius:10px; background:#71283e; color:#fff; font:600 15px/1.2 system-ui, -apple-system, sans-serif; cursor:pointer; max-width:100%; }
.crm-use-button:focus-visible { outline:3px solid #c7a577; outline-offset:2px; }
.crm-use-status { flex:1 1 160px; margin:0; font:13px/1.35 system-ui, -apple-system, sans-serif; color:#3b2a2f; min-width:0; overflow-wrap:anywhere; }
.crm-use-status[data-error="true"] { color:#a3192b; }
@media(max-width:480px) { .crm-use-button { flex:1 1 100%; } }
