/*
 * "IR Helpdesk by Integrated Retail" logo, replacing the default GLPI
 * wordmark everywhere (login page, Self-Service, and Central/technician).
 * Two transparent-PNG variants of the same artwork: white (for the dark
 * navbar background / GLPI's built-in dark mode) and navy (for light
 * backgrounds, e.g. the login page card).
 *
 * Split out from theme.css because this file loads unconditionally
 * (including on the anonymous login page, via ADD_CSS_ANONYMOUS_PAGE),
 * while theme.css's color palette stays Self-Service-only.
 */
:root {
    --glpi-logo-light: url("/plugins/irtheme/img/logo-white-v3.png") !important;
    --glpi-logo-light-reduced: url("/plugins/irtheme/img/logo-white-v3.png") !important;
    --glpi-logo-dark: url("/plugins/irtheme/img/logo-navy.png") !important;
    --glpi-logo-dark-reduced: url("/plugins/irtheme/img/logo-navy.png") !important;
    --glpi-logo-dark-login: url("/plugins/irtheme/img/logo-navy-v2.png") !important;
    --glpi-logo-light-login: url("/plugins/irtheme/img/logo-white-v3.png") !important;
}

/* Our artwork's aspect ratio differs from GLPI's default logo images, so
   force "contain" sizing wherever the logo renders as a background image
   to avoid it being cropped inside the fixed-size logo box. */
.glpi-logo {
    background-size: contain !important;
    background-position: left center !important;
}

/* GLPI's default logo box is quite small (100x55 in the topbar, 200x110 on
   the login page) because its own wordmark is a simple compact graphic.
   Our logo carries more detail (icon + wordmark + "by Integrated Retail" +
   triangle mark), so it needs a bigger box to stay legible - otherwise
   "contain" just shrinks it into a tiny corner of the original space.
   The topbar should grow to fit the logo (kept in normal flow, not
   pulled out with position:absolute - that made it spill below the bar
   instead of living inside it). What actually inflated the bar far beyond
   the logo's own size before was GLPI's default .navbar-brand link padding
   (meant for the tiny stock wordmark) stacking on top of our much taller
   box, leaving visible dead navy space below the logo. Stripping that
   default padding down to a tight wrapper makes the bar hug the logo
   snugly instead of ballooning past it. */
body.horizontal-layout .navbar-brand {
    padding: 6px 20px !important;
    display: flex !important;
    align-items: center !important;
}
body.horizontal-layout .glpi-logo {
    /* New artwork is a flat wide wordmark (~4:1), not the taller icon+stack
       of the old file - box height is matched to that aspect ratio (at the
       widest width available before the nav links) so "contain" fills the
       box exactly, instead of leaving empty margins above/below like a
       box tuned for the old, taller artwork would. */
    width: 420px !important;
    height: 105px !important;
}

/* The vertical sidebar layout (Central, when a technician selects it
   instead of the horizontal topbar) is a tall rail, not a short bar - it
   has plenty of vertical room, and its own flexbox forces the brand area
   down to ~230px wide regardless of what width we ask for. Sizing the box
   to match that real width (rather than a taller box constrained by an
   86px height meant for the horizontal bar) lets the artwork use its full
   available width instead of being additionally squeezed by a too-short
   height. */
.navbar-vertical .glpi-logo {
    width: 230px !important;
    height: 58px !important;
}

.page-anonymous .glpi-logo {
    width: 340px !important;
    height: 190px !important;
}
