/*!
 * Platform nav + footer chrome — unique filename (nginx caches /css/ immutable).
 *
 * Contract for every desktop navbar (landing, modules, marketing pages):
 *   - primary tabs + Login / avatar / bell / ENG on the 64px nav row
 *   - Search Elinom is a wide centred pill immediately UNDER the tabs
 *   - Capital / Wallet / Connect / Copilot keep their brand colours
 *
 * Footer: Connect With Us shares the Ireland office-card row.
 */

:root {
  --erp-desktop-search-h: 3rem;
  --erp-tab-capital: linear-gradient(90deg, #fde68a 0%, #fbbf24 42%, #f59e0b 100%);
  --erp-tab-wallet: linear-gradient(90deg, #5eead4 0%, #2dd4bf 48%, #14b8a6 100%);
  --erp-tab-connect: linear-gradient(90deg, #7dd3fc 0%, #38bdf8 48%, #0ea5e9 100%);
  --erp-tab-copilot: linear-gradient(90deg, #ddd6fe 0%, #c4b5fd 42%, #a78bfa 100%);
}

/* ── Search Elinom sits under the tab row on every desktop navbar ───── */
@media (min-width: 901px) {
  html body.erp-body {
    --erp-desktop-search-h: 3rem;
  }

  html body.erp-body #navbar.navbar,
  html body.erp-body #navbar.erp-shell-navbar,
  html body.erp-body nav.navbar.erp-shell-navbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100vw !important;
    top: 0 !important;
    overflow: visible !important;
    height: var(--erp-nav-main-h, 4rem) !important;
    max-height: var(--erp-nav-main-h, 4rem) !important;
    min-height: var(--erp-nav-main-h, 4rem) !important;
  }

  /* Landing already pads the hero for the hanging search pill. Every
     other page reserves the same 3rem so module copy is not covered. */
  html:not([data-active-module="landing"]) body.erp-body:not([data-active-module="landing"]) #navbar.navbar,
  html:not([data-active-module="landing"]) body.erp-body:not([data-active-module="landing"]) #navbar.erp-shell-navbar {
    margin-bottom: var(--erp-desktop-search-h, 3rem) !important;
  }

  html body.erp-body #navbar .container.nav-container,
  html body.erp-body #navbar .nav-container {
    order: 1 !important;
    position: relative !important;
    z-index: 8 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: var(--erp-nav-main-h, 4rem) !important;
    min-height: var(--erp-nav-main-h, 4rem) !important;
    max-height: var(--erp-nav-main-h, 4rem) !important;
    overflow: visible !important;
  }

  html body.erp-body #navbar #util-bar {
    order: 2 !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: var(--erp-desktop-search-h, 3rem) !important;
    min-height: var(--erp-desktop-search-h, 3rem) !important;
    max-height: var(--erp-desktop-search-h, 3rem) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    pointer-events: none !important;
    z-index: 6 !important;
    background-color: var(--erp-nav-chrome-bg, #070d1a) !important;
    background-image: var(--erp-nav-chrome-surface) !important;
    background-size: var(--erp-nav-chrome-size) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  }

  html body.erp-body #navbar #util-bar::before {
    content: none !important;
    display: none !important;
  }

  html body.erp-body #navbar #util-bar .util-bar-inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: var(--erp-desktop-search-h, 3rem) !important;
    min-height: var(--erp-desktop-search-h, 3rem) !important;
    max-height: var(--erp-desktop-search-h, 3rem) !important;
    margin: 0 !important;
    padding: 0 1.15rem 0 0 !important;
    gap: 12px !important;
    pointer-events: none !important;
    background: transparent !important;
    overflow: visible !important;
    position: relative !important;
  }

  html body.erp-body #navbar #util-bar .util-bar-spacer,
  html body.erp-body #navbar #util-bar .util-bar-inner > #navUserProfile {
    display: none !important;
  }

  html body.erp-body #navbar #util-bar #utilAiSearchSlot,
  html body.erp-body #navbar #util-bar .util-ai-search-slot {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    grid-column: auto !important;
    grid-row: auto !important;
    justify-self: center !important;
    width: min(42rem, calc(100% - 4rem)) !important;
    min-width: 18rem !important;
    max-width: 42rem !important;
    height: 40px !important;
    flex: none !important;
    margin: 0 !important;
    pointer-events: auto !important;
    z-index: 2 !important;
  }

  html body.erp-body #navbar #util-bar #us-trigger,
  html body.erp-body #navbar #util-bar .us-trigger,
  html body.erp-body #navbar #utilAiSearchSlot .us-trigger {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    pointer-events: auto !important;
  }

  html[data-active-module="landing"] body.erp-body #landing .erp-hero.erp-hero--command-center {
    padding-top: calc(2.4rem + var(--erp-desktop-search-h, 3rem)) !important;
  }
}

