/* WEMS offline font stack. All fonts are vendored in ../fonts — the app makes
   no network font requests at runtime.

   NOTE: the FIRST @font-face block below is managed by
   .github/workflows/bundle-noto-nastaliq-urdu.yml, which replaces the first
   block with Noto Nastaliq Urdu. Keep Noto first when editing this file. */
@font-face {
  font-family: "Noto Nastaliq Urdu";
  src: url("../fonts/NotoNastaliqUrdu-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Urdu body text — Mehr Nastaliq Web (woff preferred, ttf fallback). */
@font-face {
  font-family: "Mehr Nastaliq Web";
  src: url("../fonts/MehrNastaliqWeb.woff") format("woff"),
       url("../fonts/MehrNastaliqWeb.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Display/headings — Alyamama (user-requested), all four weights, both
   languages. Scheherazade New stays as the fallback. */
@font-face {
  font-family: "Alyamama";
  src: url("../fonts/Alyamama-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Alyamama";
  src: url("../fonts/Alyamama-500.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Alyamama";
  src: url("../fonts/Alyamama-600.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Alyamama";
  src: url("../fonts/Alyamama-700.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* Display/headings — Scheherazade New, both languages. */
@font-face {
  font-family: "Scheherazade New";
  src: url("../fonts/ScheherazadeNew-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Scheherazade New";
  src: url("../fonts/ScheherazadeNew-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* Font variables */
:root {
  /* Urdu body: Mehr Nastaliq Web first (lighter, web-tuned), Noto as fallback */
  --urdu-font: "Mehr Nastaliq Web", "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
  /* Headings: Alyamama first (user-requested), Scheherazade New fallback */
  --heading-font: "Alyamama", "Scheherazade New", "Mehr Nastaliq Web", "Noto Nastaliq Urdu", serif;
  /* Latin body */
  --body-font: "Segoe UI", Tahoma, Arial, sans-serif;
}

html[dir="rtl"] body,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
html[dir="rtl"] button,
html[dir="rtl"] table,
html[dir="rtl"] .card,
html[dir="rtl"] .modal,
html[dir="rtl"] .nav-item,
html[dir="rtl"] .brand-copy,
html[dir="rtl"] .flash-message {
  font-family: var(--urdu-font);
}

/* Headings render in Scheherazade New in both languages. Generous
   line-height leaves room for Nastaliq-style descenders. */
h1, h2, h3, h4, h5,
.page-title, .brand-title, .login-title, .section-title, .logo {
  font-family: var(--heading-font);
  font-optical-sizing: auto;
  font-weight: 700;
  line-height: 1.8;
}

/* Keep the lightweight offline icon glyphs out of the Nastaliq fonts. */
.fas,
.far,
.fab,
[class^="fa-"],
[class*=" fa-"] {
  font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif !important;
}
