/* ============================================================================
   i18n.css - the language switch in the ☰ menu, and how Persian text sits.
   File: game/static/game/css/i18n.css
   The texts themselves are in i18n.js.

   The layout (panels left and right) stays the same in both languages; only the
   text inside follows its own direction. <html lang> is "en" or "fa".
   Sections: 1. variables  2. the switch  3. Persian text
   ============================================================================ */

/* ---------- 1. Variables ---------- */
:root {
  --lang-fa-font: "Vazirmatn", "Vazir", Tahoma, "Segoe UI", sans-serif;   /* font used for Persian text */
}

/* ---------- 2. The switch (English | فارسی) ---------- */
.menu-lang {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 4px;
  font-size: 13px;
  color: var(--text-dark);
}
.menu-lang-options {
  display: inline-flex;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-pill, 999px);
  overflow: hidden;
}
.menu-lang-btn {
  padding: 5px 12px;
  border: 0;
  background: transparent;
  color: var(--text-dark);
  font: inherit;
  cursor: pointer;
}
.menu-lang-btn.active { background: var(--accent); color: #ffffff; font-weight: 700; }
.menu-lang-btn:not(.active):hover { background: var(--accent-light); }
.menu-lang-btn[lang="fa"] { font-family: var(--lang-fa-font); }

/* ---------- 3. Persian text ---------- */
html[lang="fa"] body { font-family: var(--lang-fa-font); }

/* texts that are read as a block: they read right to left */
html[lang="fa"] .menu-panel,
html[lang="fa"] .dict-status,
html[lang="fa"] .recipe-note,
html[lang="fa"] .recipe-more,
html[lang="fa"] .sidebar-empty,
html[lang="fa"] #canvas-hint,
html[lang="fa"] .toast,
html[lang="fa"] .dict-drop span,
html[lang="fa"] #sidebar-count { direction: rtl; }
html[lang="fa"] .topbar-actions .menu-item { text-align: right; }

/* the search box: the hint reads right to left, what you type goes its own way */
html[lang="fa"] #sidebar-search:placeholder-shown { direction: rtl; }

/* the language buttons keep their own order whatever the language is */
.menu-lang-options { direction: ltr; }
