/* =========================================================================
   ParPhonix — i18n: language switcher + Persian typography
   Loaded last on every page so its overrides win the cascade.
   ========================================================================= */

.lang-switch {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 1003;
}

.lang-switch__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(197, 161, 91, 0.2);
  background: rgba(11, 14, 17, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-family: 'Rajdhani', 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.lang-switch__toggle:hover {
  border-color: #c5a15b;
  box-shadow: 0 0 15px rgba(197, 161, 91, 0.25);
}

.lang-switch__caret {
  font-size: 10px;
  opacity: .7;
}

.lang-switch__menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: rgba(11, 14, 17, 0.94);
  border: 1px solid rgba(197, 161, 91, 0.2);
  border-radius: 14px;
  padding: 6px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lang-switch__option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-family: 'Rajdhani', 'Poppins', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s ease;
}

.lang-switch__option:hover {
  background: rgba(197, 161, 91, 0.12);
}

.lang-switch__option.is-active {
  color: #c5a15b;
  font-weight: 700;
}

@media (max-width: 640px) {
  .lang-switch { bottom: 14px; right: 14px; }
  .lang-switch__toggle { padding: 7px 12px; font-size: 11px; }
}

/* ---------------------------------------------------------------------
   Persian: Orbitron/Rajdhani/Poppins/Share Tech Mono have no Arabic-script
   glyphs at all, so Persian text needs a dedicated font. Vazirmatn covers
   Persian + Latin cleanly and keeps the same weight range.
   --------------------------------------------------------------------- */
html.lang-fa body {
  font-family: 'Vazirmatn', 'Poppins', 'Segoe UI', sans-serif;
}

html.lang-fa .title,
html.lang-fa .sig-text,
html.lang-fa .page-title,
html.lang-fa .section-title,
html.lang-fa .card-title,
html.lang-fa .term-title,
html.lang-fa .globe-journey__title {
  font-family: 'Vazirmatn', 'Orbitron', sans-serif;
}

html.lang-fa .tagline,
html.lang-fa nav a,
html.lang-fa .badge,
html.lang-fa .drawer__kicker,
html.lang-fa .drawer__label,
html.lang-fa .drawer__title,
html.lang-fa .drawer__sub,
html.lang-fa .back-btn,
html.lang-fa .form-label,
html.lang-fa .submit-btn,
html.lang-fa .lang-switch__toggle,
html.lang-fa .lang-switch__option {
  font-family: 'Vazirmatn', 'Rajdhani', sans-serif;
}

html.lang-fa .telemetry-text {
  font-family: 'Vazirmatn', 'Share Tech Mono', monospace;
}

/* the drawer still slides in from the same physical corner regardless of
   language — only reading direction changes, not this HUD's layout */
html[dir="rtl"] .card-desc,
html[dir="rtl"] .feature-list li {
  text-align: right;
}
