/*
 * The heading of every page and every management window of the panel
 * (تسک ۱۴۰۵/۰۷/۳۰/۰۱، بند ۱۳).
 *
 * One specification for the whole heading and everything printed with it — the
 * management's name, «ایجاد / ویرایش / مشاهده», the record's name, a count, a
 * status: Vazirmatn, 18px, weight 700, 24px line height. Only those four and
 * the font: no colour is set here, so the colours each part already has (a
 * yellow count, a green status) stay exactly what they were.
 *
 * Why the selector carries an id-level `:not(#…)`: about fifteen local rules
 * across the panel set these same four properties on these same headings — some
 * `!important`, some in a page's own `<style>` further down the document, some
 * with three classes of specificity (`body:has(.x) .fi-header-heading`). A rule
 * that only *usually* wins is a heading that is 18px on one page and 15px on
 * the next, which is what this task is about. The `:not(#…)` matches every
 * element there is and lifts the rule above any class-only selector, so this one
 * file is the answer everywhere, including on a page built tomorrow.
 *
 * Images, icons and avatars are not text and keep their size; they are only
 * aligned with it. Column titles, field labels, buttons and page text are not
 * headings and are not reached — the selectors name only the page header, the
 * folded toolbar heading, the sticky record title and a modal's heading. A
 * floating message's title is its own component (panel-floating-messages.css).
 */

:root:not(#baligpa-heading) .fi-header-heading,
:root:not(#baligpa-heading) .fi-header-heading *:not(svg):not(svg *):not(img),
:root:not(#baligpa-heading) .fi-ta-page-header-heading,
:root:not(#baligpa-heading) .fi-ta-page-header-heading *:not(svg):not(svg *):not(img),
:root:not(#baligpa-heading) .fi-record-page-header-title-text,
:root:not(#baligpa-heading) .fi-record-page-header-title-text *:not(svg):not(svg *):not(img),
:root:not(#baligpa-heading) .fi-modal-heading,
:root:not(#baligpa-heading) .fi-modal-heading *:not(svg):not(svg *):not(img) {
    font-family: 'Vazirmatn', var(--font-family, sans-serif) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 24px !important;
    letter-spacing: normal !important;
}

/* A long heading wraps on a phone rather than being cut off or overlapping. */
:root:not(#baligpa-heading) .fi-header-heading,
:root:not(#baligpa-heading) .fi-modal-heading {
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-overflow: clip;
    min-width: 0;
}

/* An icon, avatar or logo printed with the heading sits on its line. */
.fi-header-heading img,
.fi-header-heading svg,
.fi-modal-heading img,
.fi-modal-heading svg {
    vertical-align: middle;
}
