/* LFBoost i18n: anti-flash guard, language switcher, and RTL adjustments. */

/* Hide content until non-English translation is applied (set by head guard). */
html.lfb-i18n-pending body { visibility: hidden; }

/* ---------- language switcher ---------- */
#lfb-lang {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 2147483000;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
#lfb-lang .lfb-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(20, 22, 30, .82);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .35);
  transition: transform .12s ease, border-color .12s ease;
}
#lfb-lang .lfb-lang-btn:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .3); }
#lfb-lang .lfb-flag { font-size: 15px; line-height: 1; }
#lfb-lang .lfb-caret { font-size: 10px; opacity: .7; }
#lfb-lang .lfb-lang-menu {
  list-style: none;
  margin: 0;
  padding: 6px;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 168px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(18, 20, 28, .96);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5);
  backdrop-filter: blur(10px);
}
#lfb-lang .lfb-lang-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: #e8eaf0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
#lfb-lang .lfb-lang-opt:hover { background: rgba(255, 255, 255, .07); }
#lfb-lang .lfb-lang-opt.is-active { background: rgba(120, 130, 255, .18); color: #fff; }

/* RTL: keep the switcher mirrored and fix common alignment. */
html.lfb-rtl #lfb-lang { left: auto; right: 18px; }
html.lfb-rtl #lfb-lang .lfb-lang-menu { left: auto; right: 0; }
html[dir='rtl'] body { text-align: right; }
html[dir='rtl'] .lfb-keep-ltr,
html[dir='rtl'] [data-no-i18n] { direction: ltr; }
