/* Internationalization overrides */

/* Language switcher dropdown */
.lx-nav__lang {
  position: relative;
  flex-shrink: 0;
}

.lx-nav__end .lx-lang > summary {
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  border-radius: 999px;
}

.lx-lang {
  position: relative;
}

.lx-lang > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  user-select: none;
}

.lx-lang > summary::-webkit-details-marker { display: none; }

.lx-lang > summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.lx-lang[open] > summary::after {
  transform: rotate(-135deg) translateY(1px);
}

.lx-lang > summary:hover,
.lx-lang[open] > summary {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(110, 0, 255, 0.45);
}

.lx-lang__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 10.5rem;
  padding: 0.35rem;
  background: rgba(18, 24, 38, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.65rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 120;
}

.lx-lang__option {
  display: block;
  padding: 0.55rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  border-radius: 0.45rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.lx-lang__option:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.lx-lang__option.is-active {
  color: #fff;
  background: rgba(110, 0, 255, 0.25);
}

.lx-footer__lang {
  margin-top: 1rem;
}

.lx-footer__lang .lx-lang > summary {
  font-size: 0.8125rem;
}

/* Chinese: wider letter-spacing in navigation */
html[lang="zh-CN"] .lx-nav__links a,
html[lang="zh-CN"] .lx-nav__dropdown a,
html[lang="zh-CN"] .lx-lang__option {
  letter-spacing: 0.08em;
}

html[lang="zh-CN"] .lx-wordmark {
  letter-spacing: 0.12em;
}

/* Russian: more button padding */
html[lang="ru"] .lx-nav__cta,
html[lang="ru"] .lx-btn,
html[lang="ru"] .cta-chrome,
html[lang="ru"] .btn-frost,
html[lang="ru"] .lx-fab {
  padding-left: 1.35rem;
  padding-right: 1.35rem;
}

html[lang="ru"] .lx-btn--large {
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Arabic RTL layout */
html[lang="ar"] {
  direction: rtl;
}

html[lang="ar"] body {
  text-align: right;
}

html[lang="ar"] .lx-nav {
  direction: rtl;
}

@media (min-width: 1024px) {
  html[lang="ar"] .lx-nav__logo {
    grid-column: 1;
    justify-self: end;
  }

  html[lang="ar"] .lx-nav__links {
    grid-column: 2;
    justify-self: center;
  }

  html[lang="ar"] .lx-nav__end {
    grid-column: 3;
    justify-self: start;
  }
}
html[lang="ar"] .lx-footer__inner,
html[lang="ar"] .lx-footer__cols,
html[lang="ar"] .cp-hero__inner,
html[lang="ar"] .smedia-halo,
html[lang="ar"] .lx-flow__grid {
  direction: rtl;
}

html[lang="ar"] .lx-lang__menu {
  right: auto;
  left: 0;
}

html[lang="ar"] .lx-nav__dropdown {
  right: auto;
  left: 0;
}

html[lang="ar"] .lx-fab {
  right: auto;
  left: 1.5rem;
}

html[lang="ar"] .lx-link::after,
html[lang="ar"] .smedia-halo__copy .lx-link {
  direction: ltr;
  display: inline-block;
}

html[lang="ar"] .sr-only:focus {
  left: auto;
  right: 1rem;
}

html[lang="ar"] .lx-wordmark,
html[lang="ar"] .splash-title {
  direction: ltr;
  unicode-bidi: isolate;
}
