/* Jamia Mahmoodia Theme v103 — Urdu purity + mobile balance authority. */

/* Urdu is a complete UI mode, not a mixed bilingual skin. */
html[lang="ur"] body#jm-site-root:not(.jm-portal-workspace-page){
  direction:rtl!important;
  font-family:"Noto Naskh Arabic","Noto Sans Arabic",serif!important;
  font-style:normal!important;
  text-rendering:optimizeLegibility;
}
html[lang="ur"] body#jm-site-root:not(.jm-portal-workspace-page) :where(
  h1,h2,h3,h4,h5,h6,p,a,button,label,summary,b,strong,span,small,em,li,input,textarea,select,option,figcaption
):not(i):not(.fa):not([class*="fa-"]){
  font-family:"Noto Naskh Arabic","Noto Sans Arabic",serif!important;
  font-style:normal!important;
  letter-spacing:0!important;
  text-transform:none!important;
}
html[lang="ur"] body#jm-site-root:not(.jm-portal-workspace-page) :where(h1,h2,h3){line-height:1.65!important}
html[lang="ur"] body#jm-site-root:not(.jm-portal-workspace-page) :where(p,li,small){line-height:2!important}
html[lang="ur"] body#jm-site-root:not(.jm-portal-workspace-page) :where(input,textarea,select,button){line-height:1.6!important}
html[lang="ur"] body#jm-site-root:not(.jm-portal-workspace-page) :where(.jm70-kicker,.jm70-eyebrow,.jm66-kicker,.jm84-language-kicker){font-weight:600!important}
html[lang="ur"] body#jm-site-root:not(.jm-portal-workspace-page) .jm71-hero-copy,
html[lang="ur"] body#jm-site-root:not(.jm-portal-workspace-page) .jm70-section-head,
html[lang="ur"] body#jm-site-root:not(.jm-portal-workspace-page) .jm70-footer-grid,
html[lang="ur"] body#jm-site-root:not(.jm-portal-workspace-page) .jm66-section-head{text-align:right!important}

/* No italic fallback in Urdu. */
html[lang="ur"] body#jm-site-root:not(.jm-portal-workspace-page) em,
html[lang="ur"] body#jm-site-root:not(.jm-portal-workspace-page) i:not(.fa):not([class*="fa-"]){font-style:normal!important}

/* Header/drawer Urdu spacing. */
html[lang="ur"] body#jm-site-root .jm70-brand-copy,
html[lang="ur"] body#jm-site-root .jm70-drawer-brand>strong,
html[lang="ur"] body#jm-site-root .jm70-mobile-nav span:nth-child(2){text-align:right!important}
html[lang="ur"] body#jm-site-root .jm70-nav-trigger i,
html[lang="ur"] body#jm-site-root .jm70-mobile-group>summary>i:last-child{margin-left:0!important;margin-right:auto!important}

/* Mobile identity/logo cards: logo always contained, centered and never clipped. */
@media(max-width:760px){
 body#jm-site-root.jm-ui-v103 .jm70-identities .jm70-identity-rail{
   display:grid!important;grid-template-columns:1fr!important;gap:12px!important;
   overflow:visible!important;margin:0!important;padding:0!important;width:100%!important
 }
 body#jm-site-root.jm-ui-v103 .jm70-identities .jm70-identity-rail>a{
   width:100%!important;min-width:0!important;min-height:108px!important;height:auto!important;
   display:grid!important;grid-template-columns:78px minmax(0,1fr)!important;align-items:center!important;gap:14px!important;
   padding:14px 16px!important;border-radius:20px!important;overflow:hidden!important;background:#fff!important
 }
 html[dir="rtl"] body#jm-site-root.jm-ui-v103 .jm70-identities .jm70-identity-rail>a{grid-template-columns:minmax(0,1fr) 78px!important}
 html[dir="rtl"] body#jm-site-root.jm-ui-v103 .jm70-identities .jm70-identity-rail>a>span:first-child{grid-column:2!important;grid-row:1!important}
 html[dir="rtl"] body#jm-site-root.jm-ui-v103 .jm70-identities .jm70-identity-rail>a>span:last-child{grid-column:1!important;grid-row:1!important;text-align:right!important}
 body#jm-site-root.jm-ui-v103 .jm70-identities .jm70-identity-rail>a>span:first-child{
   width:78px!important;height:78px!important;min-width:78px!important;display:grid!important;place-items:center!important;
   padding:8px!important;border-radius:17px!important;background:#f8f7f2!important;overflow:hidden!important
 }
 body#jm-site-root.jm-ui-v103 .jm70-identities .jm70-identity-rail img{
   display:block!important;width:100%!important;height:100%!important;max-width:62px!important;max-height:62px!important;
   object-fit:contain!important;object-position:center!important;margin:auto!important;transform:none!important
 }
 body#jm-site-root.jm-ui-v103 .jm70-identities .jm70-identity-rail b{font-size:16px!important;line-height:1.25!important}
 body#jm-site-root.jm-ui-v103 .jm70-identities .jm70-identity-rail small{font-size:12px!important;line-height:1.45!important;margin-top:4px!important}
}

/* Mobile drawer has one scroll owner. Underlying page does not move. */
html.jm70-drawer-locked,html.jm70-drawer-locked body{overscroll-behavior:none!important}
body#jm-site-root.jm70-menu-open{overscroll-behavior:none!important}
@media(max-width:1120px){
 body#jm-site-root.jm-ui-v103 .jm70-drawer{overscroll-behavior:contain!important;touch-action:pan-y!important}
 body#jm-site-root.jm-ui-v103 .jm70-mobile-nav{-webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important}
}

/* v102 reserved a white body strip for floating controls. Keep that space inside the green footer instead. */
@media(max-width:900px){
 body#jm-site-root.jm-ui-v103:not(.jm-portal-workspace-page){padding-bottom:0!important}
 body#jm-site-root.jm-ui-v103:not(.jm-portal-workspace-page) .jm70-footer{padding-bottom:calc(86px + env(safe-area-inset-bottom))!important}
 body#jm-site-root.jm-ui-v103:not(.jm-portal-workspace-page) .jm70-footer-bottom{padding-bottom:12px!important;margin-bottom:0!important}
 body#jm-site-root.jm-ui-v103:not(.jm-portal-workspace-page) .jm94-install-launcher,
 body#jm-site-root.jm-ui-v103:not(.jm-portal-workspace-page) .jm69-chat{bottom:max(14px,env(safe-area-inset-bottom))!important}
}

/* Fatwa Urdu archive/card typography. */
html[lang="ur"] body#jm-site-root .jm66-ifta-page :where(.jm66-fatwa-card,.jm66-category-grid>a,.jm66-ifta-search,.jm66-ifta-results){font-style:normal!important}
html[lang="ur"] body#jm-site-root .jm66-category-grid>a strong{font-size:18px!important;line-height:1.7!important}
html[lang="ur"] body#jm-site-root .jm66-category-grid>a small{font-size:13px!important;line-height:1.9!important}
html[lang="ur"] body#jm-site-root .jm66-ifta-search input,
html[lang="ur"] body#jm-site-root .jm66-ifta-search select{font-size:15px!important}

/* Language selector itself remains readable while Urdu is selected. */
html[lang="ur"] .jm84-language-list [data-lang="en"] .jm84-language-text{font-family:Manrope,sans-serif!important;direction:ltr!important;text-align:left!important}
html[lang="ur"] .jm84-language-list [data-lang="ur"] .jm84-language-text{font-family:"Noto Naskh Arabic","Noto Sans Arabic",serif!important;direction:rtl!important;text-align:right!important}
