/* SchoolEP V229.83 — SINGLE universal breadcrumb geometry authority.
   Regression fix: never zero the breadcrumb node font-size.
   Every breadcrumb title remains visible regardless of whether it uses the
   canonical .schoolep-breadcrumb-label wrapper, a legacy .bc-label wrapper,
   a data-breadcrumb-label wrapper, or plain text.
   Universal spacing rhythm: icon → 7px → title → 7px → separator → 7px → next icon/title.
   Geometry intentionally uses no !important declarations. */
:root {
  --schoolep-bc-font-size: 13px;
  --schoolep-bc-line-height: 1.18;
  --schoolep-bc-node-gap: 7px;
  --schoolep-bc-flow-gap: 7px;
  --schoolep-bc-row-gap: 7px;
  --schoolep-bc-icon-box: 1em;
  --schoolep-bc-icon-shift-y: -1.5px;
  --schoolep-bc-margin-bottom: 8px;
}

html body .sp-breadcrumbs,
html body #breadcrumbs.sp-breadcrumbs,
html body #portal-breadcrumbs.sp-breadcrumbs,
html body #reportBackLink.sp-breadcrumbs,
html[data-schoolep-resource] body .schoolep-level4-source-breadcrumb.sp-breadcrumbs {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 0 0 var(--schoolep-bc-margin-bottom);
  padding: 0;
  overflow: visible;
  white-space: normal;
  line-height: var(--schoolep-bc-line-height);
  text-align: start;
  direction: inherit;
  vertical-align: middle;
}

/* V229.83: breadcrumbs use the inline formatting context, not flex rows.
   This is intentional: a flex item cannot fragment across flex lines. With
   inline nodes, a long breadcrumb title consumes every remaining pixel on the
   current line and then continues on line 2/3 without leaving a dead gap. */
html body .sp-breadcrumbs > a,
html body .sp-breadcrumbs > strong,
html body .sp-breadcrumbs > .bc-current,
html body .sp-breadcrumbs > [data-schoolep-node-role] {
  display: inline;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-size: inherit;
  line-height: var(--schoolep-bc-line-height);
  vertical-align: baseline;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  min-inline-size: 0;
}

/* TITLE VISIBILITY AUTHORITY.
   V229.30 used font-size:0 on registry/native nodes. That hid titles on
   breadcrumb variants whose text wrapper did not match one canonical class.
   Keep the node at the breadcrumb font-size and explicitly support every
   title wrapper still present in the site. */
html body .sp-breadcrumbs .schoolep-breadcrumb-label,
html body .sp-breadcrumbs [data-breadcrumb-label],
html body .sp-breadcrumbs .bc-label,
html body .sp-breadcrumbs .breadcrumb-label,
html body .sp-breadcrumbs .subject-label,
html body .sp-breadcrumbs > a > span:not(.schoolep-breadcrumb-icon):not(.sep),
html body .sp-breadcrumbs > strong > span:not(.schoolep-breadcrumb-icon):not(.sep),
html body .sp-breadcrumbs > .bc-current > span:not(.schoolep-breadcrumb-icon):not(.sep),
html body .sp-breadcrumbs > [data-schoolep-node-role] > span:not(.schoolep-breadcrumb-icon) {
  display: inline;
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  font-size: inherit;
  line-height: var(--schoolep-bc-line-height);
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
  visibility: visible;
  opacity: 1;
  transform: none;
}


/* V229.81: the visible language span itself is allowed to consume the remaining
   line and continue on following lines. This prevents a long current title from
   jumping wholesale to a new row and leaving a large empty gap. */
