/* CHEMSOURCE-GLOBAL-NETWORK-012 — Network Update utility bar + language selector.
   CHEMSOURCE-NETWORK-BAR-019 — recoloured from dark navy to a LIGHT CYAN strip so the bar reads clearly as part of
   the ChemSource site (not browser chrome) on dark-mode browsers (e.g. Mac Safari). Light cyan background, deep-cyan
   NETWORK UPDATE label (white text), dark-navy announcement text, dark language selector. ~48px desktop, single row.
   Sits inside the fixed .site-head above the nav (CHEMSOURCE-STICKY-NETWORK-HEADER-016). CSS/visual only — no change
   to markup, announcement CMS data, scheduling, language routing or localized URLs. */
.csnu{
  --csnu-bg:#DDF5FC;            /* light cyan strip */
  --csnu-ink:#112D3D;          /* dark-navy text (AA on light cyan) */
  --csnu-label-bg:#007BA5;     /* deep-cyan label fill */
  --csnu-label-ink:#FFFFFF;    /* white label text (AA 4.8:1 on #007BA5) */
  --csnu-accent:#007BA5;       /* deep-cyan accents: links, globe, current-lang */
  --csnu-dim:#4A6475;          /* muted navy for inactive dots/caret */
  --csnu-line:rgba(17,45,61,.16);
  background:var(--csnu-bg); color:var(--csnu-ink);
  font-family:var(--sans,system-ui,sans-serif); font-size:13px; line-height:1.2;
  border-bottom:1px solid rgba(17,45,61,.12); position:relative; z-index:60;
}
.csnu--urgent{ background:#FDECEC; }           /* urgent announcements: soft warm strip (flag-driven, rare) */
.csnu-in{ display:flex; align-items:center; gap:18px; min-height:48px; }
/* ~75% message / ~25% selector */
.csnu-msg{ flex:1 1 75%; min-width:0; display:flex; align-items:center; gap:12px; }
.csnu-lang{ flex:0 0 auto; display:flex; justify-content:flex-end; }

.csnu-slide{ display:flex; align-items:center; gap:12px; min-width:0; }
.csnu-badge{
  flex:0 0 auto; text-transform:uppercase; letter-spacing:.06em; font-weight:600; font-size:11.5px;
  color:var(--csnu-label-ink); background:var(--csnu-label-bg); border:0;
  padding:5px 11px; border-radius:999px; white-space:nowrap; line-height:1.15;
}
.csnu-badge--urgent{ color:#fff; background:#C0392B; }
.csnu-txt{ color:var(--csnu-ink); font-size:14px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
a.csnu-txt{ text-decoration:none; border-bottom:1px solid rgba(0,123,165,.5); }
a.csnu-txt:hover{ color:var(--csnu-accent); border-bottom-color:var(--csnu-accent); }

.csnu-nav{ flex:0 0 auto; display:flex; align-items:center; gap:6px; margin-left:6px; }
.csnu-ar{ background:transparent; border:1px solid var(--csnu-line); color:var(--csnu-ink); border-radius:6px;
  width:22px; height:22px; cursor:pointer; line-height:1; font-size:14px; }
.csnu-ar:hover{ border-color:var(--csnu-accent); color:var(--csnu-accent); }
.csnu-dots{ display:inline-flex; gap:5px; align-items:center; }
.csnu-dot{ width:5px; height:5px; border-radius:50%; background:var(--csnu-dim); opacity:.5; }
.csnu-dot.is-on{ background:var(--csnu-accent); opacity:1; }

/* language selector (native <details> for keyboard + screen-reader support, no JS required) */
.csnu-lg{ position:relative; }
.csnu-lg>summary{ list-style:none; cursor:pointer; display:inline-flex; align-items:center; gap:7px;
  color:var(--csnu-ink); padding:6px 10px; border:1px solid var(--csnu-line); border-radius:8px; user-select:none;
  background:rgba(255,255,255,.35); }
.csnu-lg>summary::-webkit-details-marker{ display:none; }
.csnu-lg>summary:hover,.csnu-lg[open]>summary{ border-color:var(--csnu-accent); background:rgba(255,255,255,.7); }
.csnu-lg>summary:focus-visible{ outline:2px solid var(--csnu-accent); outline-offset:2px; }
.csnu-globe{ width:16px; height:16px; color:var(--csnu-accent); }
.csnu-code{ font-weight:700; letter-spacing:.02em; font-size:12px; color:var(--csnu-ink); }
.csnu-caret{ width:14px; height:14px; color:var(--csnu-dim); transition:transform .15s; }
.csnu-lg[open] .csnu-caret{ transform:rotate(180deg); }
.csnu-menu{ position:absolute; right:0; top:calc(100% + 8px); min-width:190px; margin:0; padding:6px; list-style:none;
  background:#fff; border:1px solid rgba(17,45,61,.12); border-radius:12px;
  box-shadow:0 18px 40px rgba(17,45,61,.18); z-index:70; }
.csnu-opt{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px; text-decoration:none; color:var(--csnu-ink); }
.csnu-opt:hover{ background:rgba(0,123,165,.08); }
.csnu-opt:focus-visible{ outline:2px solid var(--csnu-accent); outline-offset:-2px; }
.csnu-opt-code{ flex:0 0 26px; font-weight:700; font-size:11px; color:var(--csnu-accent); }
.csnu-opt-name{ flex:1 1 auto; }
.csnu-opt.is-cur{ background:rgba(0,123,165,.12); }
.csnu-chk{ width:15px; height:15px; color:var(--csnu-accent); flex:0 0 auto; }

/* responsive */
@media (max-width:860px){
  .csnu-in{ gap:10px; }
  .csnu-badge{ display:none; }                 /* badge hidden on small screens; message + selector remain */
  .csnu{ font-size:12px; }
  .csnu-txt{ font-size:13px; }                 /* keep message readable without forcing excess height */
}
@media (max-width:520px){
  .csnu-opt-name{ display:none; }              /* ultra-narrow menu shows codes only */
  .csnu-menu{ min-width:120px; }
}
@media (prefers-reduced-motion:reduce){ .csnu-caret{ transition:none; } }

/* CHEMSOURCE-MULTILINGUAL-CONTENT-014 — longer ES/DE/ZH navigation labels must not overflow the header on
   mid-desktop widths. Tighten the primary-nav gaps between the desktop breakpoint and wide screens. */
@media (min-width:861px) and (max-width:1440px){
  .nav .wrap{ gap:20px; }
  .nav .links{ gap:14px; }
  .nav-r{ gap:10px; }
}
@media (min-width:861px) and (max-width:1200px){
  .nav .links{ gap:10px; }
  .nav .wrap{ gap:14px; }
}
/* the inline Search button is redundant with the Find-Products search + footer search modal; hide it on
   mid-desktop so longer translated Sign-in / Get-started labels fit without overflowing the header. */
@media (min-width:861px) and (max-width:1440px){
  .nav-r button.lk[data-sx]{ display:none; }
}

/* ============================================================================================================
   CHEMSOURCE-STICKY-NETWORK-HEADER-016 — persistent Network Update bar + coordinated sticky, compacting nav.
   The .site-head wrapper (markup in _PublicLayout) holds the bar (.csnu) directly above the nav (.nav) and is the
   SINGLE pinned header, so the Network Update bar stays visible while scrolling and the nav sits right beneath it
   (no two independently-sticky, overlapping elements). It is position:FIXED with a matching body padding-top so
   that compacting the nav reveals more content instead of REFLOWING it — i.e. no layout shift / content jump.
   CHEMSOURCE-NETWORK-BAR-019 — the bar is now ~49px (light cyan); the fixed-header offsets below were bumped +12px
   to match (bar 49 + nav 104 = 153 desktop; bar 49 + nav 72 = 121 mobile). Announcement behaviour is untouched.
   ============================================================================================================ */
.site-head{ position:fixed; top:0; left:0; right:0; z-index:60; }
/* reserve the header's full (uncompacted) height so page content starts just beneath it and never hides under it.
   bar (~49px) + nav (104px) = 153px desktop. */
body{ padding-top:153px; }
/* the nav's former standalone sticky is neutralised — the fixed container is the single pinned header. .nav .wrap
   keeps position:relative for the find-products dropdown; only the nav block itself is un-stuck. */
.site-head > .nav{ position:static; top:auto; }
.site-head > .csnu{ position:relative; z-index:2; }   /* bar layered above the translucent nav within the header */

/* smooth, subtle compaction of the MAIN NAV ONLY after scroll — driven by the existing scrollY>8 -> #nav.sc toggle
   in site.js (no new scroll listener). The bar height is unchanged; only the nav tightens. Because the header is
   fixed and body padding is constant, this reveals ~26px more content with NO reflow of the page. */
/* NB: target the DIRECT-CHILD nav row (> .wrap). The mobile menu's inner container also carries the `wrap`
   class (<nav class="wrap mn-in">), so a descendant selector would wrongly clip the open menu's height. */
.nav > .wrap{ transition:height .22s ease; }
.nav .logo-o img, .nav .logo-o svg{ transition:width .22s ease; }
.nav.sc > .wrap{ height:78px; }                            /* desktop: 104px -> 78px (comfortable tap targets kept) */
.nav.sc .logo-o img, .nav.sc .logo-o svg{ width:272px; }   /* 330 -> 272 (height:auto keeps the logo proportional) */

/* anchor jumps and in-page smooth-scroll must clear the fixed header (bar + nav). */
html{ scroll-padding-top:162px; }

@media (prefers-reduced-motion:reduce){
  .nav .wrap, .nav .logo-o img, .nav .logo-o svg{ transition:none; }
}

/* ---- mobile (≤1100px: hamburger shown, nav .wrap is 72px → header is bar 49 + nav 72 = 121px) ---- */
@media (max-width:1100px){
  body{ padding-top:121px; }
  .nav.sc > .wrap{ height:58px; }                          /* 72px -> 58px, still a comfortable tap target */
  .nav.sc .logo-o img, .nav.sc .logo-o svg{ width:168px; }
  html{ scroll-padding-top:128px; }
  /* the open mobile menu drops below the fixed bar+nav; cap its height to the remaining viewport and let it scroll
     internally so the header never exceeds the screen and there is no horizontal or off-viewport overflow. */
  .mn{ max-height:calc(100vh - 122px); max-height:calc(100dvh - 122px); }
}
