/*
 * glpimod - custom logos (since 1.8.0)
 *
 * GLPI 12 draws its logos from these CSS variables (css/includes/_base.scss). Overriding them here replaces
 * every logo without touching the GLPI files in public/pics, so GLPI updates no longer undo the branding.
 * Images are served by /plugins/glpimod/brand.php (colour variant if uploaded, otherwise the main logo).
 *
 * The URLs MUST be absolute: a relative url() inside a CSS variable is resolved against the stylesheet that
 * uses the variable (GLPI's css_glpi.min.css), which pointed to /brand.php in 1.8.0. They assume GLPI at the
 * root of the domain; glpimod_logos.js sets the exact URL in any case (and is the only one used on the login
 * page, where requests go through AJAX so that samlsso does not keep them as the page to open after login).
 * Loaded on logged-in pages only.
 */
:root,
html,
body {
    --glpi-logo-light: url("/plugins/glpimod/brand.php?r=logo_m&v=white") !important;
    --glpi-logo-light-reduced: url("/plugins/glpimod/brand.php?r=logo_s&v=white") !important;
    --glpi-logo-dark: url("/plugins/glpimod/brand.php?r=logo_m&v=black") !important;
    --glpi-logo-dark-reduced: url("/plugins/glpimod/brand.php?r=logo_s&v=black") !important;
    --glpi-logo-dark-login: url("/plugins/glpimod/brand.php?r=logo_l&v=black") !important;
    --glpi-logo-light-login: url("/plugins/glpimod/brand.php?r=logo_l&v=white") !important;
}

/* Dashboards (standalone, fullscreen and embedded views use a fixed image instead of the variables) */
.glpi_logo {
    background-image: url("/plugins/glpimod/brand.php?r=logo_m&v=black") !important;
}
.fullscreen .glpi_logo,
.embed .glpi_logo {
    background-image: url("/plugins/glpimod/brand.php?r=logo_m&v=white") !important;
}
