/* Global FitPath styles, shared by the Web and Mobile hosts.
   Referenced as _content/FitPath.Portal/css/fitpath.css from each host's index.html, after MudBlazor.min.css.

   Plain CSS with custom properties (no LESS/SCSS): scoped .razor.css files use the --fp-* tokens below instead of
   hard-coded values.
   - Colors live in Theme/FitPathTheme.cs (MudTheme). MudThemeProvider writes them as --mud-palette-* variables and
     switches them with the user's theme (System/Light/Dark); the --fp-* color names are aliases of those.
   - The --fp-boot-* fallbacks only matter before Blazor starts (the loading screen), so they follow the OS setting. */

:root {
    --fp-boot-bg: #f6f7f9;
    --fp-boot-text: #14181f;
    --fp-boot-accent: #1f8a5b;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fp-boot-bg: #0f1216;
        --fp-boot-text: #eef1f5;
        --fp-boot-accent: #3fbf86;
    }
}

:root {
    /* Colors (follow the MudBlazor theme) */
    --fp-bg: var(--mud-palette-background, var(--fp-boot-bg));
    --fp-surface: var(--mud-palette-surface, var(--fp-boot-bg));
    --fp-text: var(--mud-palette-text-primary, var(--fp-boot-text));
    --fp-muted: var(--mud-palette-text-secondary, var(--fp-boot-text));
    --fp-border: var(--mud-palette-lines-default, transparent);
    --fp-accent: var(--mud-palette-primary, var(--fp-boot-accent));
    --fp-on-accent: var(--mud-palette-primary-text, #ffffff);
    --fp-accent-soft: color-mix(in srgb, var(--fp-accent) 14%, transparent);
    --fp-danger: var(--mud-palette-error, var(--fp-border));

    /* Spacing scale */
    --fp-space-1: 0.25rem;
    --fp-space-2: 0.5rem;
    --fp-space-3: 0.75rem;
    --fp-space-4: 1rem;
    --fp-space-5: 1.5rem;
    --fp-space-6: 2rem;

    /* Shape */
    --fp-radius: var(--mud-default-borderradius, 8px);
    --fp-border-width: 1px;
    --fp-focus-width: 2px;

    /* Type */
    --fp-font-size-sm: 0.875rem;
    --fp-font-size-lg: 1.125rem;
    --fp-font-size-hero: clamp(2rem, 6vw, 3rem);
    --fp-line-height-tight: 1.1;
    --fp-line-height-relaxed: 1.6;
    --fp-measure: 40rem; /* comfortable line length for body text */

    /* Sizes */
    --fp-menu-width: 16rem;
    --fp-field-min-width: 12rem; /* a form field never gets narrower than this before fields wrap */

    /* Phones with a notch / home indicator (viewport-fit=cover) */
    --fp-safe-top: env(safe-area-inset-top, 0px);
    --fp-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    margin: 0;
    background: var(--fp-bg);
    color: var(--fp-text);
}

h1:focus {
    outline: none;
}
