/* Translation layer (i18n.js): first-visit wait, market-only content, the language picker. */

/* First visit only, until GET /market answers (at most 2.5 s): no English flash before the market's language. */
html.i18n-wait body { visibility: hidden; }

/* US-only content (data-market-only="us") shows only once /market says market=us; content written
   for other markets (data-market-not="us") never shows there. Before /market is known neither US
   claim nor US screenshot shows. */
html:not([data-market="us"]) [data-market-only="us"] { display: none !important; }
html[data-market="us"] [data-market-not="us"] { display: none !important; }

/* Space Grotesk (Simple headings) has no Cyrillic and no ʻ (U+02BB): Russian and Uzbek headings use Inter. */
html[lang="ru"] .sx, html[lang="uz-Latn"] .sx { --sx-font-head: "Inter", system-ui, sans-serif; }

/* Language picker: a solid button with the short code, a menu of names (no outline-only controls). */
.i18n-switch { position: relative; display: inline-flex; }
.i18n-switch[hidden] { display: none; }
.i18n-switch-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 38px;
  padding: 0 10px; border-radius: 10px; border: 1px solid var(--sx-line, #dfe4ec);
  background: var(--sx-bg-2, #f2f5fa); color: var(--sx-text, #0f172a);
  font: 700 13px/1 var(--sx-font, "Inter", system-ui, sans-serif); letter-spacing: 0.04em; cursor: pointer;
}
.i18n-switch-btn:hover, .i18n-switch-btn[aria-expanded="true"] {
  background: var(--sx-blue-soft, #e8efff); border-color: var(--sx-blue, #1d4ed8); color: var(--sx-blue, #1d4ed8);
}
.i18n-switch-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 10050; margin: 0; padding: 6px; list-style: none;
  min-width: 160px; background: #fff; border: 1px solid var(--sx-line, #dfe4ec); border-radius: 12px;
  box-shadow: 0 12px 32px -8px rgba(10, 18, 32, 0.28);
}
.i18n-switch-menu[hidden] { display: none; }
.i18n-switch-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--sx-text, #0f172a); font: 500 15px var(--sx-font, "Inter", system-ui, sans-serif);
  cursor: pointer;
}
.i18n-switch-menu button:hover { background: var(--sx-bg-2, #f2f5fa); }
.i18n-switch-menu button.selected { background: var(--sx-blue, #1d4ed8); color: #fff; font-weight: 700; }
