/* ==========================================================================
   ERD Studio — self-hosted "Noto Kufi Arabic"
   Replaces the old Google Fonts CDN <link> (fonts.googleapis.com /
   fonts.gstatic.com). Self-hosting removes the third-party network
   round-trip, works with a strict CSP (no more font-src exception needed),
   and is what actually fixes the small pockets of the app (native <select>
   dropdowns, some <button>/<input> controls, browser chrome like alerts)
   that were still falling back to a system font — those elements don't
   inherit font-family from <body> by default, network hiccups on the
   Google Fonts request left them briefly un-styled, and this file both
   hosts the font locally AND forces those controls to inherit it (see the
   bottom of this file).

   Drop the two files below into /assets/fonts/ :
     assets/fonts/NotoKufiArabic-Regular.woff2   (font-weight: 400)
     assets/fonts/NotoKufiArabic-Bold.woff2      (font-weight: 700)

   Included on every page in place of the Google Fonts <link> tags:
     includes/header.php, erd.php, admin/index.php, admin/users.php,
     admin/diagrams.php
   ========================================================================== */

@font-face {
  font-family: 'Noto Kufi Arabic';
  src: url('/assets/fonts/NotoKufiArabic-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Kufi Arabic';
  src: url('/assets/fonts/NotoKufiArabic-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Weights 500/600/800 used around the app (buttons, headings, badges)
   fall back to the nearest loaded face (400 or 700) and get synthetic
   bolding from the browser until/unless matching Medium/SemiBold/ExtraBold
   .woff2 files are added above with their own @font-face blocks. */

/* --------------------------------------------------------------------------
   Force the font onto elements that do NOT inherit font-family from <body>
   by default in every browser: form controls and dialog/menu widgets.
   This is the actual fix for "some parts still aren't Noto Kufi Arabic" —
   site.css/app.css/admin.css already set body { font-family: var(--font) },
   but native <button>/<input>/<select>/<textarea>/<option> ignore that
   inherited value unless explicitly told to inherit it.
   -------------------------------------------------------------------------- */
html, body,
button, input, select, textarea, optgroup, option,
::placeholder,
dialog, ::backdrop {
  font-family: 'Noto Kufi Arabic', var(--font, sans-serif);
}