@media (min-width: 1280px) {
  html body.erp-body #navbar .container.nav-container,
  html body.erp-body #navbar .nav-container {
    padding-right: 18.5rem !important;
  }

  html body.erp-body #navbar #util-bar .util-bar-inner > .nav-auth-buttons,
  html body.erp-body #navbar #util-bar .util-bar-inner > #navUserChip,
  html body.erp-body #navbar #util-bar .util-bar-inner > #navNotifWrap,
  html body.erp-body #navbar #util-bar .util-bar-inner > .util-lang-wrap,
  html body.erp-body #navbar #util-bar .util-bar-inner > #utilLangWrapper {
    position: relative !important;
    top: calc(-1 * var(--erp-nav-main-h, 4rem)) !important;
    transform: none !important;
    grid-row: auto !important;
    grid-column: auto !important;
    align-self: center !important;
    height: var(--erp-nav-main-h, 4rem) !important;
    min-height: var(--erp-nav-main-h, 4rem) !important;
    max-height: var(--erp-nav-main-h, 4rem) !important;
    margin: 0 !important;
    pointer-events: auto !important;
    z-index: 7 !important;
  }
}

/* Expanded modules rail must not crush the full-width navbar. */
@media (min-width: 901px) {
  html body.erp-body #navbar,
  html.erp-shell-expanded body.erp-body #navbar,
  html.erp-sidebar-visible body.erp-body #navbar {
    width: 100% !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
  }
}

/* ── Brand-coloured product tabs on every navbar ─────────────────── */
html body.erp-body #navbar #navMenu > li.capital-li > a,
html body.erp-body #navbar #navMenu > li.capital-li > a *:not(.nav-chevron):not(.pp-chevron):not(.material-symbols-outlined) {
  background-image: var(--erp-tab-capital) !important;
  background-size: 100% 100% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

html body.erp-body #navbar #navMenu > li.wallet-li > a,
html body.erp-body #navbar #navMenu > li.wallet-li > a *:not(.nav-chevron):not(.pp-chevron):not(.material-symbols-outlined),
html body.erp-body #navbar #navMenu > li.wallet-li > a.wallet-nav-btn {
  background-image: var(--erp-tab-wallet) !important;
  background-size: 100% 100% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

html body.erp-body #navbar #navMenu > li.connect-li > a,
html body.erp-body #navbar #navMenu > li.connect-li > a *:not(.nav-chevron):not(.pp-chevron):not(.material-symbols-outlined) {
  background-image: var(--erp-tab-connect) !important;
  background-size: 100% 100% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

html body.erp-body #navbar #navMenu > li.copilot-li > a,
html body.erp-body #navbar #navMenu > li.copilot-li > a *:not(.nav-chevron):not(.pp-chevron):not(.material-symbols-outlined) {
  background-image: var(--erp-tab-copilot) !important;
  background-size: 100% 100% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

html body.erp-body #navbar #navMenu > li.capital-li > a .nav-chevron,
html body.erp-body #navbar #navMenu > li.capital-li > a .pp-chevron,
html body.erp-body #navbar #navMenu > li.capital-li > a .material-symbols-outlined,
html body.erp-body #navbar #navMenu > li.wallet-li > a .nav-chevron,
html body.erp-body #navbar #navMenu > li.wallet-li > a .pp-chevron,
html body.erp-body #navbar #navMenu > li.wallet-li > a .material-symbols-outlined,
html body.erp-body #navbar #navMenu > li.connect-li > a .nav-chevron,
html body.erp-body #navbar #navMenu > li.connect-li > a .pp-chevron,
html body.erp-body #navbar #navMenu > li.copilot-li > a .nav-chevron,
html body.erp-body #navbar #navMenu > li.copilot-li > a .pp-chevron,
html body.erp-body #navbar #navMenu > li.copilot-li > a .material-symbols-outlined {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
}

