/*
 * BeLYNC interface font — Tajawal (self-hosted; additive — Core is never modified).
 *
 * Tajawal is the primary BeLYNC UI typeface for BOTH English and Arabic (intentionally not
 * language-gated). Assets are self-hosted under /assets/middle_east_core/fonts/tajawal/ and
 * served by the app's public asset pipeline — there is NO runtime dependency on Google Fonts,
 * fonts.googleapis.com, fonts.gstatic.com or any external font CDN.
 *
 * Tajawal ships real weights 400 / 500 / 700 only (there is no genuine 600 asset, so 600 is
 * not declared and never synthesized). Each weight is provided in two subsets — Arabic and
 * Latin — selected automatically per codepoint via unicode-range, so one font-family covers
 * both scripts.
 *
 * Licence: SIL Open Font License 1.1 — see fonts/tajawal/OFL.txt (bundled alongside the
 * assets). Copyright 2018 Boutros International.
 */

/* ---- 400 ---- */
@font-face {
	font-family: "Tajawal";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/assets/middle_east_core/fonts/tajawal/tajawal-400-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
		U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Tajawal";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/assets/middle_east_core/fonts/tajawal/tajawal-400-arabic.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
		U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74,
		U+FE76-FEFC, U+1EE00-1EEFF;
}

/* ---- 500 ---- */
@font-face {
	font-family: "Tajawal";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("/assets/middle_east_core/fonts/tajawal/tajawal-500-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
		U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Tajawal";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("/assets/middle_east_core/fonts/tajawal/tajawal-500-arabic.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
		U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74,
		U+FE76-FEFC, U+1EE00-1EEFF;
}

/* ---- 700 ---- */
@font-face {
	font-family: "Tajawal";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("/assets/middle_east_core/fonts/tajawal/tajawal-700-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
		U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Tajawal";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("/assets/middle_east_core/fonts/tajawal/tajawal-700-arabic.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
		U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74,
		U+FE76-FEFC, U+1EE00-1EEFF;
}

/*
 * BeLYNC interface font stack (sensible system fallbacks; no fake weight synthesis).
 *
 * Tajawal is the PRIMARY font across the whole installed BeLYNC ERP Desk — one consistent
 * typography from BeLYNC Administration to Sales Invoice, Customer, Item, reports, etc. — for
 * BOTH English and Arabic. We do this by re-pointing Frappe's own supported sans-serif font
 * variables (var(--font-stack) is used across the Desk; --font-family-sans-serif is the
 * Bootstrap-style alias) at the BeLYNC stack. This file is loaded via app_include_css AFTER
 * Core's CSS, so the :root override wins without !important and without editing Core. The
 * monospace stack is intentionally left untouched. Intentionally NOT gated on [lang]/:lang().
 */
:root {
	--belync-font: "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-stack: var(--belync-font);
	--font-family-sans-serif: var(--belync-font);
}

/*
 * Safety net for the few surfaces that set font-family directly rather than via the variable
 * (page title, navbar, forms, inputs, selects, buttons, tables, dialogs/modals). These inherit
 * in most themes, but naming them keeps the whole normal Desk experience on Tajawal. The
 * BeLYNC Setup / Administration surface is included explicitly. No !important is used.
 */
body,
.page-head .title-text,
.page-title,
.navbar,
.btn,
button,
input,
select,
textarea,
.form-control,
table,
.modal,
.modal-title,
.belync-setup,
.belync-setup .btn {
	font-family: var(--belync-font);
}
