/* Altixia branding overrides for the OIDCWarden (Vaultwarden fork) web vault.
 * Served at /css/altixia.css?v=<hash> and loaded via a <link> tag injected by
 * scripts/patch-web-vault.py right after the dynamic /css/vaultwarden.css,
 * so the Altixia palette layers on top.
 * Overrides the --color-brand-* scale (#28669c primary, #2f81c1 accent), and since the 2026 web
 * client also the semantic tokens that no longer derive from it. Every token is !important: the
 * client's own stylesheet loads AFTER this file and redefines them (the palette silently never
 * applied until 25/09/2026). Tokens that no longer derive from --color-brand-*: in the LIGHT theme the « brand »
 * background (primary buttons) is gray-700 upstream, and --color-primary-* are RGB triplets.
 */

:root,
.theme_light {
  --color-brand-050: #eaf4fc !important;
  --color-brand-100: #d3e7f7 !important;
  --color-brand-200: #a5cff0 !important;
  --color-brand-300: #6cb1e3 !important;
  --color-brand-400: #459ed4 !important;
  --color-brand-500: #2f81c1 !important;
  --color-brand-600: #28669c !important;
  --color-brand-700: #21537d !important;
  --color-brand-800: #1b425f !important;
  --color-brand-900: #163349 !important;
  --color-brand-950: #0d1f2b !important;

  --color-background-alt2: 40 102 156 !important;

  /* Semantic brand tokens (upstream light theme maps bg-brand to gray-700). */
  --color-bg-brand: var(--color-brand-600) !important;
  --color-bg-brand-strong: var(--color-brand-700) !important;
  --color-bg-brand-stronger: var(--color-brand-800) !important;
  --color-bg-brand-medium: var(--color-brand-200) !important;
  --color-bg-brand-soft: var(--color-brand-100) !important;
  --color-bg-brand-softer: var(--color-brand-050) !important;
  --color-fg-brand: var(--color-brand-600) !important;
  --color-fg-brand-strong: var(--color-brand-700) !important;
  --color-fg-brand-soft: var(--color-brand-500) !important;
  --color-border-brand: var(--color-brand-600) !important;
  --color-border-brand-strong: var(--color-brand-700) !important;
  --color-border-brand-soft: var(--color-brand-200) !important;

  /* --color-primary-* are « R G B » triplets. */
  --color-primary-100: 211 231 247 !important;
  --color-primary-300: 108 177 227 !important;
  --color-primary-600: 40 102 156 !important;
  --color-primary-700: 33 83 125 !important;
}

.theme_dark {
  --color-brand-050: #0d1f2b !important;
  --color-brand-100: #163349 !important;
  --color-brand-200: #1b425f !important;
  --color-brand-300: #21537d !important;
  --color-brand-400: #28669c !important;
  --color-brand-500: #2f81c1 !important;
  --color-brand-600: #459ed4 !important;
  --color-brand-700: #6cb1e3 !important;
  --color-brand-800: #a5cff0 !important;
  --color-brand-900: #d3e7f7 !important;
  --color-brand-950: #eaf4fc !important;

  --color-background-alt2: 40 102 156 !important;

  /* Dark theme: upstream already derives bg/fg/border-brand from --color-brand-*;
   * only the RGB-triplet primary shades need the Altixia values. */
  --color-primary-100: 13 31 43 !important;
  --color-primary-300: 33 83 125 !important;
  --color-primary-600: 108 177 227 !important;
  --color-primary-700: 165 207 240 !important;
}

/* Re-enable SSO 2-step login flow + force "Use single sign-on" button.
 * Vaultwarden's dynamic /css/vaultwarden.css used to hide these elements
 * and the cached version on clients still does (cache TTL 1d). Override
 * here to make the button visible regardless of any stale CSS cache.
 * Tracking upstream issues: dani-garcia/vaultwarden#6286 #6445 #6737. */
.vw-continue-login,
.vw-email-continue,
.vw-sso-login,
.vw-email-sso {
  display: block !important;
}
