/* Language switcher */
.language .language-select.active,
.language .language-select.active .language-title-dropdown {
	font-weight: 700;
}

/* Desktop top bar: the language switcher sits in the flow before the right-hand links,
   not at the theme's absolute left: 80%, which overlaps them at smaller widths and in RTL */
.i18n-top-right {
	display: flex;
	align-items: center;
	gap: 1px;
}

.desktop-header-active .header .top-bar .i18n-top-right .language-currency {
	position: static !important;
	left: auto !important;
	transform: none !important;
	margin-top: 0 !important;
}

.language .language-flag-title .fa-globe {
	margin-inline-end: 5px;
	font-size: 14px;
}

/* Built like the CONTACT / FAQ links beside it (5px padding around a 19.2px line, everything
   centred), so the text sits on exactly the same line instead of depending on rounding */
.desktop-header-active .header .top-bar .i18n-top-right .language .dropdown {
	display: flex;
	align-items: center;
	padding: 5px;
}

.desktop-header-active .header .top-bar .i18n-top-right .language .dropdown-toggle {
	display: flex;
	align-items: center;
	height: 19.2px;
	padding: 0;
	line-height: 19.2px;
}

.desktop-header-active .header .top-bar .i18n-top-right .language-flag-title {
	display: flex;
	align-items: center;
	gap: 2px;
	height: 19.2px;
	color: rgba(51, 51, 51, 1);
}

.desktop-header-active .header .top-bar .i18n-top-right .language-title {
	font-size: 12px;
	line-height: 19.2px;
	color: inherit;
}

.desktop-header-active .header .top-bar .i18n-top-right .language-flag-title .fa-globe {
	position: relative;
	top: -0.75px;
	margin: 0;
	font-size: 12px;
	line-height: 1;
	color: inherit;
}

/* The globe and the icon-font caret draw low in their boxes; lift them to the middle of the capitals */
.desktop-header-active .header .top-bar .i18n-top-right .language .dropdown::after {
	margin-inline-start: 2px;
	line-height: 1;
	top: -1.75px;
}

/* Language buttons at the top of the mobile menu */
.mobile-menu-languages {
	display: flex;
	gap: 8px;
	padding: 12px 15px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-menu-languages button {
	flex: 1;
	padding: 8px 4px;
	font-size: 14px;
	line-height: 1.6;
	color: rgba(44, 54, 64, 1);
	background: #fff;
	border: 1px solid rgba(44, 54, 64, 0.25);
	border-radius: 4px;
}

.mobile-menu-languages button.active {
	font-weight: 700;
	color: #fff;
	background: rgba(44, 54, 64, 1);
	border-color: rgba(44, 54, 64, 1);
}

/* Hindi: the theme fonts have no Devanagari glyphs */
html[lang="hi"] body,
html[lang="hi"] input,
html[lang="hi"] select,
html[lang="hi"] textarea,
html[lang="hi"] button {
	font-family: "Noto Sans Devanagari", Arial, sans-serif;
}

/* Urdu: Nastaliq needs far more vertical room than Latin text or it clips */
html[lang="ur"] body,
html[lang="ur"] h1,
html[lang="ur"] h2,
html[lang="ur"] h3,
html[lang="ur"] h4,
html[lang="ur"] h5,
html[lang="ur"] p,
html[lang="ur"] li,
html[lang="ur"] td,
html[lang="ur"] th,
html[lang="ur"] label,
html[lang="ur"] input,
html[lang="ur"] select,
html[lang="ur"] textarea,
html[lang="ur"] button,
html[lang="ur"] a:not(.fa),
html[lang="ur"] span:not(.fa) {
	font-family: "Noto Nastaliq Urdu", "Noto Naskh Arabic", Tahoma, sans-serif;
}

html[lang="ur"] body {
	line-height: 2.1;
}

html[lang="ur"] h1,
html[lang="ur"] h2,
html[lang="ur"] h3,
html[lang="ur"] .title {
	line-height: 1.9;
}

html[lang="ur"] .dropdown-menu a,
html[lang="ur"] .j-menu a,
html[lang="ur"] .btn {
	line-height: 1.9;
}

html[lang="ur"] input,
html[lang="ur"] select {
	height: auto;
	min-height: 40px;
}

/* The homepage runs slightly wider than the window. Harmless in LTR, but RTL starts from the
   other edge and shows it as a shifted page. clip, not hidden, so sticky headers keep working. */
html[dir="rtl"],
html[dir="rtl"] body {
	overflow-x: clip;
}

/* Product text that is still English keeps reading left to right inside the RTL page */
html[dir="rtl"] [dir="ltr"] {
	text-align: left;
}

/* Homepage category grid */
#custom-category-products .product-layout {
	float: inline-start;
}

/* Translated long content */
.i18n-content[dir="rtl"] {
	text-align: right;
}

.i18n-content ul {
	margin: 0 0 12px;
	padding-inline-start: 24px;
}

.i18n-content p,
.i18n-content li {
	margin-bottom: 8px;
}
