/* ==========================================================================
   Cizaro – Language Switcher UI
   Matches the theme: primary #3516be, ink #111542, Montserrat, 8px radius.
   ========================================================================== */

:root {
	--cizaro-lang-primary: white;
	--cizaro-lang-ink:     #111542;
	--cizaro-lang-soft:    rgba(53, 22, 190, 0.09);
	--cizaro-lang-border:  rgba(17, 21, 66, 0.12);
}

/* --------------------------------------------------------------------------
   Flags — self-hosted subset of flag-icons 7.2.3 (MIT), one SVG per language
   in cizaro_get_languages(). Add the SVG + a line here when adding a language.
   -------------------------------------------------------------------------- */
.fi {
	position: relative;
	display: inline-block;
	width: 1.333333em;
	line-height: 1em;
	background-size: contain;
	background-position: 50%;
	background-repeat: no-repeat;
}
.fi::before { content: " "; }
.fi-us { background-image: url(../images/flags/us.svg); }
.fi-sa { background-image: url(../images/flags/sa.svg); }
.fi-fr { background-image: url(../images/flags/fr.svg); }
.fi-de { background-image: url(../images/flags/de.svg); }
.fi-es { background-image: url(../images/flags/es.svg); }
.fi-pt { background-image: url(../images/flags/pt.svg); }
.fi-in { background-image: url(../images/flags/in.svg); }
.fi-pk { background-image: url(../images/flags/pk.svg); }
.fi-il { background-image: url(../images/flags/il.svg); }
.fi-ir { background-image: url(../images/flags/ir.svg); }

/* --------------------------------------------------------------------------
   Toggle button
   -------------------------------------------------------------------------- */
.cizaro-lang-switcher {
	position: relative;
}

.cizaro-lang-toggle.btn {
	padding: 10px 12px;
	border: 1px solid var(--cizaro-lang-border);
	background-color: #fff;
	transition: all 0.25s ease-in-out;
}

.cizaro-lang-toggle.btn:hover,
.cizaro-lang-toggle.btn:focus,
.cizaro-lang-switcher.show .cizaro-lang-toggle.btn {
	border-color: var(--cizaro-lang-primary) !important;
	color: var(--cizaro-lang-primary) !important;
	background-color: var(--cizaro-lang-soft) !important;
	box-shadow: none;
}

.cizaro-lang-toggle .cizaro-lang-globe {
	font-size: 18px;
	line-height: 1;
}

.cizaro-lang-toggle .cizaro-lang-caret {
	font-size: 12px;
	transition: transform 0.25s ease-in-out;
}

.cizaro-lang-switcher.show .cizaro-lang-caret {
	transform: rotate(180deg);
}

/* Flag chip — rounded, fixed aspect so every flag aligns neatly. */
.cizaro-lang-flag,
.cizaro-lang-menu .fi {
	width: 22px;
	height: 16px;
	border-radius: 3px;
	background-size: cover;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
	flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   Dropdown menu
   -------------------------------------------------------------------------- */
.cizaro-lang-menu.dropdown-menu {
	min-width: 200px;
	padding: 8px;
	margin-top: 10px;
	border: 1px solid var(--cizaro-lang-border);
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(17, 12, 46, 0.14);
	background-color: #fff;
	z-index: 1050; /* float above hero/sticky sections */
}

.cizaro-lang-option.dropdown-item {
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	color: var(--cizaro-lang-ink);
	cursor: pointer;
	transition: all 0.2s ease-in-out;
}

.cizaro-lang-option.dropdown-item:hover,
.cizaro-lang-option.dropdown-item:focus {
	background-color: var(--cizaro-lang-soft);
	color: var(--cizaro-lang-ink);
}

/* Active language: tinted row + visible tick. */
.cizaro-lang-option.active {
	background-color: #3516be !important;
	color: var(--cizaro-lang-primary);
}

.cizaro-lang-check {
	font-size: 16px;
	opacity: 0;
	transition: opacity 0.2s ease-in-out;
}

.cizaro-lang-option.active .cizaro-lang-check {
	opacity: 1;
}

.cizaro-lang-option-name {
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Responsive — keep it compact on small screens.
   The native name hides under 576px (Bootstrap's d-none d-sm-inline);
   the globe icon hides on the smallest screens to save room.
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
	.cizaro-lang-toggle .cizaro-lang-globe {
		display: none;
	}
	.cizaro-lang-toggle.btn {
		padding: 8px 10px;
	}
	.cizaro-lang-menu.dropdown-menu {
		min-width: 180px;
	}
}

/* ==========================================================================
   Neutralise Google Translate's default chrome
   We use Google purely as the engine; its banner/tooltip/widget are hidden,
   and we undo the body offset Google adds.
   ========================================================================== */
#google_translate_element {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	height: 0 !important;
	overflow: hidden !important;
}

/* Google pushes the page down with a top banner — cancel it. */
body {
	top: 0 !important;
	position: static !important;
}

.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-icon,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover {
	display: none !important;
}

/* Remove the yellow highlight Google paints over translated text. */
.goog-text-highlight {
	background: none !important;
	box-shadow: none !important;
}

/* Hide the floating translate iframe entirely. */
.skiptranslate > iframe {
	visibility: hidden !important;
	height: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
}
