/* i18n-template-managed — refreshed by rebuild-all.sh; delete this line to hand-tune */
/* ============================================================
   Language switcher + layout tolerances for translated pages.
   Loaded only under /es/ /pt/ /ar/ /ru/ /de/ /ja/ /ko/.

   These microsites do not share one design system, so every
   value below reads a site token with its own fallback:
   var(--line, #e2e7ec) styles correctly whether or not the
   site defines --line. Nothing here depends on a token
   existing.
   ============================================================ */

.langsw { position: relative; display: inline-flex; }

.langsw__btn {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .2em .5em;
  border: 0;
  border-radius: var(--r-sm, var(--r, 4px));
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.5;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.langsw__btn svg { width: 1em; height: 1em; flex: none; }
.langsw__btn:hover,
.langsw__btn:focus-visible { color: #fff; background: rgba(255, 255, 255, .12); }

.langsw__menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 200;
  min-width: 10rem;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  text-align: left;
  background: var(--paper, var(--white, #fff));
  border: 1px solid var(--c-line, var(--line, #e2e7ec));
  border-radius: var(--r-md, var(--r, 4px));
  box-shadow: 0 14px 38px rgba(13, 18, 25, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .2s, transform .2s, visibility 0s linear .2s;
}
.langsw:hover .langsw__menu,
.langsw:focus-within .langsw__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}
.langsw__menu li { margin: 0; list-style: none; }
.langsw__menu a {
  display: block;
  padding: .45em 1em;
  color: var(--c-text, var(--ink, #172130));
  font-size: .9rem;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
.langsw__menu a:hover,
.langsw__menu a:focus-visible {
  background: var(--c-bg-alt, var(--bg, #f5f7f9));
  color: var(--c-accent, var(--blue, #1d57a6));
}
.langsw__menu a[aria-current="true"] {
  font-weight: 700;
  color: var(--c-accent, var(--blue, #1d57a6));
}

/* Some topbars hide everything after the first item on small
   screens; the switcher is the exception to that. */
.topbar__list li.langsw-item,
.topbar-list li.langsw-item { display: block; }

/* --- long translated labels ---------------------------------
   "Request A Quote" becomes "Angebot anfordern" / "Запросить
   коммерческое предложение". Let the header wrap rather than
   overflow, and stop long compounds punching out of cards. */
.topbar .wrap, .topbar__in, .topbar-c { flex-wrap: wrap; row-gap: 6px; }

h1, h2, h3, .btn, .nav a, .mega a, td, th, li, p, figcaption {
  overflow-wrap: break-word;
}

/* CJK reads better with looser leading and no letter-spacing. */
:lang(ja) body, :lang(ko) body { line-height: 1.85; }
:lang(ja) h1, :lang(ja) h2, :lang(ko) h1, :lang(ko) h2 { line-height: 1.35; }
:lang(ja) .btn, :lang(ko) .btn { letter-spacing: 0; }
