/* =========================================================
   NEDA ECAMPUS — UNIVERSAL MFE BRANDING
   ========================================================= */

:root {
  --neda-navy: #0b3436;
  --neda-cyan: #0ec4c5;
  --neda-lime: #c4c40e;
  --neda-header-border: rgba(11, 52, 54, 0.12);
  --neda-header-shadow: 0 4px 18px rgba(11, 52, 54, 0.08);
}


/* ---------- Atkinson Hyperlegible Next throughout MFE interfaces ---------- */
/* The Neda house face since 2026-09-14 (owner decision), replacing Candara:
   SIL OFL 1.1, drawn for low-vision readers. Self-hosted from fonts/ beside
   this file, which the MFE Caddy serves at /neda-assets/fonts/ on this same
   origin - never Google Fonts, and never nedaecampus.com's copy, which sends
   no CORS header and so cannot be used as a web font from here.

   font-weight 400 800, not the file's true 200 800: a request for 300 then
   resolves to 400, so no Paragon "light" style can render thin text.
   The licence ships beside the files as fonts/OFL-atkinson-hyperlegible-next.txt.

   url() only, never local(): with the 14 static TTFs installed (the owner's PC),
   local() matched the Regular file alone for the whole 400-800 range, so no
   other file was chosen, no bold synthesised, and every heading drew at 400
   (measured on eCampus 2026-11-17; eCampus UI 4.125.1 removed it the same way).

   `html body` rather than `body`: nginx injects an inline
   `body { font-family: Candara ... !important }` AFTER this sheet on every
   Open edX page (/etc/nginx/snippets/neda-openedx-authn-branding.conf), and
   equal specificity would let it win. The same injection draws
   #neda-login-banner with its own non-important stack, hence that selector.

   Letter-spacing is standard (0) on all text, estate-wide (2026-09-14). */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-v7-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-v7-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-v7-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-v7-latin-ext-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --neda-font: "Atkinson Hyperlegible Next", "Segoe UI", Arial, sans-serif;
}

html,
html body,
#root,
#root button,
#root input,
#root select,
#root textarea,
#neda-login-banner,
#neda-login-banner * {
  font-family: var(--neda-font) !important;
}

html body,
html body * {
  letter-spacing: 0 !important;
}


/* ---------- Universal MFE header ---------- */

#root header,
header[role="banner"] {
  min-height: 72px !important;

  color: var(--neda-navy) !important;
  background: rgba(255, 255, 255, 0.98) !important;

  border-bottom: 1px solid var(--neda-header-border) !important;
  box-shadow: var(--neda-header-shadow) !important;
}

#root header nav,
#root header > div,
header[role="banner"] nav,
header[role="banner"] > div {
  min-height: 72px;
}


/* ---------- Neda logo ---------- */

#root header .neda-global-logo,
header[role="banner"] .neda-global-logo {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;

  flex: 0 0 auto !important;

  width: 172px !important;
  min-width: 172px !important;
  height: 64px !important;

  margin: 0 22px 0 0 !important;
  padding: 6px 0 !important;

  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;

  text-decoration: none !important;
}

#root header .neda-global-logo img,
header[role="banner"] .neda-global-logo img {
  display: block !important;

  width: 158px !important;
  max-width: 158px !important;
  height: 50px !important;

  margin: 0 !important;
  padding: 0 !important;

  object-fit: contain !important;
  object-position: left center !important;
}


/* ---------- Header navigation ---------- */

#root header a,
#root header button,
#root header span {
  font-family: var(--neda-font) !important;
}

#root header .nav-link,
#root header a:not(.dropdown-item):not(.neda-global-logo) {
  color: var(--neda-navy);
}

#root header .nav-link.active,
#root header a[aria-current="page"] {
  color: var(--neda-navy) !important;
  border-bottom-color: var(--neda-cyan) !important;
  font-weight: 700 !important;
}

#root header .dropdown-toggle {
  color: var(--neda-navy) !important;
  background: rgba(14, 196, 197, 0.08) !important;

  border-color: transparent !important;
  border-radius: 8px !important;
}

#root header .dropdown-toggle:hover,
#root header .dropdown-toggle:focus {
  background: rgba(14, 196, 197, 0.15) !important;
}


/* ---------- Preserve Indigo footer, remove only branding ---------- */

.wrapper-footer .powered-area,
.wrapper-footer footer .powered-area,
.wrapper-footer footer .logo-list {
  display: none !important;
}


/* Keep the existing navigation and copyright */

.wrapper-footer .footer-top {
  justify-content: flex-end !important;
}

.wrapper-footer .nav-colophon {
  display: block !important;
}

.wrapper-footer .copyright-site {
  display: block !important;
}


/* ---------- Dark mode ---------- */

[data-paragon-theme-variant="dark"] #root header,
[data-paragon-theme-variant="dark"] header[role="banner"] {
  color: #ffffff !important;
  background: #0b3436 !important;

  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

[data-paragon-theme-variant="dark"] #root header .nav-link,
[data-paragon-theme-variant="dark"]
#root header
a:not(.dropdown-item):not(.neda-global-logo) {
  color: #ffffff !important;
}

[data-paragon-theme-variant="dark"] #root header .dropdown-toggle {
  color: #ffffff !important;
  background: rgba(14, 196, 197, 0.14) !important;
}


/* ---------- Mobile ---------- */

@media (max-width: 767.98px) {
  #root header,
  #root header nav,
  #root header > div,
  header[role="banner"],
  header[role="banner"] nav,
  header[role="banner"] > div {
    min-height: 64px !important;
  }

  #root header .neda-global-logo,
  header[role="banner"] .neda-global-logo {
    width: 140px !important;
    min-width: 140px !important;
    height: 58px !important;

    margin-right: 12px !important;
  }

  #root header .neda-global-logo img,
  header[role="banner"] .neda-global-logo img {
    width: 132px !important;
    max-width: 132px !important;
    height: 44px !important;
  }

  .wrapper-footer .footer-top,
  .wrapper-footer .nav-colophon ol {
    justify-content: flex-start !important;
  }
}


/* ---------- KEYBOARD FOCUS - Cherry #D7263D, every MFE (2026-08-23) ---------- */
/* The universal Neda focus colour, shared with the WordPress site, Moodle and
   Keycloak. Paragon draws focus on text fields as a border-plus-halo via its
   own tokens, so those tokens are recoloured rather than overridden: the
   geometry stays Paragon, the colour becomes cherry. Everything else that
   takes keyboard focus - links, buttons, tabs, menu toggles - gets a 3px
   cherry outline 2px outside. #root :is(...) is (1,1,1), which clears the
   Paragon .btn:focus-visible { outline: none } reset at (0,2,0) without
   !important. :focus-visible only - a mouse click never draws the ring.
   Cherry is 4.96:1 on white and 4.2:1 on black, above the 3:1 minimum. */
:root {
  --pgn-elevation-form-input-focus-color: #d7263d;
  --pgn-color-form-input-focus-border: #d7263d;
  --pgn-color-card-border-focus-base: #d7263d;
}

#root :is(a, button, [role="button"], [role="tab"], [role="menuitem"], summary, [tabindex]):not(input):not(select):not(textarea):focus-visible {
  outline: 3px solid #d7263d;
  outline-offset: 2px;
}

#root :is(input[type="checkbox"], input[type="radio"]):focus-visible {
  outline: 3px solid #d7263d;
  outline-offset: 2px;
}