html body.erp-body #navbar #navMenu > li.capital-li > a .nav-chevron,
html body.erp-body #navbar #navMenu > li.capital-li > a .pp-chevron,
html body.erp-body #navbar #navMenu > li.capital-li > a .material-symbols-outlined {
  color: #fbbf24 !important;
}

html body.erp-body #navbar #navMenu > li.wallet-li > a .nav-chevron,
html body.erp-body #navbar #navMenu > li.wallet-li > a .pp-chevron,
html body.erp-body #navbar #navMenu > li.wallet-li > a .material-symbols-outlined {
  color: #2dd4bf !important;
}

html body.erp-body #navbar #navMenu > li.connect-li > a .nav-chevron,
html body.erp-body #navbar #navMenu > li.connect-li > a .pp-chevron {
  color: #38bdf8 !important;
}

html body.erp-body #navbar #navMenu > li.copilot-li > a .nav-chevron,
html body.erp-body #navbar #navMenu > li.copilot-li > a .pp-chevron,
html body.erp-body #navbar #navMenu > li.copilot-li > a .material-symbols-outlined {
  color: #c4b5fd !important;
}

/* Phone accordion: brand colour stays on the glyph. Labels use the same
   light drawer text as Insurance / Partners / About so Wallet is not a
   teal outlier. Desktop tabs keep the gradient fill above. */
