/* customstyle — custom webmail fonts for the elastic skin
 *   Univers       → headings
 *   Melior        → body / normal text
 *   Berkeley Mono → code & <pre>  (a.k.a. TX-02; Kawkab Mono fills in for Arabic)
 * Loaded after the skin CSS so these win. Font files are served from this
 * plugin dir. Upgrade-safe — no skin-template edits.
 */

/* ---------- Univers (headings) ---------- */
@font-face { font-family: 'Univers'; src: url('fonts/Univers-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Univers'; src: url('fonts/Univers-Bold.woff2')    format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Melior (body / normal) ---------- */
@font-face { font-family: 'Melior'; src: url('fonts/Melior-Roman.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Melior'; src: url('fonts/Melior-Bold.woff2')  format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Berkeley Mono / TX-02 (code, <pre>) ---------- */
@font-face { font-family: 'Berkeley Mono'; src: url('fonts/berkeley-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Berkeley Mono'; src: url('fonts/berkeley-mono-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
/* Arabic companion, folded into the same family via unicode-range */
@font-face { font-family: 'Berkeley Mono'; src: url('fonts/kawkab-mono-arabic-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Berkeley Mono'; src: url('fonts/kawkab-mono-arabic-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }

/* ---------- Apply ---------- */
/* THE INTERFACE IS UNIVERS. Nav, taskmenu, menus, toolbars, buttons, headings,
   tabs, folder list, message list, form fields and labels — all of it. This is
   elastic's own base font rule (everything inherits from it) plus its few
   explicit Roboto holdouts (the TinyMCE editor chrome and the quoted-text
   toggle), so nothing is left on Roboto. Icon glyphs set font-family:'Icons'
   explicitly and are unaffected by this inherited override. */
body, button, input, optgroup, select, textarea, .popover,
div.tox, div.tox :not(.svg),
.message-part blockquote span.blockquote-link,
.message-htmlpart blockquote span.blockquote-link {
  font-family: 'Univers', 'Helvetica Neue', Arial, sans-serif !important;
}

/* MELIOR IS FOR EMAIL PROSE you READ — the reading pane. Children inherit;
   HTML mail that carries its own fonts keeps them. (Plain-text COMPOSE is
   intentionally mono — see the Berkeley Mono rule below. HTML-compose in
   TinyMCE is a separate iframe styled by the skin's embed.css, left as-is.) */
.message-part, .message-htmlpart {
  font-family: 'Melior', Georgia, serif !important;
}

/* Code & preformatted — Berkeley Mono (TX-02). Includes plain-text mail
   (.message-part div.pre) and the raw/source editors. */
pre, code, kbd, samp, tt, .ff-mono,
.message-part div.pre,
#composebody,
.formcontent.raweditor textarea,
.html-editor > .googie_edit_layer,
.html-editor > textarea,
.googie_edit_layer {
  font-family: 'Berkeley Mono', monospace !important;
}
