/* ERCA Statistical System - public observatory (observatory.erca-arcc.org)
 *
 * Loaded ON TOP OF erca-app.css, so the institutional palette and header
 * treatment are identical to data.erca-arcc.org. What this file adds is the
 * removal of every control a visitor has no business using.
 *
 * This is presentation, not the security boundary. The boundary is DHIS2
 * sharing (the account can read 10 dashboards and 43 of 77 data elements) and
 * the nginx allowlist. The token is GET-only, so none of the hidden buttons
 * would have worked anyway - they would simply have failed in the visitor's
 * face. Hiding them keeps the surface honest.
 *
 * Kept deliberately: the Dashboards selector, Slideshow and Filter. Those are
 * how a visitor moves between the ten public dashboards and reads them.
 */

/* ---------- header bar: keep the ERCA band, remove the controls ---------- */
/* apps menu (navigation into other DHIS2 apps), profile menu (logout, settings,
   "About DHIS2"), notifications, and the online/offline indicator. */
[data-test="headerbar-apps"],
[data-test="headerbar-notifications"],
[data-test="headerbar-profile"],
[data-test="headerbar-online-status"],
button[aria-label="Profile menu"] {
  display: none !important;
}

/* the logo links to the API root; leave it visible for identity, make it inert */
[data-test="headerbar-logo"] a {
  pointer-events: none !important;
  cursor: default !important;
}

/* the title is the ERCA identity on this host - give it room now that the
   right-hand controls are gone */
[data-test="headerbar-title"] {
  font-weight: 600 !important;
  letter-spacing: .2px;
}

/* ---------- dashboard chrome: remove authoring affordances ---------- */
/* create a dashboard, star it, and the dashboard-level "..." menu (which
   carries edit, share and delete) */
[data-test="new-button"],
[data-test="dashboard-unstarred"],
[data-test="dashboard-starred"],
[data-test="more-actions-button"] {
  display: none !important;
}

/* per-tile "..." menu: opens the chart in Data Visualizer, shows details and
   interpretations. Read-only, but it is a route out of the curated set. */
[data-test="dashboarditem-menu-button"] {
  display: none !important;
}

/* ---------- interpretations and messaging surfaces ---------- */
[data-test="interpretations-unit"],
[data-test="dhis2-uicore-modal"] [data-test*="interpretation"] {
  display: none !important;
}

/* ---------- institutional finish ---------- */
:root { accent-color: #007F4B; }

/* a quiet attribution strip, required by CC BY / CC BY-IGO terms on every
   source behind these dashboards */
body::after {
  content: "Sources: FAO GIEWS FPMA; WFP VAM via HDX; World Bank (Open Data, Pink Sheet, LPI, RPW, WGI, Enterprise Surveys, ESMAP RISE); UNCTADstat; Nigeria NOCOPO (OCDS). Reused with attribution. ERCA - ECOWAS Regional Competition Authority.";
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 4px 12px;
  font-size: 10.5px;
  line-height: 1.35;
  color: #4a5257;
  background: #E9F5EF;
  border-top: 1px solid #cfe4d9;
  pointer-events: none;
}
