/* mwf-i18n.css v1 — language switcher, Urdu (RTL, Nastaliq) and Roman Urdu adjustments, chatbot widget */
.lang-switch{display:flex;align-items:center;gap:2px;margin-inline-start:10px;padding:3px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.7);flex:none}
.lang-switch a{display:inline-flex;align-items:center;min-height:30px;padding:2px 10px;border-radius:999px;font-size:.82rem;font-weight:600;color:var(--muted);text-decoration:none;white-space:nowrap;line-height:1.4}
.lang-switch a[lang=ur]{font-family:var(--font-ur);font-size:.9rem;line-height:1.6;padding-top:0;padding-bottom:4px}
.lang-switch a:hover{color:var(--violet)}
.lang-switch a[aria-current]{background:var(--violet);color:#fff}
.site-header.on-dark .lang-switch{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.18)}
.site-header.on-dark .lang-switch a{color:#e8defc}
.site-header.on-dark .lang-switch a[aria-current]{background:#fff;color:var(--violet-ink)}
@media (max-width:900px){.lang-switch{margin-inline-start:auto}.lang-switch+.burger{margin-left:4px}}
@media (max-width:420px){.lang-switch a{padding:2px 7px;font-size:.76rem}.brand span{font-size:.95rem}}

/* Urdu pages: Nastaliq needs taller lines; keep UI controls compact */
html[lang=ur]{line-height:1.95;font-size:1.02em}
html[lang=ur]{--font-urx:"Figtree","Noto Nastaliq Urdu","Jameel Noori Nastaleeq","Noto Naskh Arabic",system-ui,sans-serif}
html[lang=ur] body,html[lang=ur] [lang=ur]{font-family:var(--font-urx)}
.lang-switch a:not([lang=ur]){font-family:var(--font-body)}
html[lang=ur] h1,html[lang=ur] h2,html[lang=ur] h3,html[lang=ur] h4{font-family:var(--font-urx);line-height:1.75;letter-spacing:0;font-weight:600}
html[lang=ur] h1{font-size:clamp(1.7rem,4.2vw,2.7rem)}
html[lang=ur] .btn,html[lang=ur] button,html[lang=ur] input,html[lang=ur] select,html[lang=ur] .chip,html[lang=ur] .eyebrow,html[lang=ur] .tag{line-height:1.7;letter-spacing:0;text-transform:none}
html[lang=ur] .stat b,html[lang=ur] .num,html[lang=ur] input,html[lang=ur] time{font-family:var(--font-body)}
html[lang=ur] em{font-style:normal}
html[lang=ur] [lang=ur]{font-size:1em}

/* RTL mirroring for rules that use physical left */
[dir=rtl] .nav{margin-left:0;margin-right:auto}
[dir=rtl] .nav .btn,[dir=rtl] .nav>a.btn-primary{margin-left:0;margin-right:8px}
[dir=rtl] .burger{margin-left:0;margin-right:auto}
@media (max-width:900px){[dir=rtl] .lang-switch{margin-inline-start:auto}[dir=rtl] .lang-switch+.burger{margin-right:4px}}
[dir=rtl] .panel{right:auto;left:-120px}
[dir=rtl] .side-card ol,[dir=rtl] .keypoints ul{padding-left:0;padding-right:20px}
[dir=rtl] .prose ul,[dir=rtl] .prose ol{padding-left:0;padding-right:22px}
[dir=rtl] .windows th,[dir=rtl] .windows td,[dir=rtl] .table-wrap th,[dir=rtl] .table-wrap td{text-align:right}
[dir=rtl] .toc ol{border-left:0;border-right:2px solid var(--line)}
[dir=rtl] .toc a{margin-left:0;margin-right:-2px;border-left:0;border-right:2px solid transparent}
[dir=rtl] .toc a.active,[dir=rtl] .toc a:hover{border-right-color:var(--violet)}
[dir=rtl] .filters input{margin-left:0;margin-right:auto}
[dir=rtl] .skip{left:auto;right:-9999px}
[dir=rtl] .skip:focus{right:8px}
/* Calculator results: on Urdu pages show the Urdu ruling before the English one */
[dir=rtl] .result.show{display:flex;flex-direction:column}
[dir=rtl] .result .ruling.ur{order:1}
[dir=rtl] .result .ruling:not(.ur){order:2;direction:ltr;text-align:left}
[dir=rtl] .result .callout,[dir=rtl] .result .res-actions{order:3}

/* Suggestion bar (English page, visitor looks Pakistani) */
.lang-suggest{position:fixed;inset-inline:12px;bottom:80px;z-index:120;max-width:560px;margin:0 auto;background:var(--night);color:#fff;border-radius:16px;padding:12px 14px;display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;box-shadow:var(--shadow-lg);font-size:.92rem}
.lang-suggest p{margin:0;flex:1 1 220px}
.lang-suggest [lang=ur]{font-family:var(--font-ur);line-height:1.9;color:#f3d39a}
.lang-suggest a,.lang-suggest button{border:0;border-radius:999px;padding:7px 14px;font:inherit;font-weight:600;cursor:pointer;text-decoration:none}
.lang-suggest a{background:var(--gold);color:var(--night)}
.lang-suggest a[lang=ur]{font-family:var(--font-ur);color:var(--night);line-height:1.6}
.lang-suggest button{background:transparent;color:#cbbff0}

/* Chatbot */
.mwf-bot-btn{position:fixed;inset-inline-end:18px;bottom:18px;z-index:130;display:inline-flex;align-items:center;gap:8px;border:0;border-radius:999px;padding:12px 18px;background:linear-gradient(135deg,var(--violet),var(--violet-deep));color:#fff;font:600 .95rem var(--font-body);box-shadow:var(--shadow-lg);cursor:pointer}
html[lang=ur] .mwf-bot-btn{font-family:var(--font-ur);line-height:1.6;padding:8px 18px 12px}
.mwf-bot-btn svg{width:20px;height:20px}
.mwf-bot-btn[aria-expanded=true]{display:none}
.mwf-bot{position:fixed;inset-inline-end:18px;bottom:18px;z-index:131;width:min(380px,calc(100vw - 24px));height:min(600px,calc(100vh - 100px));display:none;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow-lg);overflow:hidden}
.mwf-bot.open{display:flex}
@media (max-width:560px){.mwf-bot{inset:auto 0 0 0;width:100%;height:85vh;border-radius:20px 20px 0 0}.mwf-bot-btn{inset-inline-end:12px;bottom:12px;padding:14px;border-radius:50%}.mwf-bot-btn span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}html[lang=ur] .mwf-bot-btn{padding:14px}}
.mwf-bot header{display:flex;align-items:center;gap:10px;padding:12px 14px;background:var(--night);color:#fff}
.mwf-bot header b{flex:1;font-size:.98rem}
.mwf-bot header small{display:block;font-weight:400;color:#cbbff0;font-size:.76rem}
.mwf-bot header button{background:transparent;border:0;color:#fff;width:36px;height:36px;border-radius:10px;cursor:pointer;font-size:1.3rem;line-height:1}
.mwf-bot .log{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:var(--bg)}
.mwf-bot .msg{max-width:92%;padding:10px 12px;border-radius:14px;font-size:.93rem;line-height:1.55;overflow-wrap:anywhere}
html[lang=ur] .mwf-bot .msg{line-height:2}
.mwf-bot .msg.me{align-self:flex-end;background:var(--violet);color:#fff;border-end-end-radius:4px}
.mwf-bot .msg.bot{align-self:flex-start;background:#fff;border:1px solid var(--line);border-end-start-radius:4px}
.mwf-bot .msg.bot p{margin:0 0 6px}
.mwf-bot .hit{display:block;margin-top:8px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;text-decoration:none;color:inherit;background:var(--lilac)}
.mwf-bot .hit strong{display:block;color:var(--violet-ink);font-size:.9rem}
.mwf-bot .hit span{display:block;color:var(--muted);font-size:.84rem;margin-top:2px}
.mwf-bot .hit em{font-style:normal;color:var(--violet);font-size:.8rem}
.mwf-bot .note{font-size:.76rem;color:var(--muted);margin-top:6px}
.mwf-bot .chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.mwf-bot .chips button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:5px 10px;font:inherit;font-size:.82rem;cursor:pointer;color:var(--violet-ink)}
html[lang=ur] .mwf-bot .chips button{line-height:1.8}
.mwf-bot form{display:flex;gap:8px;padding:10px;border-top:1px solid var(--line);background:#fff}
.mwf-bot input{flex:1;min-height:42px;border:1px solid var(--line);border-radius:12px;padding:8px 12px;font:inherit;font-size:16px}
.mwf-bot form button{border:0;border-radius:12px;padding:0 14px;background:var(--violet);color:#fff;font:inherit;font-weight:600;cursor:pointer}
.mwf-bot .typing{color:var(--muted);font-size:.85rem}
@media print{.lang-switch,.lang-suggest,.mwf-bot,.mwf-bot-btn{display:none!important}}

.lang-switch .s{display:none}
.nav>a,.nav .menu>button,.nav .btn{white-space:nowrap}
@media (max-width:1100px){.lang-switch .l{display:none}.lang-switch .s{display:inline}}
@media (max-width:560px){.bar{gap:8px;padding:10px 12px}.lang-switch{margin-inline-start:auto}.lang-switch a{padding:2px 8px}.brand span{font-size:.92rem}}
@media (max-width:380px){.brand span{display:none}}
