/*
 * Zeppelin Keycloak admin console theme — Exotec branding.
 *
 * Overrides only the PatternFly 5 CSS custom properties Keycloak's own
 * admin console (keycloak.v2) reads for theming (see design.md Decision 5).
 * No `url(...)` references — the logo/favicon are resolved solely via
 * theme.properties (`logo=`) against the imported `common/zeppelin` assets,
 * sidestepping any `styles=`/`import=` resolution ambiguity for in-CSS
 * asset URLs (see design.md Risks).
 *
 * Palette values are reused as-is from the zeppelin login theme's CSS
 * (keycloak-custom-login/theme/zeppelin/login/resources/css/login.css) so
 * the login and admin surfaces share one brand palette (design.md
 * Decision 6):
 *   --zep-teal        #20868f  -> primary/brand and link color
 *   --zep-teal-action #146a72  -> primary/link hover
 *   --zep-blue-deep   #0f416b  -> nav/header background, light mode; accent only in dark mode
 *   --zep-blue-action #185e96  -> active-nav-item accent
 *   --zep-navy        #050b18  -> header/nav background, dark mode
 *   --zep-surface-dark #1b1d21 -> content-area background, dark mode (neutral, not brand blue)
 *   --zep-danger      #dc2626
 *   --zep-success     #16a34a
 */

:root {
  --zep-teal: #20868f;
  --zep-teal-action: #146a72;
  --zep-blue-deep: #0f416b;
  --zep-blue-action: #185e96;
  --zep-navy: #050b18;
  --zep-danger: #dc2626;
  --zep-success: #16a34a;

  /* Primary/brand color and hover state */
  --pf-v5-global--primary-color--100: var(--zep-teal);
  --pf-v5-global--primary-color--200: var(--zep-teal-action);

  /* Active nav item accent */
  --pf-v5-global--active-color--100: var(--zep-blue-action);

  /* Link color and hover state */
  --pf-v5-global--link--Color: var(--zep-teal);
  --pf-v5-global--link--Color--hover: var(--zep-teal-action);

  /* Page background (light mode: white content area) */
  --pf-v5-global--BackgroundColor--light-100: #ffffff;

  /* Nav/header background (light mode) */
  --pf-v5-global--BackgroundColor--dark-300: var(--zep-blue-deep);
  --pf-v5-global--BackgroundColor--100: var(--zep-blue-deep);
  --pf-v5-global--BackgroundColor--dark-100: var(--zep-blue-deep);
  --pf-v5-global--palette--black-1000: var(--zep-blue-deep);

  /* Primary text color. Color--light-100 is a FIXED swatch (PatternFly's
     Nav component always reads it for link text, since the sidebar is
     always dark in both light and dark page modes). Color--dark-100 is
     NOT fixed — components like Table/Card self-scope both
     Color--dark-100 (their text) and BackgroundColor--light-100 (their
     background) together, and BackgroundColor--light-100 legitimately
     flips dark in dark mode (see below), so Color--dark-100 must flip
     light in tandem to stay readable — see the .pf-v5-theme-dark block. */
  --pf-v5-global--Color--100: #1f2333;
  --pf-v5-global--Color--light-100: #ffffff;
  --pf-v5-global--Color--dark-100: #1f2333;

  /* Danger / success */
  --pf-v5-global--danger-color--100: var(--zep-danger);
  --pf-v5-global--success-color--100: var(--zep-success);

  --pf-v5-global--FontFamily--text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.pf-v5-theme-dark {
  --zep-surface-dark: #1b1d21;

  /* Primary/brand color (dark mode uses the --300 token) and hover state */
  --pf-v5-global--primary-color--300: var(--zep-teal);
  --pf-v5-global--primary-color--200: var(--zep-teal-action);

  /* Active nav item accent */
  --pf-v5-global--active-color--100: var(--zep-blue-action);

  /* Link color and hover state */
  --pf-v5-global--link--Color: var(--zep-teal);
  --pf-v5-global--link--Color--hover: var(--zep-teal-action);

  /* Page background (dark mode: neutral dark gray content area, distinct
     from the navy header/nav below). Deliberately NOT the brand blue
     (--zep-blue-deep) — a saturated brand color covering the entire
     content surface (tables, cards, form fields) fights with that content
     and fatigues the eye over long admin sessions. Brand color is reserved
     for the header/nav and accents (links, active states, buttons); the
     content area uses PatternFly's own stock neutral dark surface. */
  --pf-v5-global--BackgroundColor--light-100: var(--zep-surface-dark);

  /* Nav/header background (dark mode) */
  --pf-v5-global--BackgroundColor--dark-300: var(--zep-navy);
  --pf-v5-global--BackgroundColor--100: var(--zep-navy);
  --pf-v5-global--BackgroundColor--dark-100: var(--zep-navy);
  --pf-v5-global--palette--black-1000: var(--zep-navy);

  /* Primary text color. Color--light-100 stays the same fixed white swatch
     as light mode — the Nav sidebar's text must not flip to dark just
     because the overall page is in dark mode, since its background is
     still the dark navy set above. Color--dark-100, however, MUST flip to
     a light value here: Table/Card (and similar) components pair
     Color--dark-100 with BackgroundColor--light-100 as their own
     text/background, and BackgroundColor--light-100 is now dark
     (--zep-blue-deep, above) — so Color--dark-100 has to become light too,
     or their text becomes illegible dark-on-dark (this was the cause of
     the unreadable Keys/Users tables and dropdown menus in dark mode). */
  --pf-v5-global--Color--100: #ffffff;
  --pf-v5-global--Color--light-100: #ffffff;
  --pf-v5-global--Color--dark-100: #ffffff;

  /* Table row separators (and other hairline borders) read BorderColor--100
     (PatternFly's Table component sets --pf-v5-c-table--BorderColor from
     it directly). Stock PatternFly's dark-mode value (#444548, a mid-gray)
     has very low contrast against our --zep-blue-deep table background,
     making row lines nearly invisible. Use a translucent white instead so
     it stays visible against any of our dark surfaces. */
  --pf-v5-global--BorderColor--100: rgba(255, 255, 255, 0.28);

  /* Danger / success */
  --pf-v5-global--danger-color--100: var(--zep-danger);
  --pf-v5-global--success-color--100: var(--zep-success);

  --pf-v5-global--FontFamily--text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
