/* ==========================================================================
   Language switcher (inc/extra/language.php, assets/js/lang.js)
   MOBILE FIRST: base rules target phones; layers at 600 / 782 / 1024 / 1200px.
   1. Google Translate chrome, hidden
   2. Indic font stacks + Urdu RTL (only while <html data-aa-lang> is set)
   3. Header globe button + popover
   4. Drawer chip row
   5. Top bar link
   6. Machine-translation notice
   ========================================================================== */

/* ---------- 1. Google's own UI: banner, iframes, tooltip, highlight, body offset ---------- */
html.aa-tr body,
html:is(.translated-ltr, .translated-rtl) body { top: 0 !important; position: static !important; min-height: 0 !important; }
body > .skiptranslate,
.goog-te-banner-frame,
iframe.skiptranslate,
iframe.goog-te-menu-frame,
.goog-te-menu-frame,
.goog-te-balloon-frame,
.goog-te-spinner-pos,
.goog-tooltip,
#goog-gt-tt,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-xl07Ob-OEVmcd,
.VIpgJd-ZVi9od-l4eHX-hSRGPd,
.VIpgJd-yAWNEb-L7lbkb { display: none !important; visibility: hidden !important; }
.goog-text-highlight,
.VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q { background: none !important; box-shadow: none !important; }
/* Google wraps translated text in <font>: keep the surrounding type, and drop letter-spacing that breaks Indic shaping. */
html:is(.translated-ltr, .translated-rtl) font { color: inherit; font: inherit; letter-spacing: normal; background: none !important; box-shadow: none !important; }
/* Google drops the space next to an untranslated link inside a sentence ("...करेंगे?+91 ..."). */
html:is(.translated-ltr, .translated-rtl) :is(p, li, small, label) > a.notranslate:is([href^="tel:"], [href^="mailto:"]) { margin-inline: 0.25em; }
/* The hidden element Google mounts its language list into. */
#aa-gt-host,
.aa-gt { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- 2. Indic and Urdu type ---------- */
/* Lora and Poppins have no Indic glyphs: the browser falls back per character to the script font
   (Noto web font for the active script, then the OS font). Latin text such as the brand keeps Lora/Poppins. */
:root {
	--aa-indic-all: "Nirmala UI", "Noto Sans Devanagari", "Noto Sans Gujarati", "Noto Sans Bengali", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Kannada", "Noto Sans Malayalam", "Noto Sans Gurmukhi", "Noto Sans Oriya", "Noto Naskh Arabic", "Kohinoor Devanagari", "Devanagari Sangam MN", Mangal, "Segoe UI", sans-serif;
}
html[data-aa-lang="hi"],
html[data-aa-lang="mr"] { --aa-indic: "Noto Sans Devanagari", "Nirmala UI", Mangal, "Kohinoor Devanagari", "Devanagari Sangam MN"; }
html[data-aa-lang="gu"] { --aa-indic: "Noto Sans Gujarati", "Nirmala UI", Shruti, "Gujarati Sangam MN"; }
html[data-aa-lang="bn"] { --aa-indic: "Noto Sans Bengali", "Nirmala UI", Vrinda, "Kohinoor Bangla", "Bangla Sangam MN"; }
html[data-aa-lang="ta"] { --aa-indic: "Noto Sans Tamil", "Nirmala UI", Latha, "Tamil Sangam MN"; }
html[data-aa-lang="te"] { --aa-indic: "Noto Sans Telugu", "Nirmala UI", Gautami, "Kohinoor Telugu", "Telugu Sangam MN"; }
html[data-aa-lang="kn"] { --aa-indic: "Noto Sans Kannada", "Nirmala UI", Tunga, "Kannada Sangam MN"; }
html[data-aa-lang="ml"] { --aa-indic: "Noto Sans Malayalam", "Nirmala UI", Kartika, "Malayalam Sangam MN"; }
html[data-aa-lang="pa"] { --aa-indic: "Noto Sans Gurmukhi", "Nirmala UI", Raavi, "Gurmukhi Sangam MN"; }
html[data-aa-lang="or"] { --aa-indic: "Noto Sans Oriya", "Nirmala UI", Kalinga, "Oriya Sangam MN"; }
html[data-aa-lang="ur"] { --aa-indic: "Noto Naskh Arabic", "Urdu Typesetting", "Segoe UI", "Geeza Pro", Tahoma; }

html[data-aa-lang] {
	--wp--preset--font-family--poppins: Poppins, var(--aa-indic), ui-sans-serif, system-ui, sans-serif;
	--wp--preset--font-family--lora: Lora, var(--aa-indic), Georgia, serif;
	--aa-sans: var(--wp--preset--font-family--poppins);
	--aa-serif: var(--wp--preset--font-family--lora);
}
/* Matras and descenders need more room than Latin headings. */
html[data-aa-lang] :is(h1, h2, h3, h4, .wp-block-heading) { line-height: 1.4; }
html[data-aa-lang] :is(p, li, dd, label) { line-height: 1.8; }

/* Urdu: content reads right to left; header and drawer chrome stay as built so the menus keep working. */
html.aa-rtl :is(main, footer) { direction: rtl; }
html.aa-rtl :is(main, footer) :is(.notranslate, [translate="no"], input[type="tel"], input[type="email"]) { direction: ltr; unicode-bidi: isolate; }
html.aa-rtl :is(main, footer) :is(input[type="tel"], input[type="email"]) { text-align: left; }
html[data-aa-lang="ur"] :is(p, li, dd, label) { line-height: 2; }

/* Native names in the switcher on English pages: system fonts only, no download. */
.aa-lang__native { font-family: Poppins, var(--aa-indic-all); }

/* ---------- Shared ---------- */
.aa-lang .screen-reader-text,
.aa-lang-row .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- 3. Header globe button + popover ---------- */
.aa-lang { display: none; }

.aa-lang__btn {
	display: inline-flex;
	align-items: center;
	position: relative;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--aa-line);
	border-radius: 999px;
	background: #fff;
	color: var(--aa-indigo);
	font-family: var(--aa-sans);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.aa-lang__btn .aa-icon { width: 20px; height: 20px; }
.aa-lang__btn:hover,
.aa-lang.is-open .aa-lang__btn { border-color: var(--aa-indigo); }
.aa-lang.is-open .aa-lang__btn { background: var(--aa-indigo); color: #fff; }
/* Current language code as a small badge on the globe. */
.aa-lang__code {
	position: absolute;
	right: -5px;
	bottom: -3px;
	padding: 1px 4px;
	border: 1.5px solid #fff;
	border-radius: 999px;
	background: var(--aa-red);
	color: #fff;
	font-size: 0.5625rem;
	line-height: 1.3;
	letter-spacing: 0.04em;
	text-align: center;
}

.aa-lang__pop {
	position: fixed;
	z-index: 80;
	top: 80px;
	right: 16px;
	box-sizing: border-box;
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 100px);
	max-height: calc(100dvh - 100px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 1.25rem;
	border: 1px solid var(--aa-line);
	border-top: 3px solid var(--aa-indigo);
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 30px 60px -30px rgb(45 38 80 / 0.45), 0 2px 6px rgb(28 31 42 / 0.06);
	color: var(--aa-slate);
	font-family: var(--aa-sans);
	animation: aa-lang-in 0.28s var(--aa-ease) both;
}
.aa-lang__pop[hidden] { display: none; }

.aa-lang__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.aa-lang__eyebrow span { letter-spacing: normal; font-family: Poppins, var(--aa-indic-all); }
.aa-lang__eyebrow { margin: 0; color: var(--aa-red); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; }
.aa-lang__title { margin: 0.35rem 0 0; color: var(--aa-indigo); font-family: var(--aa-serif); font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.aa-lang__close {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	margin: -0.4rem -0.4rem 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--aa-indigo);
	cursor: pointer;
}
.aa-lang__close:hover { background: var(--aa-lavender); }
.aa-lang__close .aa-icon { width: 20px; height: 20px; }

.aa-lang__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.aa-lang__card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 0.15rem;
	box-sizing: border-box;
	width: 100%;
	min-height: 64px;
	padding: 0.65rem 2.2rem 0.65rem 0.9rem;
	border: 1px solid var(--aa-line);
	border-radius: 3px;
	background: var(--aa-ivory);
	color: var(--aa-ink);
	text-align: left;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--aa-ease);
}
.aa-lang__card:hover { border-color: var(--aa-indigo); background: #fff; }
.aa-lang__card .aa-lang__native { font-size: 1.125rem; font-weight: 600; line-height: 1.35; color: var(--aa-indigo); }
.aa-lang__en { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em; color: var(--aa-muted); }
.aa-lang__tick {
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--aa-red);
	color: #fff;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 0.2s, transform 0.25s var(--aa-ease);
}
.aa-lang__tick .aa-icon { width: 14px; height: 14px; }
.aa-lang__card[aria-pressed="true"] { border-color: var(--aa-indigo); background: var(--aa-lavender); box-shadow: inset 0 3px 0 var(--aa-indigo); }
.aa-lang__card[aria-pressed="true"] .aa-lang__tick { opacity: 1; transform: none; }
.aa-lang__note { margin: 1rem 0 0; padding-top: 0.85rem; border-top: 1px solid var(--aa-line); color: var(--aa-muted); font-size: 0.75rem; line-height: 1.5; }

