/**
 * Loaded by dashboard subsection pages when opened inside the iframe on index.html.
 * html.dash-embed is set by dash-panel-embed.js (?dash_embed=1).
 */

html.dash-embed {
  /* Match admin shell main surface */
  --dash-embed-bg: #f4f4f5;
}

html.dash-embed body {
  background: var(--dash-embed-bg) !important;
}

html.dash-embed body.account-dashboard > .topbar:first-of-type {
  display: none !important;
}

/* ── Duplicate top bars ── */
html.dash-embed body.settings-page .topbar {
  display: none !important;
}

/* search.html uses full admin chrome — strip when embedded */
html.dash-embed body.admin-donezo .admin-sidebar,
html.dash-embed body.admin-donezo #adminSidebarOverlay {
  display: none !important;
}

html.dash-embed body.admin-donezo .admin-main {
  margin-left: 0 !important;
  min-height: 0 !important;
}

html.dash-embed body.admin-donezo .admin-topbar {
  display: none !important;
}

html.dash-embed body.admin-donezo .admin-content {
  padding: 16px 20px 24px !important;
}

/* ── Bottom nav injected on several dashboard-related pages ── */
html.dash-embed body .mobileBottomNav {
  display: none !important;
}

html.dash-embed body #mobileBottomNav,
html.dash-embed body .yb-bottom-nav,
html.dash-embed body .tm-bottom-nav {
  display: none !important;
}

/* ── Section “retour tableau de bord” (parent shell already has back) ── */
html.dash-embed body .page-head > a.back-btn,
html.dash-embed body .page-head > a[class*="back"],
html.dash-embed body.services-dash .svc-back {
  display: none !important;
}

html.dash-embed body a.np-back {
  display: none !important;
}

html.dash-embed body.peleka-profile .head > a.back {
  display: none !important;
}

html.dash-embed body.report-page a.report-dash-back {
  display: none !important;
}

html.dash-embed body.report-page .topbar {
  display: none !important;
}

html.dash-embed body.report-page .report-wrap {
  padding-top: 16px !important;
}

/* messages.html — hide its standalone yb-header / footer when embedded */
html.dash-embed body.messages-page .yb-header {
  display: none !important;
}

html.dash-embed body.messages-page {
  height: auto !important;
  min-height: 100%;
}

html.dash-embed body.messages-page .msg-wrap {
  padding: 12px 16px 0;
  min-height: calc(100vh - 24px);
}

html.dash-embed body.account-dashboard .wrap,
html.dash-embed body.settings-page .wrap {
  padding-top: 16px !important;
}

/* Map: keep layout edge-to-edge; optional tighten search strip in narrow iframe */
html.dash-embed body.gmaps-page .gm-search-section {
  top: 8px !important;
}

/* Standalone section pages using Donezo tokens without the full flex shell */
body.tm-dash-standalone.admin-donezo {
  display: block;
  min-height: 100vh;
  margin: 0;
}
