/*
    The bridge between the DevSite brand and riho.

    BrandHead.razor writes the brand into --ssp-primary, --ssp-background and --ssp-font; everything below
    turns those into the variables riho reads, so the vendored stylesheet is never edited.
    No colour literal appears here - VIEW-05.
*/

:root {
    /* The theme's own spelling of "default", typo included - riho/css/style.css:118. Renaming
       it here would mean editing 1.3 MB of vendored CSS that the next upgrade replaces. */
    --theme-deafult: var(--ssp-primary);
    --theme-secondary: color-mix(in srgb, var(--ssp-primary) 45%, gray);
    /* riho's bundled Bootstrap fills form controls and list groups from this one. */
    --bs-body-bg: var(--ssp-background);
}

/* riho paints its page area and its top bar from literals rather than from variables
   (style.css:42039 and :43049, the same grey twice), so for this template the background has
   to reach the elements directly instead of through a name the theme reads. */
.page-wrapper .page-body-wrapper,
.page-wrapper .page-header .header-wrapper {
    background-color: var(--ssp-background);
}

/* riho's sidebar rail is painted with the brand colour (style.css:44145), so the name
   standing in for a missing logo has to be light rather than the colour it is sitting on. */
.sidebar-wrapper .ssp-brand,
.page-header .ssp-brand {
    color: white;
}

/* riho's login_one markup asks for .bg-img-cover and .bg-center, and the purchase ships
   neither - grep both across riho/css and nothing comes back. Without them the cover
   photograph renders at its natural size and pushes the sign-in card off the page. */
.bg-img-cover {
    width: 100%;
    height: 100vh;
    object-fit: cover;
}

.bg-center {
    object-position: center;
}

/* riho hard-codes Montserrat at style.css:3686, so the brand font needs the plain body rule. */
body {
    font-family: var(--ssp-font), Roboto, system-ui, sans-serif;
}

/* Only in light mode: the theme's dark palette owns the page colour once it is switched on. */
body:not([data-theme-version="dark"]) {
    background-color: var(--ssp-background);
}

/* The logo is an image of unknown proportions, so it is bounded rather than sized. */
.ssp-logo {
    max-height: 2.5rem;
    max-width: 11rem;
    width: auto;
}

/* Bounded rather than sized, so a tall banner cannot push the sign-in form off the page. */
.ssp-banner {
    max-width: 100%;
    max-height: 20rem;
    height: auto;
}

/* No logo: the site name stands in, in the brand colour. */
.ssp-brand {
    font-family: var(--font-family-title, var(--ssp-font));
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ssp-primary);
    white-space: nowrap;
}
