/* Language switcher, English-only notice and localised 404 for zipby.app.
   Generated pages link this from every page (capture-tool/i18n). The switcher sits at the far right of the header
   (after Log In) on desktop, and beside the menu button on phones. Selectors carry #header-outer #top because the
   theme's superfish rules (".sf-menu ul { position:absolute; top:-999em }", "#top nav ul li a { ... }") would
   otherwise reach into it. Colours come from the header itself: nav text #000, Log In #00379d, links #023fa3. */

/* The header row. The theme centres the menu on the page and lays the buttons on the right OVER a spacer as wide as
   the logo; once the buttons are wider than the logo they slide over the menu (the live English header already did
   at 1000-1024px, with Log In alone). Put the buttons in the row instead, so the menu centres in the space left. */
@media only screen and (min-width: 1000px) {
  #header-outer[data-format="centered-menu"] #top nav > .buttons { position: static; flex: none; margin-left: 24px; }
  #header-outer[data-format="centered-menu"] #top nav > .sf-menu:not(.buttons) { flex: 1 1 auto; min-width: 0; }
  #header-outer[data-format="centered-menu"] #top .logo-spacing { display: none; }
}
/* The site's own menu sizes are 16px from 1200px and 18px from 1366px; below 1200px the theme's 22px came back and
   the menu wrapped and collided. Carry 16px down to where the desktop header ends, and show the globe alone there. */
@media only screen and (min-width: 1000px) and (max-width: 1199px) {
  header#top nav ul li a { font-size: 16px; }
  #header-outer #top .zb-lang--desktop .zb-lang__code { display: none; }
  #header-outer[data-format="centered-menu"] #top nav > .buttons { margin-left: 16px; }
}

#header-outer #top .zb-lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  line-height: normal;
  font-family: Poppins, "Open Sans", Arial, sans-serif;
  letter-spacing: normal;
  text-transform: none;
}

#header-outer #top nav > ul.buttons > li.zb-lang-item {
  display: flex;
  align-items: center;
  margin-left: 14px;
  padding: 0;
}

#header-outer #top .zb-lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 50px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #c9d1de;
  border-radius: 10px;
  background: #fff;
  color: #000;
  font: 500 16px/1 Poppins, "Open Sans", Arial, sans-serif;
  cursor: pointer;
  box-shadow: none;
  transition: border-color .15s ease, background-color .15s ease;
}
#header-outer #top .zb-lang__btn:hover { border-color: #00379d; background: #f3f6fc; }
#header-outer #top .zb-lang__btn:focus { outline: none; }
#header-outer #top .zb-lang__btn:focus-visible { outline: 3px solid #023fa3; outline-offset: 2px; }
#header-outer #top .zb-lang__btn[aria-expanded="true"] { border-color: #00379d; background: #f3f6fc; }
#header-outer #top .zb-lang__btn svg { flex: none; display: block; }
#header-outer #top .zb-lang__globe { color: #00379d; }
#header-outer #top .zb-lang__chev { transition: transform .15s ease; }
#header-outer #top .zb-lang__btn[aria-expanded="true"] .zb-lang__chev { transform: rotate(180deg); }
#header-outer #top .zb-lang__code { display: inline-block; min-width: 2ch; }
/* Desktop: globe and code only - the menu needs the room, and the pair reads as a language picker on its own. */
#header-outer #top .zb-lang--desktop .zb-lang__chev { display: none; }

#header-outer #top .zb-lang .zb-lang__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 10050;
  display: block;
  width: auto;
  min-width: 224px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid #e3e7ee;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(10, 31, 60, .16);
  visibility: visible;
  opacity: 1;
  transform: none;
  /* the theme sets pointer-events:none on every list inside .sf-menu (it re-enables them for its own hover menus);
     without this the open list is visible but a mouse click goes straight through to the page behind it */
  pointer-events: auto;
}
#header-outer #top .zb-lang .zb-lang__menu[hidden] { display: none !important; }
#header-outer #top .zb-lang .zb-lang__menu > li {
  display: block;
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
#header-outer #top .zb-lang .zb-lang__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 11px 14px;
  border-radius: 8px;
  color: #000;
  background: none;
  font: 500 16px/1.3 Poppins, "Open Sans", Arial, sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
#header-outer #top .zb-lang .zb-lang__menu a::after,
#header-outer #top .zb-lang .zb-lang__menu a::before { display: none; content: none; }
#header-outer #top .zb-lang .zb-lang__menu a:hover { background: #f3f6fc; color: #00379d; }
#header-outer #top .zb-lang .zb-lang__menu a:focus { outline: none; }
#header-outer #top .zb-lang .zb-lang__menu a:focus-visible { outline: 3px solid #023fa3; outline-offset: -3px; }
#header-outer #top .zb-lang .zb-lang__menu a[aria-current="true"] { color: #00379d; font-weight: 600; }
#header-outer #top .zb-lang__check { color: #00379d; }

/* Phones: beside the menu button, smaller and borderless like the header's other icons. */
#header-outer #top .nectar-mobile-only.mobile-header .inner { display: flex; align-items: center; line-height: normal; }
/* The phone header centres its items on a 2px row at the top of the bar (the menu button sits up there); centred
   on that, the switcher hung 4px above the screen. Line it up with the middle of the logo instead. */
#header-outer #top .zb-lang--mobile { top: 17px; margin-right: 10px; }
#header-outer #top .zb-lang--mobile .zb-lang__btn {
  height: 34px;
  padding: 0 8px;
  gap: 4px;
  border-color: #dde3ec;
  border-radius: 8px;
  font-size: 14px;
}
#header-outer #top .zb-lang--mobile .zb-lang__globe { width: 18px; height: 18px; }
#header-outer #top .zb-lang--mobile .zb-lang__chev { width: 14px; height: 14px; }
#header-outer #top .zb-lang--mobile .zb-lang__menu { top: calc(100% + 10px); min-width: 210px; }
/* A bigger finger target than the 34px box shows: the invisible margin around it is part of the button. */
#header-outer #top .zb-lang--mobile .zb-lang__btn { position: relative; }
#header-outer #top .zb-lang--mobile .zb-lang__btn::after { content: ""; position: absolute; inset: -5px -4px; }

/* Long French and Spanish words in the theme's big phone headings ("Stationnement", "commerciale", "d’assistance")
   are wider than the screen. Let the browser hyphenate them; the page's lang attribute picks the dictionary. */
@media only screen and (max-width: 767px) {
  html[lang^="es"] :is(h1, h2, h3, h4, h5, h6),
  html[lang^="fr"] :is(h1, h2, h3, h4, h5, h6) { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
}
/* The Operators tiles: on phones and tablets even the English "Residential Commercial" is wider than its tile and was
   cut off ("Residentia"); longer translations ran into the next tile. Let a label break, with a hyphen if it can. */
@media only screen and (max-width: 999px) {
  .wpb_tabs_nav > li > a > span { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
}

/* A legal page shown inside a translated site: says, in the reader's language, that the document is English. */
.zb-legal-note {
  margin: 0 0 28px;
  padding: 16px 20px;
  border-left: 4px solid #00379d;
  border-radius: 8px;
  background: #f1f5fd;
  color: #1f2a37;
}
.zb-legal-note p { margin: 0; padding: 0; font-size: 17px; line-height: 1.55; }
.zb-legal-note strong { font-weight: 600; color: #0a1f3c; }
.zb-legal-note a { color: #023fa3; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  #header-outer #top .zb-lang__btn,
  #header-outer #top .zb-lang__chev { transition: none; }
}
