/*
 * Norisma brand layer for Zammad — injected at the edge (see deploy/edge/
 * Caddyfile + docs/branding.md). Vendor containers are never modified; if an
 * upgrade renames a selector the element falls back to stock styling.
 * Version the filename (v1, v2, …) on every content change — it is served
 * with an immutable Cache-Control.
 */

@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/norisma-brand/geist-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/norisma-brand/geist-latin-ext-wght-normal.woff2") format("woff2-variations");
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Portal type ramp everywhere except explicit monospace surfaces. */
body,
input,
select,
textarea,
button {
  font-family: "Geist Variable", "Inter", ui-sans-serif, system-ui,
    -apple-system, "Segoe UI", sans-serif !important;
}
pre,
code,
kbd,
samp,
.js-textarea[data-mode="code"] {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    monospace !important;
}

/* Portal stone palette. --primary is the neutral coal — identity comes from
 * the terracotta logo, never from an accent hue (frontend app.css). */
:root {
  --norisma-coal: #1c1917; /* stone-900 — portal --primary (light) */
  --norisma-coal-hover: #292524; /* stone-800 */
  --norisma-ring: #a8a29e; /* stone-400 */
}

/* Primary action buttons: Zammad blue -> stone coal. */
.btn--primary {
  background: var(--norisma-coal) !important;
  border-color: var(--norisma-coal) !important;
  color: #fafaf9 !important;
}
.btn--primary:hover,
.btn--primary:focus {
  background: var(--norisma-coal-hover) !important;
  border-color: var(--norisma-coal-hover) !important;
}

/* Input focus: Zammad light-blue glow -> quiet stone ring. */
input:focus,
select:focus,
textarea:focus,
.form-control:focus {
  border-color: var(--norisma-ring) !important;
  box-shadow: 0 0 0 3px rgba(168, 162, 158, 0.25) !important;
}

::selection {
  background: rgba(158, 72, 51, 0.2); /* terracotta, logo-derived */
}

/* ---- v2: agent-UI chrome (selectors verified live 2026-08-10) ---------- */

/* Sidebar + search well: Zammad slate (#25262c) -> portal stone-950. */
#navigation,
#navigation .search {
  background: #0c0a09 !important;
}

/* Active menu item: Zammad blue (#429ed7) -> portal sidebar-accent
 * (stone-800 with stone-50 text, same as the portal's own sidebar). */
#navigation .menu-item.is-active,
#navigation .menu-item.is-active:hover {
  background: #292524 !important;
  color: #fafaf9 !important;
}

/* Sidebar logo: Zammad hummingbird -> white Norisma N-mark. The .logo div
 * stays in place (it is also the notifications toggle); only the sprite is
 * hidden. */
#navigation .logo svg.icon-logo {
  display: none;
}
#navigation .logo {
  background: url("/norisma-brand/logo-n-white.svg") center / contain
    no-repeat !important;
}

/* ---- v3: the .logo div sized itself from the (now hidden) sprite child —
 * give the slot explicit dimensions so the N-mark background renders. ---- */
#navigation .logo {
  width: 42px !important;
  height: 42px !important;
  flex-shrink: 0;
}
