/*
 * William Walker UI foundation — design tokens
 *
 * Load this file before foundation.css, components.css and app-shell.css.
 * The values intentionally reference the existing dashboard tokens where
 * available, so this package follows the current brand without changing it.
 */

:root {
    /* Colour roles */
    --ww-color-brand: var(--ww-forest, #2d6a4f);
    --ww-color-brand-strong: var(--ww-meadow, #245a42);
    --ww-color-brand-subtle: var(--ww-accent-light, #e8f5ee);
    --ww-color-canvas: var(--ww-moon, #f5f5f0);
    --ww-color-surface: var(--ww-snow, #ffffff);
    --ww-color-surface-subtle: #FCFBF8;
    --ww-color-surface-raised: #ffffff;
    --ww-color-text: var(--ww-text, #1a1a1a);
    --ww-color-text-muted: var(--ww-text-muted, #71716b);
    /* RM-21 (G-0349): dritte Textfarbe mit mindestens 4,5:1 auf Moon, Weiß und
     * den hellen Flächen der Filter (vorher #8B877C mit 3,4:1). Einzige Quelle,
     * base.html und die Portale lesen sie von hier. */
    --ww-text-ter: #736F64;
    --ww-color-text-tertiary: var(--ww-text-ter);
    --ww-color-border: var(--ww-border, #e5e5e0);
    --ww-color-border-subtle: var(--ww-border-light, #eeeeea);
    --ww-color-focus: #2F7144;
    --ww-color-focus-ring: rgba(47, 113, 68, .28);
    /* Standardfarbe für Links ohne eigene Klasse im Inhaltsbereich, als RGB-Tripel,
     * weil Bootstrap seine Linkfarbe so erwartet (--bs-link-color-rgb). Entspricht
     * --ww-color-brand und --ww-color-brand-strong. */
    --ww-color-link-rgb: 47, 113, 68;
    --ww-color-link-hover-rgb: 17, 62, 32;

    --ww-color-success: var(--ww-success, #16a34a);
    --ww-color-success-subtle: var(--ww-success-light, #e8f5ee);
    --ww-color-warning: var(--ww-warning, #d97706);
    --ww-color-warning-subtle: var(--ww-warning-light, #fef9e7);
    --ww-color-danger: var(--ww-danger, #dc2626);
    --ww-color-danger-subtle: var(--ww-danger-light, #fef2f2);
    --ww-color-info: var(--ww-info, #1e40af);
    --ww-color-info-subtle: var(--ww-info-light, #eff6ff);
    --ww-color-neutral: #5E5D58;
    --ww-color-neutral-subtle: #F1ECE2;

    /* Typography */
    --ww-font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --ww-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --ww-font-size-xs: .6875rem;
    --ww-font-size-sm: .75rem;
    --ww-font-size-base: .8125rem;
    --ww-font-size-md: .875rem;
    --ww-font-size-lg: 1rem;
    --ww-font-size-xl: 1.25rem;
    --ww-font-size-2xl: 1.5rem;
    --ww-line-height-tight: 1.2;
    --ww-line-height-normal: 1.5;
    --ww-font-weight-medium: 500;
    --ww-font-weight-semibold: 600;
    --ww-font-weight-bold: 700;

    /* Space, shape and elevation */
    --ww-space-1: .25rem;
    --ww-space-2: .5rem;
    --ww-space-3: .75rem;
    --ww-space-4: 1rem;
    --ww-space-5: 1.25rem;
    --ww-space-6: 1.5rem;
    --ww-space-8: 2rem;
    --ww-space-10: 2.5rem;
    /* Existing --ww-radius-xs/sm values are preserved for legacy pages. */
    --ww-radius-xs: 6px;
    --ww-radius-sm: 8px;
    --ww-radius-md: 8px;
    --ww-radius-lg: 12px;
    --ww-radius-xl: 16px;
    --ww-shadow-xs: 0 1px 2px rgba(0, 0, 0, .04);
    --ww-shadow-sm: 0 1px 3px rgba(0, 0, 0, .04);
    --ww-shadow-md: 0 8px 20px rgba(0, 0, 0, .08);
    --ww-shadow-lg: 0 20px 48px rgba(0, 0, 0, .14);

    /* Interaction */
    --ww-touch-min: 44px;
    --ww-duration-fast: 120ms;
    --ww-duration-normal: 180ms;
    --ww-ease-standard: cubic-bezier(.2, 0, 0, 1);
    --ww-control-height-sm: 2rem;
    --ww-control-height: 2.375rem;
    --ww-control-height-lg: 2.75rem;
    --ww-content-max-width: none;
    --ww-sidebar-width: 16.5rem;
    --ww-sidebar-width-collapsed: 4.5rem;
    --ww-workspace-rail-width: 4.25rem;
    --ww-context-nav-width: 15rem;

    /* Fit below the existing Bootstrap modal/backdrop stack (1055/1050).
       The shell must never remain above a legacy modal while pages migrate. */
    --ww-z-dropdown: 1045;
    --ww-z-sticky: 1040;
    --ww-z-overlay: 1050;
    --ww-z-dialog: 1055;
    --ww-z-toast: 1090;
}