@media (max-width: 1279px) {
  html body.erp-body #navbar #navMenu.mobile-open > li.capital-li > a,
  html body.erp-body #navbar #navMenu.mobile-open > li.wallet-li > a,
  html body.erp-body #navbar #navMenu.mobile-open > li.connect-li > a,
  html body.erp-body #navbar #navMenu.mobile-open > li.copilot-li > a {
    background-image: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    color: var(--erp-mnav-text, #e8edf7) !important;
    -webkit-text-fill-color: var(--erp-mnav-text, #e8edf7) !important;
  }

  html body.erp-body #navbar #navMenu.mobile-open > li.capital-li > a > i.nav-row-icon,
  html body.erp-body #navbar #navMenu.mobile-open > li.capital-li > a > i.nav-row-icon * {
    color: #fbbf24 !important;
    -webkit-text-fill-color: #fbbf24 !important;
  }

  html body.erp-body #navbar #navMenu.mobile-open > li.wallet-li > a > i.nav-row-icon,
  html body.erp-body #navbar #navMenu.mobile-open > li.wallet-li > a > i.nav-row-icon * {
    color: #2dd4bf !important;
    -webkit-text-fill-color: #2dd4bf !important;
  }

  html body.erp-body #navbar #navMenu.mobile-open > li.connect-li > a > i.nav-row-icon,
  html body.erp-body #navbar #navMenu.mobile-open > li.connect-li > a > i.nav-row-icon * {
    color: #38bdf8 !important;
    -webkit-text-fill-color: #38bdf8 !important;
  }

  html body.erp-body #navbar #navMenu.mobile-open > li.copilot-li > a > i.nav-row-icon,
  html body.erp-body #navbar #navMenu.mobile-open > li.copilot-li > a > i.nav-row-icon * {
    color: #c4b5fd !important;
    -webkit-text-fill-color: #c4b5fd !important;
  }

  /* Icon + label sit on one 32px / 14px grid so every word starts on the
     same vertical line, including Login / Create Account / ENG. */
  html body.erp-body #navbar #navMenu.mobile-open .mobile-login-pair,
  html body.erp-body #navbar #navMenu.mobile-open .mobile-util-action--signup,
  html body.erp-body #navbar #navMenu.mobile-open .mobile-lang-trigger,
  html body.erp-body #navbar #navMenu.mobile-open > li > a.nav-link {
    display: grid !important;
    grid-template-columns: 32px minmax(0, 1fr) auto !important;
    column-gap: 14px !important;
    justify-content: stretch !important;
    justify-items: start !important;
    align-items: center !important;
  }

  html body.erp-body #navbar #navMenu.mobile-open .mobile-login-pair .erp-login-orb,
  html body.erp-body #navbar #navMenu.mobile-open .mobile-login-pair .mobile-login-orb {
    --erp-login-grad: linear-gradient(
      120deg,
      #38bdf8 0%,
      #6366f1 34%,
      #f472b6 67%,
      #f59e0b 100%
    );
    background: var(--erp-login-grad) !important;
    background-image: var(--erp-login-grad) !important;
    background-color: transparent !important;
  }

  html body.erp-body #navbar #navMenu.mobile-open .mobile-login-pair .erp-login-orb::before,
  html body.erp-body #navbar #navMenu.mobile-open .mobile-login-pair .mobile-login-orb::before {
    inset: 22% !important;
  }

  html body.erp-body #navbar #navMenu.mobile-open .mobile-login-pair .erp-login-orb-label {
    display: none !important;
  }

  /* Drawer ENG globe: same 4-stop Elinom glyph as the desktop util bar.
     Font Awesome draws on ::before; clipping the host left one colour. */
  html body.erp-body #navbar #navMenu.mobile-open .mobile-lang-globe {
    color: #38bdf8 !important;
    background: none !important;
    background-image: none !important;
    -webkit-text-fill-color: transparent !important;
  }

  html body.erp-body #navbar #navMenu.mobile-open .mobile-lang-globe::before {
    background-image: linear-gradient(
      135deg,
      #38bdf8,
      #6366f1,
      #f472b6,
      #f59e0b
    ) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
  }

  /* Every accordion / locale caret is the same 16px muted expand_more.
     Brand colour stays on the left glyph only. */
  html body.erp-body #navbar #navMenu.mobile-open > li > a > .nav-row-caret,
  html body.erp-body #navbar #navMenu.mobile-open > li > a > i.nav-row-caret,
  html body.erp-body #navbar #navMenu.mobile-open > li > a > .pp-chevron,
  html body.erp-body #navbar #navMenu.mobile-open > li > a > .nav-chevron,
  html body.erp-body #navbar #navMenu.mobile-open > li > a > .material-symbols-outlined.pp-chevron,
  html body.erp-body #navbar #navMenu.mobile-open .mobile-lang-caret {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 16px !important;
    width: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    height: 16px !important;
    margin-left: auto !important;
    padding: 0 !important;
    grid-column: 3 !important;
    grid-row: 1 !important;
    font-family: "Material Symbols Outlined" !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: 16px !important;
    line-height: 1 !important;
    color: var(--erp-mnav-muted, #93a1bd) !important;
    -webkit-text-fill-color: var(--erp-mnav-muted, #93a1bd) !important;
    background: none !important;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20 !important;
  }

  html body.erp-body #navbar #navMenu.mobile-open > li > a > i.nav-row-caret::before,
  html body.erp-body #navbar #navMenu.mobile-open i.mobile-lang-caret::before {
    font-family: "Material Symbols Outlined" !important;
    font-weight: 400 !important;
    content: "expand_more" !important;
    font-size: 16px !important;
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
  }
}

