/* ==========================================================================
   Component — Language switcher
   --------------------------------------------------------------------------
   Plain links to the SAME page in each language (ARCHITECTURE.md §3).
   One markup, two presentations:

   <ul class="lang-switch" role="list">              compact: EN FR AR
   <ul class="lang-switch lang-switch--full" …>      full: English Français العربية

   <li><a class="lang-switch__link" href="/fr/services/" hreflang="fr"
          lang="fr">
     <span class="lang-switch__code">FR</span>
     <span class="lang-switch__name">Français</span></a></li>

   Accessible name: compact = "FR Français" (visible code + native name,
   satisfying WCAG 2.5.3 Label in Name); full = "Français".
   The current language carries aria-current="true".
   WordPress: style the Polylang/WPML switcher output with these classes.
   ========================================================================== */

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
}

.lang-switch__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: var(--tap-target-min);
  min-inline-size: var(--tap-target-min);
  padding-inline: var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: var(--type-body-small-size);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.lang-switch__link:hover {
  color: var(--color-text-primary);
  text-decoration-line: underline;
}

.lang-switch__link[aria-current="true"] {
  color: var(--color-text-primary);
  text-decoration-line: underline;
  text-decoration-thickness: var(--border-width-strong);
  text-underline-offset: 0.35em;
}

/* Compact: show the code, keep the native name for assistive technology */
.lang-switch:not(.lang-switch--full) .lang-switch__name {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Full: show the native name only */
.lang-switch--full .lang-switch__code {
  display: none;
}

.lang-switch--full .lang-switch__link {
  justify-content: flex-start;
}
