/* ===== Lang Switcher Component ===== */

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

/* ─── Individual Button ─────────────────────────────────────────────────── */

.lang-btn {
  /* Reset */
  appearance: none;
  background: transparent;
  border: none;
  margin: 0;
  line-height: 1;

  cursor: pointer;
  padding: 4px 7px;
  border-radius: var(--radius-sm, 3px);
  font-family: var(--font-secondary, 'Inter', sans-serif);
  font-size: var(--font-size-xs, 0.75rem);
  font-weight: var(--font-weight-semibold, 600);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light-muted, #d9e1e7);
  transition: color var(--transition-fast, 150ms ease-in-out),
              background var(--transition-fast, 150ms ease-in-out);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ─── Active State ──────────────────────────────────────────────────────── */

.lang-btn.lang-active {
  background: var(--color-secondary, #861a22);
  color: var(--color-text-light, #ffffff);
  font-weight: var(--font-weight-bold, 700);
}

/* ─── Hover State ───────────────────────────────────────────────────────── */

.lang-btn:hover:not(.lang-active) {
  color: var(--color-text-light, #ffffff);
  background: rgba(255, 255, 255, 0.1);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--color-secondary, #861a22);
  outline-offset: 2px;
}

/* ─── Separator ─────────────────────────────────────────────────────────── */

.lang-sep {
  color: var(--color-text-light-soft, #a8c5bf);
  opacity: 0.5;
  font-size: var(--font-size-xs, 0.75rem);
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

/* ─── Mobile: Inside open nav-menu ─────────────────────────────────────── */

@media (max-width: 900px), (orientation: landscape) and (max-height: 600px) {
  /*
   * When the mobile menu is open, the lang-switcher sits as a list item
   * at the bottom of .nav-menu. The nav-menu itself is flex-column,
   * so this item gets full width automatically.
   */
  .nav-menu.active .lang-switcher-item {
    width: 100%;
    border-top: var(--divider-dark-medium, 1px solid rgba(217, 225, 231, 0.25));
    margin-top: var(--spacing-sm, 1rem);
    padding-top: var(--spacing-sm, 1rem);
    display: flex;
    justify-content: center;
  }

  .nav-menu.active .lang-switcher {
    gap: 4px;
  }

  .nav-menu.active .lang-btn {
    padding: 8px 16px;
    font-size: var(--font-size-sm, 0.875rem);
    border-radius: var(--radius-md, 8px);
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu.active .lang-btn.lang-active {
    background: var(--color-secondary, #861a22);
    color: var(--color-text-light, #ffffff);
  }

  .nav-menu.active .lang-sep {
    font-size: var(--font-size-sm, 0.875rem);
    line-height: 40px;
    opacity: 0.4;
  }
}

@media (max-width: 480px), (orientation: landscape) and (max-height: 600px) {
  .nav-menu.active .lang-btn {
    padding: 8px 20px;
    font-size: var(--font-size-base, 1rem);
    min-height: 44px;
  }
}
