/* Per-tenant accent contract (consumed by TenantThemeResolver output + the --brand
   indirection below). Defaults resolve to the Terroir pine family, so an unbranded
   tenant, a global admin on no tenant, and the very first paint of EVERY page all
   render the Terroir look with ZERO flash-of-default-then-swap. A branded tenant's
   MainLayout HeadContent emits a LATER :root block overriding --app-accent (+ contrast
   / soft / surface-2); everything reads the variables, never the literals. */
:root {
    --app-accent: var(--pine-solid);
    --app-accent-contrast: var(--on-pine);
    --app-accent-soft: var(--pine-tint);
    --app-surface-2: var(--surface-2);

    /* Brand primary = the tenant accent when present, else Terroir pine. The UI
       component palette and the primary button read these, so a tenant's colour brands all
       primary actions/controls without recolouring the (deliberately pine) rail. */
    --brand: var(--app-accent);
    --brand-contrast: var(--app-accent-contrast);
    --brand-soft: var(--app-accent-soft);
}

h1:focus {
    outline: none;
}

/* Validation + Blazor error UI, restyled onto the Terroir palette. */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--pine);
}

.invalid {
    outline: 1px solid var(--wine);
}

.validation-message {
    color: var(--wine);
    font-size: var(--t--1);
}

.blazor-error-boundary {
    background: var(--wine);
    color: #fff;
    padding: 0.85rem 1rem;
    border-radius: var(--r-sm);
    box-shadow: var(--sh-1);
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}