/*
 * Urdu (RTL) typography: Noto Nastaliq Urdu with a tall line-height so the
 * diagonal Nastaliq letterforms never overlap. Loaded only on Urdu pages.
 * Layout mirroring comes from logical properties in theme.css.
 */

:root {
	--sh-font-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", serif;
	--sh-font-heading: var(--sh-font-urdu);
	--sh-font-body: var(--sh-font-urdu);
	--sh-font-ui: var(--sh-font-urdu);
	--sh-line-height: 2.2;
	--sh-reading-width: 48rem;
}

html[lang|="ur"] body,
body.rtl {
	font-family: var(--sh-font-urdu);
	line-height: 2.2;
	word-spacing: 0.05em;
}

html[lang|="ur"] h1,
html[lang|="ur"] h2,
html[lang|="ur"] h3,
html[lang|="ur"] h4 {
	font-weight: 700;
	line-height: 1.9;
	letter-spacing: 0;
}

/* Nastaliq needs more room above and below than Latin text. */
html[lang|="ur"] .sh-billboard__title { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.75; letter-spacing: 0; }
html[lang|="ur"] .sh-billboard--short .sh-billboard__title { font-size: clamp(1.8rem, 4vw, 2.8rem); }
html[lang|="ur"] .sh-billboard__subtitle { font-style: normal; line-height: 2; }
html[lang|="ur"] .sh-billboard__meta,
html[lang|="ur"] .sh-billboard__eyebrow { line-height: 2.2; }
html[lang|="ur"] .sh-billboard__text { line-height: 2.2; }
html[lang|="ur"] .sh-row__title { line-height: 2; }
html[lang|="ur"] .sh-tile__title { font-size: 1rem; line-height: 2; }
html[lang|="ur"] .sh-tile--poster .sh-tile__title { font-size: 1.05rem; line-height: 1.9; }
html[lang|="ur"] .sh-tile__meta { font-size: 0.78rem; line-height: 2.1; }
html[lang|="ur"] .sh-tile__excerpt { line-height: 2.1; }
html[lang|="ur"] .sh-eplist__title { font-size: 1.02rem; line-height: 2; }
html[lang|="ur"] .sh-eplist__excerpt { line-height: 2.1; }
html[lang|="ur"] .sh-nav .sh-menu a { line-height: 2; padding-block: 2px 6px; }
html[lang|="ur"] .sh-btn { line-height: 2; padding-block: 0.25em 0.55em; }
html[lang|="ur"] .sh-chip { line-height: 2; padding-block: 2px 6px; }
html[lang|="ur"] .sh-reading__lead { font-style: normal; line-height: 2.1; }
html[lang|="ur"] .sh-prose { line-height: 2.3; }
html[lang|="ur"] .sh-prose blockquote { font-style: normal; line-height: 2.1; }
html[lang|="ur"] .sh-footer { line-height: 2.1; }
html[lang|="ur"] .sh-post-nav__link strong,
html[lang|="ur"] .sh-episode-nav__link strong { line-height: 2; }

/* Uppercase and letter-spacing break Arabic-script joining. */
html[lang|="ur"] .sh-billboard__eyebrow,
html[lang|="ur"] .sh-row__eyebrow,
html[lang|="ur"] .sh-tile__eyebrow,
html[lang|="ur"] .sh-tile__status,
html[lang|="ur"] .sh-share__label,
html[lang|="ur"] .sh-author__label,
html[lang|="ur"] .sh-footer__title,
html[lang|="ur"] .sh-post-nav__link small,
html[lang|="ur"] .sh-episode-nav__link small {
	text-transform: none;
	letter-spacing: 0;
}

html[lang|="ur"] .sh-billboard__eyebrow { font-size: 0.95rem; }
html[lang|="ur"] .sh-tile__eyebrow { font-size: 0.8rem; line-height: 2; }
html[lang|="ur"] .sh-footer__title { font-size: 0.95rem; }

/* No drop cap in Urdu: Nastaliq has no capital letters. */
html[lang|="ur"] .sh-prose > p:first-of-type::first-letter,
html[lang|="ur"] .sh-prose > .sh-episode-body > p:first-of-type::first-letter {
	float: none;
	margin: 0;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

/* The language switcher keeps English readable in its own font. */
html[lang|="ur"] .sh-lang-switcher .lang-item-en a { font-family: Inter, system-ui, sans-serif; line-height: 1.8; }

/* Inputs and buttons */
html[lang|="ur"] input,
html[lang|="ur"] textarea,
html[lang|="ur"] select,
html[lang|="ur"] button { font-family: var(--sh-font-urdu); }

/* Numbers and Latin snippets inside Urdu text (dates, names) */
html[lang|="ur"] :lang(en) { font-family: Lora, Georgia, serif; }
html[lang|="ur"] .sh-tile__badge,
html[lang|="ur"] .sh-pagination .page-numbers { font-family: var(--sh-font-urdu); line-height: 2; }
