/* EMPIQ brand on top of Frappe's Espresso tokens, for the desk and the web pages.
   Colours and font as read from empirical-inc.com on 2026-10-12. Raleway is self-hosted
   under the SIL Open Font License, so the app needs no call to Google at runtime. */

@font-face {
	font-family: "Raleway";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("/assets/empiq_pm/fonts/raleway-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
		U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113,
		U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Raleway";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("/assets/empiq_pm/fonts/raleway-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
		U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* `html:root` outranks the plain `:root` blocks of the bundles that load after this file. */
html:root {
	--empiq-blue: #274b9d;
	--empiq-blue-dark: #1d3a7a;
	--empiq-yellow: #ffc800;

	--font-stack: "Raleway", "InterVariable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
		Roboto, sans-serif;
}

/* Dark mode keeps Frappe's own palette for now. */
html:root:not([data-theme="dark"]) {
	--primary: var(--empiq-blue);
	--primary-color: var(--empiq-blue);
	--brand-color: var(--empiq-blue);
	--btn-primary: var(--empiq-blue);
	--border-primary: var(--empiq-blue);
	--focus-default: 0 0 0 2px rgba(39, 75, 157, 0.35);
}

:root:not([data-theme="dark"]) .btn.btn-primary:hover {
	background-color: var(--empiq-blue-dark);
}

/* Espresso buttons, used on the login page, carry their own colour variables. */
:root:not([data-theme="dark"]) .es-button:not([data-theme]) {
	--bt-solid-bg: var(--empiq-blue);
	--bt-solid-bg-hover: var(--empiq-blue-dark);
	--bt-solid-bg-active: var(--empiq-blue-dark);
	--bt-solid-fg: #fff;
}

/* The desk corner shows the logo of the app that owns the module on screen, Frappe's or
   ERPNext's for most of them. Show the EMPIQ mark there instead. */
.header-logo:has(> img[src^="/assets/frappe/"], > img[src^="/assets/erpnext/"]) {
	background: url("/assets/empiq_pm/images/empiq-icon-blue.png") center / contain no-repeat;
}

.header-logo > img[src^="/assets/frappe/"],
.header-logo > img[src^="/assets/erpnext/"] {
	visibility: hidden;
}

/* Raleway's default figures are old-style and dip below the line, which misreads in amounts.
   Form fields do not inherit this, so they are named too. */
body,
input,
textarea,
select,
button {
	font-variant-numeric: lining-nums;
}

::selection {
	background: var(--empiq-yellow);
	color: #000;
}

/* Login and other web pages: a yellow rule over the card, as on the EMPIQ page. */
.page-card {
	border-top: 4px solid var(--empiq-yellow);
}
