/*
 * NTIMA OS v13.11.4 — desktop installed member app primary navigation.
 * Scope is deliberately restricted to an installed member PWA at desktop width.
 * Mobile apps and ordinary browser tabs never receive the activation class.
 */
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .wfms-v1082-bottom-nav:not(.ntima-desktop-primary-nav){
  display:none!important;
}

/* Home: place the five existing primary links between the WTF identity and the
   notification/account controls without increasing the established header. */
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082.wfms-dashboard-view .wfms-v1082-header-row{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:clamp(12px,2vw,28px)!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-home{
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  z-index:2!important;
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  justify-self:center!important;
  width:min(100%,560px)!important;
  margin:0!important;
  padding:4px!important;
  gap:3px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:17px!important;
  background:rgba(255,255,255,.09)!important;
  box-shadow:none!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-home .wfms-v1082-bottom-link{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  min-width:0!important;
  min-height:40px!important;
  padding:6px 7px!important;
  border-radius:12px!important;
  color:rgba(255,255,255,.92)!important;
  background:transparent!important;
  font-size:9px!important;
  line-height:1.05!important;
  font-weight:760!important;
  white-space:nowrap!important;
  box-shadow:none!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-home .wfms-v1082-bottom-link::before{
  display:none!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-home .wfms-v1082-bottom-icon{
  width:19px!important;
  height:19px!important;
  flex:0 0 19px!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-home .wfms-v1082-bottom-icon svg{
  width:18px!important;
  height:18px!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-home .wfms-v1082-bottom-link.active,
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-home .wfms-v1082-bottom-link[aria-current="page"]{
  color:#fff!important;
  background:rgba(255,255,255,.20)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-home .wfms-v1082-bottom-link:hover{
  color:#fff!important;
  background:rgba(255,255,255,.15)!important;
}

/* Secondary pages keep the five primary destinations in a fixed group at
   the left of the compact header. Only the secondary destinations scroll, so
   Accueil can never be pushed outside the visible desktop app window. */
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .wfms-v1089-secondary-nav:not([hidden]){
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  box-sizing:border-box!important;
  padding-left:clamp(10px,2.2vw,24px)!important;
  padding-right:0!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .wfms-v1089-secondary-nav:not([hidden]) .wfms-v1089-secondary-track{
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
  padding-left:0!important;
  padding-right:clamp(10px,2.2vw,24px)!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-secondary{
  position:static!important;
  inset:auto!important;
  transform:none!important;
  display:flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  gap:5px!important;
  width:auto!important;
  margin:0!important;
  padding:0 10px 0 0!important;
  border:0!important;
  border-right:1px solid #dce9e2!important;
  border-radius:0!important;
  background:rgba(255,255,255,.98)!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-secondary .wfms-v1082-bottom-link{
  display:inline-flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  min-width:0!important;
  min-height:34px!important;
  padding:5px 8px!important;
  border:1px solid #dce9e2!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#173f31!important;
  font-size:9.5px!important;
  line-height:1!important;
  font-weight:760!important;
  white-space:nowrap!important;
  box-shadow:0 3px 10px rgba(15,42,31,.04)!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-secondary .wfms-v1082-bottom-link::before{
  display:none!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-secondary .wfms-v1082-bottom-icon{
  width:17px!important;
  height:17px!important;
  flex:0 0 17px!important;
  color:#087443!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-secondary .wfms-v1082-bottom-icon svg{
  width:16px!important;
  height:16px!important;
}
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-secondary .wfms-v1082-bottom-link.active,
html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-secondary .wfms-v1082-bottom-link[aria-current="page"]{
  border-color:#087443!important;
  background:#eaf7ef!important;
  color:#075d39!important;
}

/* Preserve the established header footprint. Only the menu compresses when the
   installed desktop window becomes narrower. */
@media (min-width:900px) and (max-width:1120px){
  html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-secondary{
    gap:3px!important;
    padding-right:7px!important;
  }
  html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-secondary .wfms-v1082-bottom-link{
    gap:3px!important;
    min-height:32px!important;
    padding:4px 6px!important;
    font-size:8.5px!important;
  }
  html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-secondary .wfms-v1082-bottom-icon{
    width:15px!important;
    height:15px!important;
    flex-basis:15px!important;
  }
  html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-secondary .wfms-v1082-bottom-icon svg{
    width:14px!important;
    height:14px!important;
  }
  html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082.wfms-dashboard-view .wfms-v1082-header-row{
    gap:10px!important;
  }
  html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-home{
    width:min(100%,465px)!important;
    gap:1px!important;
    padding:3px!important;
  }
  html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-home .wfms-v1082-bottom-link{
    gap:4px!important;
    min-height:38px!important;
    padding:5px 4px!important;
    font-size:8px!important;
  }
  html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-home .wfms-v1082-bottom-icon{
    width:17px!important;
    height:17px!important;
    flex-basis:17px!important;
  }
  html.ntima-member-desktop-app-header-nav body.wfms-portal-active .wfms-member-v1082 .ntima-desktop-primary-nav.is-home .wfms-v1082-bottom-icon svg{
    width:16px!important;
    height:16px!important;
  }
}

@media print{
  .ntima-desktop-primary-nav{display:none!important}
}
