/**
 * English/Urdu toggle badge + bilingual content swap + RTL/Urdu font.
 * Tokens only — no hardcoded colors.
 */

:root {
	--qcm-urdu-font: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
}

/* Show only the active language's copy of anything bilingual. */
html:not(.qcm-lang-ur) [data-qcm-ur] {
	display: none;
}
html.qcm-lang-ur [data-qcm-en] {
	display: none;
}

/* Whole-site RTL + Urdu type once toggled, per the spec. */
html.qcm-lang-ur body {
	direction: rtl;
}
html.qcm-lang-ur .qcm-ur-text,
html.qcm-lang-ur [dir="rtl"] {
	font-family: var(--qcm-urdu-font);
	line-height: 2;
}

/* Fixed top-right toggle badge, present on every page. */
.qcm-lang-toggle {
	position: fixed;
	top: 14px;
	right: 14px;
	z-index: 99999;
	display: flex;
	background: #fff;
	border: 1px solid var(--qcm-border);
	border-radius: 999px;
	box-shadow: var(--qcm-shadow);
	padding: 3px;
	gap: 2px;
}
.qcm-lang-btn {
	appearance: none;
	border: none;
	background: transparent;
	color: var(--qcm-green);
	font-weight: 700;
	font-size: 0.8rem;
	padding: 6px 12px;
	border-radius: 999px;
	cursor: pointer;
	line-height: 1;
}
.qcm-lang-btn.is-active {
	background: var(--qcm-green);
	color: #fff;
}

@media (max-width: 480px) {
	.qcm-lang-toggle {
		top: 8px;
		right: 8px;
	}
	.qcm-lang-btn {
		padding: 5px 9px;
		font-size: 0.72rem;
	}
}
