@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;600;700&family=Noto+Sans+Bengali:wght@400;600;700&family=Noto+Sans+Devanagari:wght@400;600;700&family=Noto+Sans+Tamil:wght@400;600;700&display=swap");

html.i18n-pending body {
  visibility: hidden;
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  position: relative;
  z-index: 110;
}

@media (min-width: 961px) {
  .nav-links {
    margin-left: auto;
    order: 1;
  }

  .nav-end {
    margin-left: 10px;
    order: 2;
  }
}

/* Longer translations need a tighter header just above the phone menu. */
@media (min-width: 961px) and (max-width: 1180px) {
  .nav .nav-links {
    gap: 2px;
    flex-wrap: nowrap;
  }

  .nav .nav-links a {
    padding-inline: 8px;
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .nav .nav-links a i {
    margin-right: 4px;
  }
}

.lang-switch {
  position: relative;
}

.lang-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.lang-button i {
  font-size: 0.95rem;
  color: var(--accent);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(260px, 78vw);
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: rgba(2, 6, 23, 0.98);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
  display: none;
}

.lang-menu.is-open {
  display: grid;
  gap: 4px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.lang-option.is-selected {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.12);
}

.lang-option .lang-copy {
  display: grid;
  min-width: 0;
}

.lang-option .lang-label {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}

.lang-option .lang-sub {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.lang-radio {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.55);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.lang-option.is-selected .lang-radio {
  border-color: var(--accent);
}

.lang-option.is-selected .lang-radio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

html[lang="hi"] body,
html[lang="hi"] body *:not(i):not(.fa-icon):not(code):not(.error-code) {
  font-family: "Noto Sans Devanagari", "Noto Sans", sans-serif !important;
}

html[lang="bn"] body,
html[lang="bn"] body *:not(i):not(.fa-icon):not(code):not(.error-code) {
  font-family: "Noto Sans Bengali", "Noto Sans", sans-serif !important;
}

html[lang="ta"] body,
html[lang="ta"] body *:not(i):not(.fa-icon):not(code):not(.error-code) {
  font-family: "Noto Sans Tamil", "Noto Sans", sans-serif !important;
}

html[lang="ta"] .hero-title {
  font-size: clamp(1.45rem, 3.4vw, 2.45rem);
  line-height: 1.35;
}

html[lang="ta"] .hero-lead {
  font-size: clamp(0.9rem, 1.7vw, 0.96rem);
  line-height: 1.55;
}

html[lang="ta"] .flow-node strong {
  font-size: 0.88rem;
}

html[lang="ta"] .flow-sub,
html[lang="ta"] .flow-modes > span {
  font-size: 0.72rem;
}

html[lang="hi"] .flow-label,
html[lang="bn"] .flow-label,
html[lang="ta"] .flow-label {
  text-transform: none;
  letter-spacing: 0;
}

html[lang="hi"] code,
html[lang="bn"] code,
html[lang="ta"] code,
html[lang="hi"] .error-code,
html[lang="bn"] .error-code,
html[lang="ta"] .error-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
}
