/* ============================================================
   Steel24 — Fix MOBILE configuratore tubo (post-audit)
   Caricato DOPO base + skin v3 → override mirati.
   ============================================================ */
@media (max-width: 1100px) {
  /* 1) Anti auto-zoom iOS */
  #bb-app input, #bb-app select, #bb-app textarea { font-size: 16px !important; }

  /* 2) Tap target generosi */
  #bb-app .lv3-icon { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .bb-3d-btn { min-width: 40px; min-height: 40px; }

  /* 3) Visore 3D: gesti puliti per OrbitControls */
  .bb-viewer canvas { touch-action: none; }

  /* 4) Safe-area: barra + canvas + sheet allineati con notch/home-bar iOS */
  #bb-app { --bb-bb: calc(58px + env(safe-area-inset-bottom, 0px)); }
  .bb-bottombar { height: auto !important; min-height: 58px; padding-bottom: env(safe-area-inset-bottom, 0px) !important; }
  .bb-canvas { bottom: var(--bb-bb) !important; }
  .bb-pane { bottom: var(--bb-bb) !important; }

  /* 5) Bottom-sheet: dvh tiene conto della tastiera */
  .bb-pane { max-height: 82dvh; }

  /* 6) Più spazio alle viste 2D (ora ingrandibili col pinch) */
  .bb-2d { flex: 1 1 60% !important; }
  .bb-viewer { flex: 1 1 40% !important; }

  /* 7) Tap fuori dal foglio = chiudi (il velo intercetta il tap; logica in JS) */
  #bb-app[data-sheet]:not([data-sheet=""]) .bb-canvas::after { pointer-events: auto !important; }
}
