/*
 * Re-point the Compound --cpd-* tokens MAS reads to the binding values from
 * ticket #15536 Scope 3 (copied from packages/theme/tokens.css, light on
 * :root, dark under @media prefers-color-scheme — the nurion.com theme cookie
 * is unreadable on matrix.nurion.tech). Unlayered on purpose: Compound ships
 * its tokens inside @layer, so an unlayered rule wins at equal specificity.
 * Values are complete colour values (hsl()), because Compound resolves these
 * custom properties straight into color/background/border.
 */

:root {
  --cpd-color-bg-canvas-default: hsl(0 0% 100%);
  --cpd-color-bg-subtle-primary: hsl(216 20% 92%);
  --cpd-color-bg-subtle-secondary: hsl(0 0% 100%);
  --cpd-color-text-primary: hsl(220 47% 15%);
  --cpd-color-icon-primary: hsl(220 47% 15%);
  --cpd-color-text-secondary: hsl(215 20% 40%);
  --cpd-color-icon-secondary: hsl(215 20% 40%);
  --cpd-color-bg-action-primary-rest: hsl(220 47% 15%);
  --cpd-color-bg-action-primary-hovered: hsl(220 47% 15% / 0.8);
  --cpd-color-bg-action-primary-pressed: hsl(220 47% 15% / 0.8);
  --cpd-color-bg-text-on-solid-primary: hsl(0 0% 100%);
  --cpd-color-text-on-solid-primary: hsl(0 0% 100%);
  --cpd-color-border-interactive-primary: hsl(216 20% 86%);
  --cpd-color-border-focused: hsl(199 100% 53%);
  --cpd-color-text-critical-primary: hsl(0 72% 47%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --cpd-color-bg-canvas-default: hsl(220 47% 10%);
    --cpd-color-bg-subtle-primary: hsl(212 45% 16%);
    --cpd-color-bg-subtle-secondary: hsl(214 45% 13%);
    --cpd-color-text-primary: hsl(210 40% 96%);
    --cpd-color-icon-primary: hsl(210 40% 96%);
    --cpd-color-text-secondary: hsl(214 22% 78%);
    --cpd-color-icon-secondary: hsl(214 22% 78%);
    --cpd-color-bg-action-primary-rest: hsl(210 40% 96%);
    --cpd-color-bg-action-primary-hovered: hsl(210 40% 96% / 0.8);
    --cpd-color-bg-action-primary-pressed: hsl(210 40% 96% / 0.8);
    --cpd-color-bg-text-on-solid-primary: hsl(220 47% 10%);
    --cpd-color-text-on-solid-primary: hsl(220 47% 10%);
    --cpd-color-border-interactive-primary: hsl(212 45% 16%);
    --cpd-color-border-focused: hsl(199 100% 53%);
    --cpd-color-text-critical-primary: hsl(0 62% 64%);
  }
}

/* Mirrors Nurion ID's @nurion/ui default button: rounded-lg (0.5rem). */
.cpd-button {
  border-radius: 0.5rem;
}

/* Wordmark mirrors kratos-selfservice-ui/app/components/AuthLayout.tsx:
   fixed top-left, 24px inset, 12px high, foreground at 15% opacity. */
.nurion-wordmark {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 50;
  color: var(--cpd-color-text-primary);
  opacity: 0.15;
}

.nurion-wordmark svg {
  display: block;
  height: 12px;
  width: auto;
}