@keyframes aa-lang-in { from { opacity: 0; transform: translate3d(0, -6px, 0); } }

/* ---------- 4. Drawer chip row (phones and tablets) ---------- */
.aa-lang-row { margin: 0 0 1.25rem; }
.aa-lang-row__label {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0 0 0.6rem;
	color: var(--aa-muted);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}
.aa-lang-row__label .aa-icon { width: 16px; height: 16px; color: var(--aa-red); }
.aa-lang-row__chips {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	margin: 0 calc(-1 * clamp(1.25rem, 4vw, 2rem));
	padding: 0.1rem clamp(1.25rem, 4vw, 2rem) 0.4rem;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scroll-padding-inline: clamp(1.25rem, 4vw, 2rem);
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.aa-lang-row__chips::-webkit-scrollbar { display: none; }
.aa-lang-row__chips li { flex: none; scroll-snap-align: start; }
.aa-lang-chip {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 72px;
	min-height: 52px;
	padding: 0.35rem 0.9rem;
	border: 1px solid var(--aa-line);
	border-radius: 999px;
	background: #fff;
	color: var(--aa-indigo);
	line-height: 1.25;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.aa-lang-chip .aa-lang__native { font-size: 1rem; font-weight: 600; }
.aa-lang-chip small { font-size: 0.6875rem; color: var(--aa-muted); font-weight: 500; }
.aa-lang-chip[aria-pressed="true"] { background: var(--aa-indigo); border-color: var(--aa-indigo); color: #fff; }
.aa-lang-chip[aria-pressed="true"] small { color: var(--aa-on-dark); }

/* ---------- 5. Top bar ---------- */
.aa-topbar__lang { display: inline-flex; align-items: center; gap: 0.35rem; }
.aa-lang-top {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	/* 44px tap target without growing the 40px bar. */
	min-height: 44px;
	margin-block: -2px;
	padding: 0 0.15rem;
	border: 0;
	background: none;
	color: var(--aa-on-dark);
	font: inherit;
	font-size: 0.8125rem;
	cursor: pointer;
}
.aa-lang-top:hover { color: #fff; }
.aa-lang-top .aa-icon { width: 15px; height: 15px; color: #E06A6A; }
.aa-lang-top__caret { font-size: 0.65rem; opacity: 0.8; }
.aa-lang-top__sep { color: var(--aa-on-dark-muted); opacity: 0.6; }
.aa-lang-top--quick { font-family: Poppins, var(--aa-indic-all); font-weight: 600; }

/* ---------- 6. Machine-translation notice ---------- */
.aa-lang-notice {
	position: fixed;
	z-index: 70;
	left: 12px;
	right: 12px;
	bottom: calc(var(--aa-bar-h, 64px) + 12px + env(safe-area-inset-bottom));
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	box-sizing: border-box;
	padding: 0.6rem 0.25rem 0.5rem 0.85rem;
	border-left: 3px solid var(--aa-red);
	border-radius: 4px;
	background: var(--aa-indigo);
	box-shadow: 0 24px 48px -24px rgb(28 31 42 / 0.6);
	color: #fff;
	font-family: var(--aa-sans);
	font-size: 0.75rem;
	line-height: 1.45;
	animation: aa-lang-up 0.4s var(--aa-ease) both;
}
.aa-lang-notice__icon {
	flex: none;
	width: 8px;
	height: 8px;
	margin-top: 0.45rem;
	border-radius: 50%;
	background: #FF8A8A;
}
.aa-lang-notice__body { flex: 1 1 auto; min-width: 0; }
.aa-lang-notice p { margin: 0; }
.aa-lang-notice__native { font-family: Poppins, var(--aa-indic-all); font-weight: 500; line-height: 1.6; }
.aa-lang-notice__en { margin-top: 0.2rem !important; color: var(--aa-on-dark); font-size: 0.6875rem; }
.aa-lang-notice__view {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.15rem 0.5rem;
	min-height: 44px;
	color: #fff;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: #FF8A8A;
	text-underline-offset: 3px;
}
.aa-lang-notice__view span[lang] { font-family: Poppins, var(--aa-indic-all); }
.aa-lang-notice__close {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	margin-top: -0.5rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--aa-on-dark);
	cursor: pointer;
}
.aa-lang-notice__close:hover { background: rgb(255 255 255 / 0.1); color: #fff; }
.aa-lang-notice :focus-visible { outline-color: #FF8A8A; }

@keyframes aa-lang-up { from { opacity: 0; transform: translate3d(0, 10px, 0); } }

@media (prefers-reduced-motion: reduce) {
	.aa-lang__pop,
	.aa-lang-notice { animation: none; }
}

/* ---------- Breakpoints ---------- */
@media (min-width: 600px) {
	.aa-lang__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.aa-lang-notice { left: auto; right: 16px; width: 420px; padding: 0.85rem 0.4rem 0.6rem 1rem; font-size: 0.8125rem; line-height: 1.5; }
	.aa-lang-notice__en { margin-top: 0.3rem !important; font-size: 0.75rem; }
}

@media (min-width: 782px) {
	.aa-lang__pop { padding: 1.5rem; }
}

@media (min-width: 1024px) {
	/* The header tools wrapper only shows from 1024px (home.css); below that the drawer row carries the switch. */
	.aa-lang { display: block; flex: none; }
	/* The globe takes 52px of a tight row: keep the call number on one line instead of wrapping in its pill. */
	.aa-header__call-num { white-space: nowrap; }
	/* The drawer is phones and tablets only. */
	.aa-lang-row { display: none; }
	.aa-lang-notice { left: 24px; right: auto; bottom: 24px; }
}

@media (min-width: 1200px) {
	.aa-lang__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.aa-lang__pop { width: min(680px, calc(100vw - 32px)); }
}

/* ==========================================================================
   7. Typography for Indian scripts (only while a non-English language is active).
   Lora/Poppins are Latin-only, so translated text renders in the script font:
   no synthetic italics, calmer weights, no tiny letter-spaced caps.
   ========================================================================== */

/* Indian scripts have no italic: browsers fake a slant. Keep the red emphasis, drop the slant. */
html[data-aa-lang] :is(em, i, cite, .aa-svc-hero__title em, h1 em, h2 em, h3 em),
html[data-aa-lang] :is(.aa-head__sub, .sub, .aa-svc-hero__sub, .aa-quote p, blockquote, .wp-block-quote) {
	font-style: normal;
}
html[data-aa-lang] :is(h1, h2, h3) em { font-weight: inherit; }

/* Script fonts' bold is heavy; 600 reads closer to the Lora headings. */
html[data-aa-lang] :is(h1, h2, .wp-block-heading, .aa-svc-hero__title) { font-weight: 600; letter-spacing: 0; }
html[data-aa-lang] h1 { word-break: normal; overflow-wrap: break-word; }

/* Small uppercase labels were sized for spaced Latin caps: give script text a readable size. */
html[data-aa-lang] :is(.aa-eyebrow, .aa-kicker, .aa-bro-card__kicker, .aa-mega__label, .aa-mega__feature-eyebrow, .aa-footer__label, .aa-drawer__label, .aa-tag, .aa-topbar__tag, .aa-proof__label) {
	font-size: 0.875rem;
	letter-spacing: 0;
	text-transform: none;
	font-weight: 600;
}
html[data-aa-lang] :is(.aa-btn, .wp-block-button__link, .aa-form__submit, .aa-actionbar__btn, .aa-bro-card__get, .aa-mega__feature-cta, .aa-bro-hub__morebtn, .aa-form__download) {
	letter-spacing: 0;
	text-transform: none;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
}
/* Menu triggers and drawer links: slightly larger so matras stay crisp. */
html[data-aa-lang] :is(.aa-mega__trigger, .aa-drawer__acc > summary, .aa-mega__link strong) { font-size: 1.0625rem; }
html[data-aa-lang] :is(.aa-mega__link small, .aa-drawer__txt small, .aa-field__hint, .aa-form__note) { font-size: 0.8125rem; line-height: 1.5; }
/* Labels and placeholders: no cramped lines. */
html[data-aa-lang] :is(label, .aa-field label) { line-height: 1.5; }
html[data-aa-lang] ::placeholder { line-height: 1.4; }

/* ---------- Notice: slim and out of the way ---------- */
.aa-lang-notice__native { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1023px) {
	/* Phones/tablets: one compact strip above the action bar; the bilingual "View in English" link stays. */
	.aa-lang-notice { align-items: center; padding: 0.35rem 0.15rem 0.35rem 0.75rem; font-size: 0.75rem; }
	.aa-lang-notice__en { display: none; }
	.aa-lang-notice__icon { margin-top: 0; }
	.aa-lang-notice__view { min-height: 44px; margin-block: -4px; } /* full tap target, same strip height */
	.aa-lang-notice__close { margin-top: 0; }
}
@media (min-width: 1024px) {
	.aa-lang-notice { width: 380px; padding: 0.6rem 0.3rem 0.5rem 0.9rem; font-size: 0.75rem; }
	.aa-lang-notice__en { font-size: 0.6875rem; }
}

/* ---------- Translated header: longer labels than English ---------- */
/* Phones: the sticky action bar already offers Call, so the header keeps brand, search and menu. */
@media (max-width: 599px) {
	html[data-aa-lang] .aa-header__inner .aa-header__call { display: none; }
}
/* Desktop: translated menu labels are up to twice as long. Scripts with long words use the
   menu drawer at every width; Hindi and Marathi keep the mega menu from 1200px. */
@media (min-width: 1024px) {
	html[data-aa-lang]:not([data-aa-lang="hi"]):not([data-aa-lang="mr"]) .aa-mega { display: none; }
	html[data-aa-lang]:not([data-aa-lang="hi"]):not([data-aa-lang="mr"]) .aa-burger { display: inline-grid; }
	html[data-aa-lang] .aa-header__cta .wp-block-button__link { max-width: 12.5rem; white-space: normal; text-align: center; line-height: 1.25; }
	html[data-aa-lang] .aa-header__call-num { display: none; }
	html[data-aa-lang] .aa-header .aa-header__call { width: 44px; padding: 0; border-radius: 50%; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
	html[data-aa-lang]:is([data-aa-lang="hi"], [data-aa-lang="mr"]) .aa-mega { display: none; }
	html[data-aa-lang]:is([data-aa-lang="hi"], [data-aa-lang="mr"]) .aa-burger { display: inline-grid; }
}

/* ==========================================================================
   8. Alignment audit, Hindi and Tamil (23 Nov 2026)
   ========================================================================== */

/* Long Tamil compound words set the min-content width of grid columns, so the about, tools and
   trust grids grew past the screen (up to 121px of sideways scroll at 390). Let grid items
   shrink to their track and break a word only when it cannot fit on its own line. */
html[data-aa-lang] :is(.aa-about__grid, .aa-home-tools__grid, .aa-home-hero__grid, .aa-home-brochures__grid, .aa-svc-hero__grid, .aa-contact__grid, .aa-co-split, .aa-co-hero__grid, .aa-co-smhero__grid, .aa-inv-formwrap, .aa-apply, .aa-elig, .aa-calc) > *,
html[data-aa-lang] .aa-trust__list > li { min-width: 0; }
/* "India + NRI" stat: one long translated word, so it may wrap like normal text. */
html[data-aa-lang] .aa-trust__num--word { white-space: normal; overflow-wrap: break-word; }
html[data-aa-lang] :is(h2, h3, h4, p, li, dd, summary) { overflow-wrap: break-word; }

/* FAQ "read more" links: the translated label is longer than the column, so let it wrap. */
html[data-aa-lang] .aa-faq__more { white-space: normal; }

/* Top bar: the translated tagline wrapped to two lines and was cut off by the 40px bar. */
html[data-aa-lang] .aa-topbar__tag { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
