/* ===== Blocksy + WPML: make language dropdown fit the flag ===== */

/* Target only the WPML language menu item dropdown */
.ct-header [class*="menu-item-wpml-ls"] > ul.sub-menu,
.ct-header li.menu-item-wpml-ls-item > ul.sub-menu,
.ct-header li.menu-item-wpml-ls-current-language > ul.sub-menu {
  /* shrink wrap */
  width: max-content !important;
  min-width: 0 !important;

/* Remove Blocksy's wide spacing/padding on items */
.ct-header [class*="menu-item-wpml-ls"] > ul.sub-menu > li,
.ct-header li.menu-item-wpml-ls-item > ul.sub-menu > li {
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
}

/* Make each item only as wide as its flag */
.ct-header [class*="menu-item-wpml-ls"] > ul.sub-menu > li > a,
.ct-header li.menu-item-wpml-ls-item > ul.sub-menu > li > a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 6px !important;
  width: auto !important;
  background: transparent !important;
}

/* Flag size */
.ct-header [class*="menu-item-wpml-ls"] img,
.ct-header li.menu-item-wpml-ls-item img {
  width: 22px !important;
  height: auto !important;
  display: block !important;
  border-radius: 2px !important;
}

/* Subtle hover (optional) */
.ct-header [class*="menu-item-wpml-ls"] > ul.sub-menu > li > a:hover {
  background: rgba(0,0,0,.06) !important;
}