/* HIGHCAT typography, adapted to InvenTree 1.5.5's existing Mantine UI. */
html:root {
  --mantine-font-family: "Karla Variable", Karla, sans-serif !important;
  --mantine-font-family-headings: "JetBrains Mono Variable", "JetBrains Mono", monospace !important;
  --mantine-font-family-monospace: "JetBrains Mono Variable", "JetBrains Mono", monospace !important;
  --mantine-headings-font-weight: 700 !important;
}

body {
  font-family: var(--mantine-font-family);
}

h1, h2, h3, h4, h5, h6,
[role="heading"],
.mantine-Title-root,
.mantine-Modal-title,
.mantine-Drawer-title,
.mantine-Alert-title,
.mantine-Accordion-label,
.mantine-Text-root[data-variant="gradient"] {
  font-family: var(--mantine-font-family-headings) !important;
  font-weight: 700 !important;
}

/* Original horizontal assets; 28 px matches the shared HighcatLogo. */
img[src$="/highcat/highcat-horizontal-black.png"] {
  display: block;
  height: 28px;
  width: auto;
  max-width: none;
  object-fit: contain;
  flex-shrink: 0;
}

html[data-mantine-color-scheme="dark"] img[src$="/highcat/highcat-horizontal-black.png"] {
  content: url("./highcat-horizontal-white.png");
}

/* Retain InvenTree's existing keyboard-accessible navigation button. */
button[aria-label="navigation-menu"] {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 40px;
  padding-inline: 4px;
}

.mantine-ActionIcon-root:has(img[src$="/highcat/highcat-horizontal-black.png"]) {
  width: auto;
  min-width: 96px;
}

/* InvenTree 1.5.5 always renders its local AuthenticationForm. Keep its native
   SSO button and callback handling; production rejects passwords server-side. */
html[data-highcat-auth="sso"] form:has(input[aria-label="login-username"]),
html[data-highcat-auth="sso"] .mantine-Divider-root:has(+ form input[aria-label="login-username"]) {
  display: none !important;
}
