/*
 * DXC theme for GitLab (StrikeForce), aligned with BHC (src/app/globals.css).
 * Injected by nginx (sub_filter) on every page.
 *
 * GitLab defines its palette in :root / .gl-light-scope / :root.ui-* / .ui-*-scope (light) and again in
 * :root.gl-dark / .gl-dark-scope (dark). BHC uses warm "sand" neutrals in light and Midnight in dark, so each
 * mode gets its own palette. The dark block repeats every selector with .gl-dark in front so it always wins.
 * Status colors (red, green, orange) are left untouched on purpose.
 * Re-check token names after a GitLab major upgrade (they live in /assets/application*.css).
 */

/* ======================= LIGHT: sand (BHC light) ======================= */
:root, .gl-light-scope,
:root.ui-neutral, :root.ui-indigo, :root.ui-blue, :root.ui-green, :root.ui-red, :root.ui-gray,
.ui-neutral-scope, .ui-indigo-scope, .ui-blue-scope, .ui-green-scope, .ui-red-scope, .ui-gray-scope {
  --gl-color-neutral-0: #ffffff;    /* card */
  --gl-color-neutral-10: #fdfcfb;   /* BHC background */
  --gl-color-neutral-50: #f6f3f0;   /* sand */
  --gl-color-neutral-100: #ece9e6;  /* BHC border */
  --gl-color-neutral-200: #d1cfcd;  /* BHC input */
  --gl-color-neutral-300: #b4b2b0;
  --gl-color-neutral-400: #8a8c97;
  --gl-color-neutral-500: #6e7180;
  --gl-color-neutral-600: #5a5f70;  /* BHC muted text */
  --gl-color-neutral-700: #3f4352;
  --gl-color-neutral-800: #262836;
  --gl-color-neutral-900: #161824;
  --gl-color-neutral-950: #0e1020;  /* Midnight */
  --gl-color-neutral-1000: #090a14; /* BHC foreground */

  --gl-color-blue-50: #edf4ff;
  --gl-color-blue-100: #d3e5ff;
  --gl-color-blue-200: #a9ccff;
  --gl-color-blue-300: #77aeff;
  --gl-color-blue-400: #4995ff;     /* True Blue */
  --gl-color-blue-500: #2a78e8;
  --gl-color-blue-600: #0f5fcc;
  --gl-color-blue-700: #004aac;     /* Royal: links (8.15:1) */
  --gl-color-blue-800: #003b8a;
  --gl-color-blue-900: #002c68;
  --gl-color-blue-950: #001e47;

  --gl-application-chrome-background-color: #f6f3f0; /* sidebar and top bar: sand */
  --gl-background-color-default: #ffffff;

  /* Primary button: solid Midnight */
  --gl-button-confirm-primary-background-color-default: #0e1020;
  --gl-button-confirm-primary-background-color-hover: #262836;

  /* Left menu: active item solid Midnight with white text (BHC) */
  --gl-nav-item-background-color-active: #0e1020;
  --gl-nav-item-foreground-color-active: #ffffff;
  --gl-nav-item-background-color-hover: #ece9e6;
  --gl-nav-item-selected-indicator-color: #ff7e51;
}

/* ======================= DARK: Midnight (BHC dark) ======================= */
:root.gl-dark, .gl-dark-scope,
:root.gl-dark.ui-neutral, :root.gl-dark.ui-indigo, :root.gl-dark.ui-blue,
:root.gl-dark.ui-green, :root.gl-dark.ui-red, :root.gl-dark.ui-gray,
:root.gl-dark .ui-neutral-scope, :root.gl-dark .ui-indigo-scope, :root.gl-dark .ui-blue-scope,
:root.gl-dark .ui-green-scope, :root.gl-dark .ui-red-scope, :root.gl-dark .ui-gray-scope {
  --gl-color-neutral-0: #ffffff;
  --gl-color-neutral-10: #f2f2f2;   /* BHC dark foreground */
  --gl-color-neutral-50: #e4e5ea;
  --gl-color-neutral-100: #c9cbd4;
  --gl-color-neutral-200: #a9acb8;
  --gl-color-neutral-300: #8b8e9c;
  --gl-color-neutral-400: #6e7181;
  --gl-color-neutral-500: #555868;
  --gl-color-neutral-600: #3f4253;
  --gl-color-neutral-700: #2c2f40;  /* borders (~white 10% on card) */
  --gl-color-neutral-800: #1f2232;
  --gl-color-neutral-900: #181a28;
  --gl-color-neutral-950: #121421;  /* BHC dark card */
  --gl-color-neutral-1000: #0b0c14; /* BHC dark background */

  --gl-color-blue-50: #e8f1ff;
  --gl-color-blue-100: #c4dcff;
  --gl-color-blue-200: #6fa9ff;     /* links in dark: True Blue, a step lighter */
  --gl-color-blue-300: #5c9fff;
  --gl-color-blue-400: #4995ff;     /* True Blue: focus */
  --gl-color-blue-500: #2a78e8;
  --gl-color-blue-600: #0f5fcc;
  --gl-color-blue-700: #004aac;
  --gl-color-blue-800: #0c1e3a;     /* tinted backgrounds (BHC dark chip) */
  --gl-color-blue-900: #0a172d;
  --gl-color-blue-950: #071022;

  --gl-application-chrome-background-color: #0b0c14;
  --gl-background-color-default: #121421;

  /* Primary button: light tint (M7) */
  --gl-button-confirm-primary-background-color-default: #e4e5ea;
  --gl-button-confirm-primary-background-color-hover: #f2f2f2;

  /* Secondary button and inputs as in BHC dark (GitLab uses this button everywhere: border kept at 25%) */
  --gl-button-default-primary-background-color-default: rgba(255, 255, 255, 0.05);
  --gl-button-default-primary-background-color-hover: rgba(255, 255, 255, 0.1);
  --gl-button-default-primary-border-color-default: rgba(242, 242, 242, 0.25);
  --gl-button-default-primary-border-color-hover: rgba(242, 242, 242, 0.4);
  --gl-control-background-color-default: #0b0c14;

  /* Left menu: active item light tint 9% with white text (M3) */
  --gl-nav-item-background-color-active: rgba(255, 255, 255, 0.09);
  --gl-nav-item-foreground-color-active: #ffffff;
  --gl-nav-item-background-color-hover: rgba(255, 255, 255, 0.05);
  --gl-nav-item-selected-indicator-color: #ff7e51;
}

/* ---------- Active menu item: 3 px bar with the DXC gradient (BHC) ---------- */
.gl-nav-item.selected::before {
  background: linear-gradient(180deg, #4995ff 0%, #ff7e51 40%, #ffae41 70%, #ffc982 100%);
}

/* ---------- Sign-in logo: "StrikeForce" in white on dark backgrounds ---------- */
:root.gl-dark img.js-portrait-logo-detection {
  content: url("/-/dxc/logo-login-oscuro.png");
}

/* ---------- DXC gradient: a line, never a text fill ---------- */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4995ff 0%, #ff7e51 40%, #ffae41 70%, #ffc982 100%);
  z-index: 2000;
  pointer-events: none;
}
