/* Styles that apply the theme to MudBlazor's own components where MudThemeProvider can't (Theming/AppTheme.cs).
   Loaded after MudBlazor.min.css so these win. Colours only from var(--mud-*) and var(--app-*): see
   docs/theming-plan.md. */

/* Headings: the theme's heading colour, unless the page asks for one (Color="..." adds a *-text class). */
.mud-typography:is(.mud-typography-h1, .mud-typography-h2, .mud-typography-h3,
                   .mud-typography-h4, .mud-typography-h5, .mud-typography-h6):not([class*="-text"]) {
    color: var(--app-heading);
}

/* Buttons: the theme's shape (STAR: pill-shaped, like the website). */
.mud-button {
    border-radius: var(--app-button-radius);
}

/* Filled primary buttons: the theme's button colour (STAR: salmon), while Color.Primary elsewhere stays purple. */
.mud-button-filled.mud-button-filled-primary:not(.mud-disabled):not(:disabled) {
    background-color: var(--app-button-fill);
    color: var(--app-button-fill-text);
    --mud-ripple-color: var(--app-button-fill-text);
}

.mud-button-filled.mud-button-filled-primary:not(.mud-disabled):not(:disabled):hover,
.mud-button-filled.mud-button-filled-primary:not(.mud-disabled):not(:disabled):focus-visible,
.mud-button-filled.mud-button-filled-primary:not(.mud-disabled):not(:disabled):active {
    background-color: color-mix(in srgb, var(--app-button-fill) 85%, var(--mud-palette-text-primary));
}

/* Outlined primary buttons: a 2px border like the website. The inset shadow adds the second pixel without making
   the button taller than a filled one beside it. */
.mud-button-outlined.mud-button-outlined-primary:not(.mud-disabled):not(:disabled) {
    border-color: var(--app-button-outline);
    box-shadow: inset 0 0 0 1px var(--app-button-outline);
    color: var(--app-button-outline-text);
    --mud-ripple-color: var(--app-button-outline);
}

.mud-button-outlined.mud-button-outlined-primary:not(.mud-disabled):not(:disabled):hover,
.mud-button-outlined.mud-button-outlined-primary:not(.mud-disabled):not(:disabled):focus-visible,
.mud-button-outlined.mud-button-outlined-primary:not(.mud-disabled):not(:disabled):active {
    border-color: var(--app-button-outline);
    background-color: color-mix(in srgb, var(--app-button-outline) 10%, transparent);
}
