/* Quality Asia — brand skin for the Frappe LMS SPA.
 *
 * Loaded via an injected <link> in lms/lms/www/_lms.html. Newer LMS builds
 * inject the frappe-ui theme CSS from JS at runtime (after our static link),
 * so the token overrides are !important to win regardless of load order.
 * We only retheme design tokens + the font (not component markup), so this
 * survives frontend rebuilds.
 *
 * Brand kit ref: dev-resources/ref-for-claude  (primary red #e20a0a, Rubik) */

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap');

/* --- Typography: Rubik in place of Inter (inherited from <html>) --- */
html {
	font-family: 'Rubik', ui-sans-serif, system-ui, sans-serif !important;
}

/* --- Brand palette: red primary + accents (override frappe-ui tokens) --- */
:root {
	/* Primary / solid-button background (frappe-ui default: near-black #171717) */
	--surface-gray-7: #e20a0a !important;

	/* Links & accent TEXT -> brand red (sits on white) */
	--ink-blue-link: #e20a0a !important;
	--ink-blue-2: #e20a0a !important;
	--ink-blue-3: #b00808 !important;

	/* Info/accent SURFACES -> light red tint so callouts stay readable
	 * (e.g. the quiz instructions box: bg-surface-blue-2 + text-ink-blue-3).
	 * These are background tokens, so they must be light, not strong red. */
	--surface-blue-1: #fff5f5 !important;
	--surface-blue-2: #fdecec !important;
	--surface-blue-3: #e20a0a !important;   /* strong filled accent stays bold red */
	--outline-blue-2: #ffa2a2 !important;   /* soft red border, matches the cards */
}

/* Brand hover: red -> black on the primary (solid) button */
.bg-surface-gray-7:hover {
	background-color: #000 !important;
}

/* Brand logo: the sidebar account button forces its <img> into a fixed
 * 32x32 slot (w-8 h-8, no object-fit), which stretches non-square logos.
 * Target the slot structurally -- an <img> directly inside a button at that
 * size -- so it preserves aspect ratio for ANY uploaded logo, not a specific
 * filename. (object-fit: contain is a no-op on already-square images.) */
button > img.h-8.w-8 {
	object-fit: contain !important;
}

/* Hide "Login with Frappe Cloud" on the login page. It only renders when
 * frappe.conf has fc_communication_secret (i.e. actually hosted on Frappe
 * Cloud) — System Settings has no field for it, so it can't be disabled
 * server-side. See lms_internal/patches/v1_0/harden_login_settings.py. */
.btn-login-with-frappe-cloud {
	display: none !important;
}

/* Course/batch cards: light-red boundary like the reference .school-card.
 * The card root is borderless; the outline is drawn by its two direct children
 * (image + body). LMS renamed the card surface class across versions, so cover
 * both: .bg-surface-cards (<= 2.54) and .bg-surface-elevation-1 (2.57+). */
.bg-surface-cards > div,
.bg-surface-elevation-1 > div {
	border-color: #ffa2a2 !important;
}
