/* BC Language - language switcher (default: neutral text style, no flags, no dropdown) */

.bc-language-switcher {
	--bc-lang-color: #ffffff;
	--bc-lang-active-color: #d6a15c;
	--bc-lang-hover-color: #d6a15c;
	--bc-lang-font-size: 14px;
	--bc-lang-font-weight: 400;
	--bc-lang-spacing: 6px;
	display: inline-flex;
	align-items: center;
	gap: var(--bc-lang-spacing);
	font-size: var(--bc-lang-font-size);
	font-weight: var(--bc-lang-font-weight);
	line-height: 1;
	justify-content: flex-start;
}

.bc-language-switcher--align-center {
	justify-content: center;
}

.bc-language-switcher--align-right {
	justify-content: flex-end;
}

.bc-language-switcher__link {
	color: var(--bc-lang-color);
	text-decoration: none;
	padding: 2px 4px;
	border-radius: 3px;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.bc-language-switcher__link:hover {
	color: var(--bc-lang-hover-color);
	text-decoration: underline;
}

.bc-language-switcher__link:focus-visible {
	outline: 2px solid var(--bc-lang-active-color);
	outline-offset: 2px;
}

.bc-language-switcher__link.is-active {
	color: var(--bc-lang-active-color);
	font-weight: 600;
	cursor: default;
}

.bc-language-switcher__separator {
	color: var(--bc-lang-color);
	opacity: 0.5;
	user-select: none;
}

/* Optional "button" style variant, toggled via admin Appearance settings */
.bc-language-switcher--button .bc-language-switcher__link {
	border: 1px solid currentColor;
	padding: 4px 10px;
	border-radius: 4px;
}

.bc-language-switcher--button .bc-language-switcher__link.is-active {
	background-color: var(--bc-lang-active-color);
	border-color: var(--bc-lang-active-color);
	color: #fff;
}

.bc-language-switcher--button .bc-language-switcher__separator {
	display: none;
}

/* Responsive visibility toggles (admin Appearance / Elementor widget) */
@media (min-width: 1025px) {
	.bc-language-hide-desktop {
		display: none !important;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.bc-language-hide-tablet {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.bc-language-hide-mobile {
		display: none !important;
	}
}

/* ------------------------------------------------------------------ */
/* Google Translate integration                                        */
/*                                                                      */
/* The hidden mount point Google's script attaches its own (unwanted)  */
/* dropdown UI to. We keep translation functionality fully intact and  */
/* only hide the visual chrome Google injects, using stable, purely    */
/* CSS-based rules -- no JavaScript manipulation of Google's DOM.      */
/* ------------------------------------------------------------------ */

.bc-language-google-container {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* The top banner iframe Google injects when a page is translated.
   Primary selector: Google's own documented class name, unchanged for
   10+ years across every version of this widget.
   Secondary selector: match by the iframe's own src domain instead of a
   class name. This is more resilient than the class-name selector alone
   -- if Google ever renames the CSS class, the iframe still has to load
   from Google's own translate domain, since that is where the actual
   translation UI chrome is served from. None of Google's *content*
   translation (the actual translated text on the page) ever happens
   inside an iframe -- only banner/menu/tooltip UI chrome does -- so this
   is safe and does not risk hiding real translated content. */
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
iframe[src*="translate.googleapis.com"],
iframe[src*="translate.google.com"],
body > .skiptranslate,
.skiptranslate > iframe {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
}

/* Google's script pushes body down with an inline "top" offset to make
   room for the banner it just hid above. We neutralize only that "top"
   offset -- we deliberately do NOT force `position: static` here, since
   overriding a theme's own `position` value on <body> could break
   unrelated absolutely-positioned elements that rely on it. If a theme
   never sets `position` on <body> (the common case), this rule has no
   visible effect at all, since `top` does nothing without a non-static
   position -- it only matters on the sites where Google's script itself
   set `position: relative` inline, which is exactly the case we need to
   cancel out. */
body {
	top: 0 !important;
}

/* The floating Google Translate balloon/tooltip that can appear on hover. */
.goog-tooltip,
.goog-tooltip:hover,
.goog-text-highlight {
	background-color: transparent !important;
	box-shadow: none !important;
	border: none !important;
}

.goog-tooltip:hover {
	visibility: hidden !important;
}
