/* Language switcher and i18n styles */

/* Language switcher */
.lang-switcher {
  position: relative;
  margin-left: 0.5rem;
}
.lang-switcher__btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.2s;
}
.lang-switcher__btn:hover {
  border-color: var(--mid);
  color: var(--light);
}
.lang-switcher__menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 180px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: 0.35rem;
}
.lang-switcher:hover .lang-switcher__menu,
.lang-switcher__btn:focus + .lang-switcher__menu {
  display: block;
}
.lang-switcher__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  color: var(--light);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.82rem;
  transition: background 0.15s;
}
.lang-switcher__item:hover {
  background: rgba(139,92,246,0.08);
}
.lang-switcher__item--active {
  color: var(--soul);
  font-weight: 600;
}
.lang-switcher__code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  width: 1.5rem;
  color: var(--muted);
}
.lang-switcher__item--active .lang-switcher__code {
  color: var(--soul);
}

/* RTL support */
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}
html[dir="rtl"] .nav__links { flex-direction: row-reverse; }
html[dir="rtl"] .nav__inner { flex-direction: row-reverse; }
html[dir="rtl"] .footer__grid { direction: rtl; }
html[dir="rtl"] .hero__eyebrow-dot { margin-left: 0.5rem; margin-right: 0; }
html[dir="rtl"] .stat-bar { direction: rtl; }
html[dir="rtl"] .feat-grid { direction: rtl; }
html[dir="rtl"] .hiw-flow { direction: rtl; }
html[dir="rtl"] .hiw-step::after {
  right: auto; left: -8px;
  border-left: none; border-right: 8px solid var(--border);
}
html[dir="rtl"] .dim-card__business { text-align: right; }
html[dir="rtl"] .flow-step::after {
  right: auto; left: -8px;
  border-left: none; border-right: 8px solid var(--border);
}
html[dir="rtl"] .dbar__label { text-align: right; }
html[dir="rtl"] .dbar__val { text-align: left; }
html[dir="rtl"] .lic-summary__col ul li::before { margin-right: 0; margin-left: 0.5rem; }
html[dir="rtl"] .legal ul { padding-left: 0; padding-right: 1.25rem; }
html[dir="rtl"] .timeline__item { flex-direction: row-reverse; }
html[dir="rtl"] .timeline__date { text-align: right; }
html[dir="rtl"] .lang-switcher__menu { right: auto; left: 0; }
html[dir="rtl"] .contact__grid { direction: rtl; }
html[dir="rtl"] .form__row { direction: rtl; }
html[dir="rtl"] .pg-layout { direction: rtl; }
html[dir="rtl"] .lm-layout { direction: rtl; }
html[dir="rtl"] .lm-sidebar { left: auto; right: 0; }

/* Mobile adjustments for language switcher */
@media (max-width: 900px) {
  .lang-switcher__menu {
    right: 0;
    left: auto;
  }
  html[dir="rtl"] .lang-switcher__menu {
    left: 0;
    right: auto;
  }
}
