/* ============================================================
   CESIVI Modern UI — Shared page header + breadcrumb
   (ik "breadcrumbs always look ugly" bug, 2026-06-08)

   The .spm-page-header / .spm-page-title / .spm-breadcrumb convention
   is used on ~90 settings & _layouts pages (user.aspx, listedit.aspx,
   permissions, groups, fields, workflows, …) but had NO shared
   stylesheet rule — the only breadcrumb rule anywhere was the
   accessibility underline in _a11y.css. So the title rendered as a raw
   oversized <h1> and the breadcrumb as default-size text with raw
   ">" / "›" separators and default-blue links. That inconsistent,
   unstyled look is exactly the "breadcrumbs always look ugly"
   complaint.

   This gives the whole convention one consistent, token-based modern
   look, CSS-only (no markup churn across the ~90 pages):
     - breadcrumb pinned to the very TOP of the page content, above the
       title (SharePoint-modern convention), via flex reorder
     - breadcrumb small + muted, chevron-spaced, current page emphasised
     - page title a clean modern size/weight (not a giant default <h1>)
     - a subtle header underline so the block reads as one header
   ============================================================ */

body[data-modern-ui="true"] .spm-page-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin: 0 0 var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

/* Breadcrumb first (order:0), title second (order:1) — so the trail sits
   at the very top of the content even though it follows the <h1> in DOM. */
body[data-modern-ui="true"] .spm-page-header .spm-breadcrumb {
  order: 0;
}
body[data-modern-ui="true"] .spm-page-header .spm-page-title {
  order: 1;
}

body[data-modern-ui="true"] .spm-page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg);
}

body[data-modern-ui="true"] .spm-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: 1.5;
  color: var(--fg-faint); /* the literal ">"/"›" separators inherit this muted tone */
}

/* Links keep the _a11y.css underline (accessibility) — we only modernise
   the colour so they match the accent palette instead of UA blue. */
body[data-modern-ui="true"] .spm-breadcrumb a {
  color: var(--fg-muted);
}
body[data-modern-ui="true"] .spm-breadcrumb a:hover {
  color: var(--accent-fg);
}

/* Current page (the trailing <span>) — emphasised, like SP modern. */
body[data-modern-ui="true"] .spm-breadcrumb > span:last-child {
  color: var(--fg);
  font-weight: 500;
}
