/*
 * Sempya brand overrides for Zammad 7.1's compiled frontend.
 *
 * Loaded AFTER /assets/application-<hash>.css (injected via an nginx
 * sub_filter in nginx-sempya-brand.conf, see the Dockerfile in this
 * directory). It only redefines a curated subset of the ~127 CSS custom
 * properties Zammad's stylesheet declares on :root -- many other variables
 * reference these via var(...) (e.g. --menu-background-active,
 * --text-button-primary), so the rebrand cascades without touching them.
 *
 * Deliberately NOT overridden -- semantic ticket-status colors staff read
 * at a glance (priority/SLA): --supergood-color, --good-color, --ok-color,
 * --bad-color, --superbad-color, --danger-color, --pending-color,
 * --ghost-color. Recoloring those would make people misread urgency.
 *
 * Because Zammad's own [data-theme=dark] block loads BEFORE this file,
 * a bare :root override here would also beat the dark-theme values (equal
 * specificity, later in cascade wins). So every variable that dark mode
 * legitimately re-tunes gets re-asserted in the [data-theme=dark] block
 * at the bottom with a dark-appropriate value.
 *
 * Sempya palette: brown #503925, orange #ec9725, ochre #b5790a,
 * terracotta #b2402f, cream #f7f4ef, umber #1c1611.
 */

:root {
  /* Primary action color: Sempya orange. Default was Zammad blue
     hsl(203,65%,55%). --menu-background-active, --text-button-primary(-active)
     follow via var(). */
  --button-primary-background: #ec9725;
  --button-primary-background-active: #d1830f;
  /* Default primary-button text is white -- unreadable on orange (~2:1).
     Near-umber dark text keeps the button branded AND legible. */
  --button-primary-text: #2a1e12;

  /* Headings: Sempya brown, with a warm muted secondary. */
  --header-primary: #503925;
  --header-secondary: #a3937f;

  /* Links + left-nav text accent: ochre (readable on light backgrounds;
     raw orange is too light for text on white). */
  --text-link: #b5790a;
  --text-nav: #b5790a;

  /* Selection/focus accent: orange instead of Zammad blue. */
  --highlight: #ec9725;
  --border-highlight: #ec9725;
  --background-highlight: #fbeed8; /* warm tint replacing light-blue row highlight */
  --shadow-highlight: #f0dfc2;     /* warm focus-ring glow */

  /* App chrome: umber/dark-brown replacing the blue-slate sidebar. */
  --menu-background-primary: #1c1611;
  --menu-background-secondary: #2e2418;
  --background-active: #503925;    /* active taskbar/tab background (text stays white) */
  --fullscreen-background: #1c1611; /* login page backdrop */
}

/* Dark theme: re-assert what Zammad's own dark block tunes, since this file
   outranks it in the cascade. Orange accents stay; neutrals go back to (or
   become warm equivalents of) their dark values. */
[data-theme=dark] {
  --header-primary: #ffffff;
  --header-secondary: hsl(198, 5%, 73%);
  --text-link: #ec9725;            /* raw orange reads well on dark */
  --text-nav: hsl(205, 1%, 84%);
  --highlight: #ec9725;
  --border-highlight: #ec9725;
  --background-highlight: #46351d; /* warm dark replacing hsl(205,30%,27%) */
  --shadow-highlight: #6b4e23;     /* warm dark replacing hsl(205,42%,36%) */
  --background-active: var(--highlight);
  --menu-background-primary: #14100c;
  --menu-background-secondary: #1c1611;
  --fullscreen-background: #14100c;
}

/* Hide the "Powered by Zammad" footer + origami-bird logo on the login
   page (app/views/login.jst.eco -> compiled into application.js, class
   "poweredBy", not a DB setting -- there's nothing to configure here,
   just a static template block). Requested 2026-08-26. */
.poweredBy {
  display: none;
}

/* Hide "Register as a new customer" on the login page (also a static
   template block, gated by the user_create_account Setting -- disabling
   that setting instead would ALSO remove the #signup route itself, not
   just this link, which is a bigger change than "hide the link" -- CSS
   is the closer match to what was asked). The :has() rules additionally
   collapse the wrapping <p> and preceding <hr> when this link is their
   only content, so no orphaned divider is left behind; a browser without
   :has() support just keeps hiding the link itself via the first rule. */
a[href="#signup"] {
  display: none;
}
p:has(> a[href="#signup"]:only-child) {
  display: none;
}
hr:has(+ p > a[href="#signup"]:only-child) {
  display: none;
}
