/* The public page or the editor's whole three-pane body owns one background.
   Full-height panes and nested inline previews never paint another presswall. */
html[data-crm-ui][data-workspace-quality] #root :is(
  fieldset[data-mobile-layout="forms"],
  .crm-section-skeleton[data-skeleton-section="forms"],
  [data-mobile-section-body="forms"],
  .crm-forms-layout,
  .crm-forms-nav-pane,
  .crm-forms-editor-pane,
  .crm-forms-preview-pane,
  [data-skeleton-form-pane],
  .crm-form-skeleton--workspace,
  .crm-form-skeleton--workspace > .crm-skeleton-content,
  .crm-form-skeleton-workspace,
  .crm-form-skeleton-nav,
  .crm-form-skeleton-editor,
  .crm-form-skeleton-analytics,
  .crm-form-skeleton-preview,
  [data-form-preview-viewport],
  [data-form-preview-viewport] > div,
  [data-form-preview-viewport] > div > main,
  [data-form-preview-viewport] > div > main > div
):not([data-form-layout-root]):not([data-form-canvas]) {
  background-color: transparent !important;
  background-image: none !important;
}

/* Keep the form itself opaque; surrounding CRM imagery must not reduce the
   contrast of questions, answers or controls. Toolbars and other cards retain
   their existing surface styling. Public standalone forms are outside scope. */
html[data-crm-ui][data-workspace-quality] #root [data-form-preview-viewport] [data-form-layout-root] {
  background-color: #fff !important;
  background-image: none !important;
  backdrop-filter: none !important;
}

/* Defensive scope for the public renderer's decorative layers: the embedded
   renderer already omits them, and a preview must never add a second backdrop. */
html[data-crm-ui][data-workspace-quality] #root [data-form-preview-viewport] > div > :is(.bg-press-wall, [class*="bg-gradient-to-"]) {
  display: none !important;
}