html body .sp-breadcrumbs .schoolep-breadcrumb-label .schoolep-i18n-ar,
html body .sp-breadcrumbs .schoolep-breadcrumb-label .schoolep-i18n-fr,
html body .sp-breadcrumbs [data-breadcrumb-label] .schoolep-i18n-ar,
html body .sp-breadcrumbs [data-breadcrumb-label] .schoolep-i18n-fr,
html body .sp-breadcrumbs .bc-label,
html body .sp-breadcrumbs .breadcrumb-label,
html body .sp-breadcrumbs .subject-label {
  display: inline;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

/* If a legacy node contains more than one canonical label wrapper, keep only
   the first. This replaces the old parent-font-size suppression safely. */
html body .sp-breadcrumbs > [data-schoolep-node-role] > .schoolep-breadcrumb-label ~ .schoolep-breadcrumb-label {
  display: none;
}

html body .sp-breadcrumbs .schoolep-breadcrumb-icon,
html body .sp-breadcrumbs > a > i,
html body .sp-breadcrumbs > strong > i,
html body .sp-breadcrumbs > .bc-current > i,
html body .sp-breadcrumbs > [data-schoolep-node-role] > i,
html body .sp-breadcrumbs > a > .mdi,
html body .sp-breadcrumbs > strong > .mdi,
html body .sp-breadcrumbs > .bc-current > .mdi,
html body .sp-breadcrumbs [data-schoolep-static-icon],
html body .sp-breadcrumbs > a > svg,
html body .sp-breadcrumbs > strong > svg,
html body .sp-breadcrumbs > .bc-current > svg {
  display: inline-flex;
  flex: 0 0 var(--schoolep-bc-icon-box);
  align-items: center;
  align-self: center;
  justify-content: center;
  position: static;
  width: var(--schoolep-bc-icon-box);
  min-width: var(--schoolep-bc-icon-box);
  height: var(--schoolep-bc-icon-box);
  min-height: var(--schoolep-bc-icon-box);
  margin: 0;
  margin-inline-end: var(--schoolep-bc-node-gap);
  padding: 0;
  font-size: 1em;
  line-height: 1;
  vertical-align: middle;
  transform: translateY(var(--schoolep-bc-icon-shift-y));
  visibility: visible;
  opacity: 1;
}


html body .sp-breadcrumbs .schoolep-breadcrumb-icon::before,
html body .sp-breadcrumbs i::before,
html body .sp-breadcrumbs .mdi::before {
  display: block;
  line-height: 1;
  vertical-align: middle;
}

html body .sp-breadcrumbs > .sep {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: center;
  justify-content: center;
  min-height: 0;
  height: auto;
  margin-block: 0;
  margin-inline: var(--schoolep-bc-flow-gap);
  padding: 0;
  line-height: 1;
  vertical-align: middle;
  transform: none;
  font-size: 0;
  direction: ltr;
  unicode-bidi: isolate;
  user-select: none;
  color: var(--schoolep-bc-sep, #94a3b8);
}
html[lang^="ar"] body .sp-breadcrumbs > .sep::before {
  content:"‹";
  display:inline-block;
  font-size:14px;
  font-weight:800;
  line-height:1;
}
html[lang^="fr"] body .sp-breadcrumbs > .sep::before {
  content:"›";
  display:inline-block;
  font-size:14px;
  font-weight:800;
  line-height:1;
}

/* Keep special Arabic glyph optically legible without margin hacks. */
html body .sp-breadcrumbs .schoolep-arabic-letter-icon.mdi-abjad-arabic { font-size:1.22em; }

@media (max-width:768px) {
  :root {
    --schoolep-bc-node-gap: 7px;
    --schoolep-bc-flow-gap: 7px;
    --schoolep-bc-row-gap: 7px;
    --schoolep-bc-icon-shift-y: -1.5px;
  }
  html body .sp-breadcrumbs,
  html body #breadcrumbs.sp-breadcrumbs,
  html body #portal-breadcrumbs.sp-breadcrumbs,
  html[data-schoolep-resource] body .schoolep-level4-source-breadcrumb.sp-breadcrumbs {
    display:block;
    overflow-x:visible;
    overflow-y:visible;
    white-space:normal;
    min-height:0;
    height:auto;
  }
}


/* SCHOOLEP V230 LEVEL4 TOUCH TARGETS
   Keep the wrapped breadcrumb typography unchanged while enlarging the clickable line box. */
html[data-schoolep-resource] body .schoolep-level4-source-breadcrumb.sp-breadcrumbs > a {
  padding-block: 6px;
  padding-inline: 2px;
  line-height: 1.65;
  text-underline-offset: 3px;
}
html[data-schoolep-resource] body .schoolep-level4-source-breadcrumb.sp-breadcrumbs > a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 5px;
}
