@import url('https://fonts.googleapis.com/css2?family=Noto+Nastaliq+Urdu:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&family=Noto+Sans+TC:wght@300;400;500;600;700&family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

html[lang="zh-Hans-CN"] body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html[lang="zh-Hant"] body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

html[lang="ja-JP"] body {
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
}

html[lang="ko-KR"] body {
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}

html[lang="hi-IN"] body {
  font-family: "Noto Sans Devanagari", Mangal, sans-serif;
}

html[lang="ur-PK"] body {
  font-family: "Noto Nastaliq Urdu", "Noto Sans Arabic", serif;
}

html[lang="es-MX"] body {
  font-family: Arial, Helvetica, sans-serif;
}

html[lang="th-TH"] body {
  font-family: "Noto Sans Thai", Tahoma, sans-serif;
}

.language-switcher {
  position: fixed;
  right: 18px;
  top: 84px;
  z-index: 9999;
  direction: ltr;
  font-family: Arial, "Noto Sans SC", "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Devanagari", "Noto Nastaliq Urdu", "Noto Sans Thai", sans-serif;
}

.language-switcher-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.language-switcher-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  color: #fff;
  background: rgba(18, 41, 67, .97);
  box-shadow: 0 7px 22px rgba(0, 0, 0, .22);
  cursor: pointer;
}

.language-switcher.is-ready .language-switcher-toggle {
  display: inline-flex;
}

.language-switcher-toggle:hover,
.language-switcher-toggle:focus-visible,
.language-switcher.is-open .language-switcher-toggle {
  border-color: rgba(255, 255, 255, .58);
  background: #183653;
  outline: none;
}

.language-switcher-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(118, 164, 150, .4), 0 7px 22px rgba(0, 0, 0, .22);
}

.language-switcher-menu {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 336px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  background: rgba(18, 41, 67, .98);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .28);
}

.language-switcher.is-ready .language-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
}

.language-switcher-menu[hidden] {
  display: none;
}

.language-switcher a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(255, 255, 255, .78);
  line-height: 1;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.language-switcher-globe {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.language-switcher-name {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  unicode-bidi: plaintext;
  white-space: nowrap;
}

.language-switcher-chevron {
  flex: 0 0 auto;
  font-size: 10px;
  opacity: .72;
  transition: transform .2s ease;
}

.language-switcher a:hover,
.language-switcher a:focus-visible,
.language-switcher a[aria-current="page"] {
  color: #fff;
  border-color: rgba(255, 255, 255, .16);
  background: #3d6b5f;
  outline: none;
}

.language-switcher a:hover {
  transform: translateY(-1px);
}

.language-switcher a:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .75);
}

.language-switcher.is-open .language-switcher-chevron {
  transform: rotate(180deg);
}

.locale-suggestion {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(680px, calc(100vw - 36px));
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 5px;
  color: #fff;
  background: rgba(18, 41, 67, .98);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .28);
  direction: ltr;
  font-family: Arial, "Noto Sans SC", "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Devanagari", "Noto Nastaliq Urdu", "Noto Sans Thai", sans-serif;
  transform: translateX(-50%);
}

.locale-suggestion p {
  flex: 1;
  margin: 0;
  color: inherit;
  font-size: 14px;
  line-height: 1.45;
}

.locale-suggestion-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.locale-suggestion a,
.locale-suggestion button {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 3px;
  color: #fff;
  background: transparent;
  font: 600 12px/1.2 Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.locale-suggestion a {
  display: inline-flex;
  align-items: center;
  border-color: #3d6b5f;
  background: #3d6b5f;
}

.locale-suggestion a:hover,
.locale-suggestion a:focus-visible,
.locale-suggestion button:hover,
.locale-suggestion button:focus-visible {
  border-color: #fff;
  outline: 2px solid transparent;
}

@media (max-width: 620px) {
  .language-switcher {
    top: 8px;
    right: 70px;
    z-index: 1200;
  }

  .language-switcher.is-ready .language-switcher-toggle {
    min-height: 44px;
    max-width: calc(100vw - 150px);
    padding: 8px 10px;
  }

  .language-switcher.is-ready .language-switcher-menu {
    position: fixed;
    top: 60px;
    right: 10px;
    width: min(336px, calc(100vw - 20px));
  }

  .language-switcher a {
    min-height: 44px;
  }

  .locale-suggestion {
    bottom: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: calc(100vw - 24px);
    padding: 14px;
  }

  .locale-suggestion-actions {
    flex-wrap: wrap;
  }
}
