/*
 * Fenomics global UI guard.
 * Kept deliberately small and scoped to WPML language switchers so the full
 * product-engine frontend CSS is not loaded on unrelated site pages.
 */

/* WPML's legacy horizontal wrapper carries a border by default. Theme styles
 * can make that border visible; Fenomics keeps the language block frameless. */
.wpml-ls,
.wpml-ls-legacy-list-horizontal,
.wpml-ls-legacy-list-vertical {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* Elementor can wrap the WPML shortcode in a bordered widget container.
 * Remove only the wrapper that directly contains a WPML language switcher. */
.elementor-widget-shortcode:has(.wpml-ls) > .elementor-widget-container,
.elementor-widget-html:has(.wpml-ls) > .elementor-widget-container {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* Hover/focus may change color, background, border or shadow, but it must not
 * enlarge the language label. This also neutralizes theme-level scale rules. */
.wpml-ls a.wpml-ls-link,
.wpml-ls a.wpml-ls-link:hover,
.wpml-ls a.wpml-ls-link:focus,
.wpml-ls a.wpml-ls-link:focus-visible,
.wpml-ls a.wpml-ls-link:active {
  font-size: inherit !important;
  transform: none !important;
  scale: 1 !important;
  transition-property: color, background-color, border-color, box-shadow !important;
}

.wpml-ls a.wpml-ls-link .wpml-ls-native,
.wpml-ls a.wpml-ls-link:hover .wpml-ls-native,
.wpml-ls a.wpml-ls-link:focus .wpml-ls-native,
.wpml-ls a.wpml-ls-link:focus-visible .wpml-ls-native {
  font-size: inherit !important;
  transform: none !important;
  scale: 1 !important;
}
