/* Shrink the button to fit its content (the flag) */
#menu-lang.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  width: auto;
  padding: 4px 8px;      /* tighten this to taste */
  min-width: 0;
}

/* Make sure the flag itself has a fixed, known width */
#menu-lang .lang-sm {
  display: inline-block;
  width: 24px;           /* match your flag sprite/icon width */
  height: 16px;
}

/* Match the dropdown menu width to the button instead of Bootstrap's default min-width */
.lang-dropdown-bootstrap .dropdown-menu {
  min-width: 0;
  width: auto;
  padding: 0;
}

.lang-dropdown-bootstrap .dropdown-menu li a {
  display: block;
  padding: 4px 8px;      /* keep consistent with the button's padding */
}
