/**
 * Banner Editor modal overlay (parent page) + embed mode (iframe).
 */

/* Parent page: fullscreen overlay, current route stays mounted underneath */
body.cs-banner-modal-open {
  overflow: hidden !important;
}

.cs-banner-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  background: rgba(15, 23, 42, 0.42);
  display: flex;
  flex-direction: column;
}

.cs-banner-editor-modal__frame {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f8fafc;
}

/*
 * Iframe embed: keep consent-setup-shell inside .app-container so all
 * SettingsPage + design-polish selectors still apply. Hide app chrome only.
 */
html.cs-modal-embed body {
  overflow: hidden !important;
  background: #f8fafc;
  font-family: "DM Sans", system-ui, sans-serif;
}

html.cs-modal-embed .app-sidebar,
html.cs-modal-embed #primary-navigation,
html.cs-modal-embed aside.sidebar,
html.cs-modal-embed .app-topbar,
html.cs-modal-embed header.cmp-topbar,
html.cs-modal-embed .app-shell-overlay,
html.cs-modal-embed .csgsb-root,
html.cs-modal-embed .onboarding-wizard-host,
html.cs-modal-embed .onboarding-wizard-modal {
  display: none !important;
}

html.cs-modal-embed .app-shell {
  min-height: 100vh;
}

html.cs-modal-embed .app-shell-main,
html.cs-modal-embed .main-content,
html.cs-modal-embed .app-page,
html.cs-modal-embed .app-container {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
  min-height: 100vh;
}

html.cs-modal-embed .app-container.app-container--consent-builder,
html.cs-modal-embed .consent-setup-shell {
  min-height: 100vh;
}

/* React portal workspace is unused in modal embed; inline shell workspace only */
html.cs-modal-embed .bw-ws-root {
  display: none !important;
}

/* No landing placeholder flash while workspace auto-opens */
html.cs-modal-embed.cs-workspace-ready
  .consent-setup-shell:not(.cs-workspace-open)::after {
  display: none !important;
}