/* ── Footer: Connect With Us shares the Ireland office row ─────────── */
@media (min-width: 1100px) {
  html body.erp-body footer.elinom-footer .footer-content.footer-content--design,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content.footer-content--design {
    display: grid !important;
    align-items: stretch !important;
    grid-template-rows: auto auto auto auto auto !important;
    row-gap: 0.7rem !important;
  }

  html body.erp-body footer.elinom-footer .footer-content.footer-content--design > .footer-section,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content.footer-content--design > .footer-section {
    grid-row: 1 / -1 !important;
  }

  html body.erp-body footer.elinom-footer .footer-content.footer-content--design > .footer-section.footer-col-offices,
  html body.erp-body footer.elinom-footer .footer-content.footer-content--design > .footer-section.footer-col-certs-social,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content.footer-content--design > .footer-section.footer-col-offices,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content.footer-content--design > .footer-section.footer-col-certs-social {
    display: grid !important;
    grid-template-rows: subgrid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-row: 1 / -1 !important;
    align-items: start !important;
    height: auto !important;
    min-height: 0 !important;
    transform: none !important;
  }

  html body.erp-body footer.elinom-footer .footer-col-offices > h4,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-col-offices > h4,
  html body.erp-body footer.elinom-footer .footer-col-certs-social > h4:first-child,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-col-certs-social > h4:first-child {
    grid-row: 1 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  html body.erp-body footer.elinom-footer .footer-col-offices > .footer-contact-emails,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-col-offices > .footer-contact-emails {
    grid-row: 2 !important;
    margin-bottom: 0 !important;
  }

  html body.erp-body footer.elinom-footer .footer-col-offices .footer-offices,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-col-offices .footer-offices {
    display: contents !important;
  }

  html body.erp-body footer.elinom-footer .footer-office-card:has(.office-flag--us),
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-office-card:has(.office-flag--us) {
    grid-row: 3 !important;
  }

  html body.erp-body footer.elinom-footer .footer-office-card:has(.office-flag--gb),
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-office-card:has(.office-flag--gb) {
    grid-row: 4 !important;
  }

  html body.erp-body footer.elinom-footer .footer-office-card--ie,
  html body.erp-body footer.elinom-footer .footer-office-card:has(.office-flag--ie),
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-office-card--ie,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-office-card:has(.office-flag--ie) {
    grid-row: 5 !important;
    margin-top: 0 !important;
    align-self: start !important;
  }

  html body.erp-body footer.elinom-footer .footer-col-certs-social .footer-cert.footer-cert--column,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-col-certs-social .footer-cert.footer-cert--column {
    grid-row: 2 / 5 !important;
    align-self: stretch !important;
    margin-top: 0 !important;
  }

  html body.erp-body footer.elinom-footer .footer-connect,
  html body.erp-body footer.elinom-footer .footer-social-lockup,
  html body.erp-body footer.elinom-footer .footer-col-certs-social .footer-social-lockup,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-connect,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-col-certs-social .footer-social-lockup {
    grid-row: 5 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    transform: none !important;
    min-height: 0 !important;
    height: auto !important;
    align-self: start !important;
    justify-content: flex-start !important;
  }

  html body.erp-body footer.elinom-footer .footer-connect h4,
  html body.erp-body footer.elinom-footer .footer-social-heading,
  html body.erp-body footer.elinom-footer .footer-col-certs-social .footer-social-heading,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-connect h4,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-col-certs-social .footer-social-heading,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-section h4.lp-is-02a008fb {
    margin-top: 0 !important;
    margin-bottom: 0.55rem !important;
  }
}

/* Live modules: keep Search Elinom in normal flow. The hanging
   position:absolute + margin-bottom:3rem reservation becomes a white
   strip under the pill when the sticky navbar and parent page scroll. */
@media (min-width: 901px) {
  html[data-active-module]:not([data-active-module="landing"]) body.erp-body #navbar.navbar,
  html[data-active-module]:not([data-active-module="landing"]) body.erp-body #navbar.erp-shell-navbar,
  html[data-active-shell-mode="module"] body.erp-body #navbar.navbar,
  html[data-active-shell-mode="module"] body.erp-body #navbar.erp-shell-navbar,
  html[data-active-shell-mode="app"] body.erp-body #navbar.navbar,
  html[data-active-shell-mode="app"] body.erp-body #navbar.erp-shell-navbar,
  html:has(.module-section.active:not(#landing)) body.erp-body #navbar.navbar,
  html:has(.module-section.active:not(#landing)) body.erp-body #navbar.erp-shell-navbar {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    margin-bottom: 0 !important;
  }

  html[data-active-module]:not([data-active-module="landing"]) body.erp-body #navbar #util-bar,
  html[data-active-shell-mode="module"] body.erp-body #navbar #util-bar,
  html[data-active-shell-mode="app"] body.erp-body #navbar #util-bar,
  html:has(.module-section.active:not(#landing)) body.erp-body #navbar #util-bar {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    min-height: var(--erp-desktop-search-h, 3rem) !important;
    max-height: none !important;
    pointer-events: auto !important;
    margin: 0 !important;
  }
}
