/*
 * Logicplanes brand for GitLab (brand v0.4.0-alpha). Served at /logicplanes-brand/logicplanes-brand.css
 * from /var/opt/gitlab/gitlab-rails/shared/lp-brand and linked into every page by nginx sub_filter.
 *
 * The uploaded appearance logos are the transparent `-black` renders (#0a0a0a). <img> cannot read the
 * theme, so dark surfaces turn them into exact brand white: brightness(0) flattens to black, invert(1)
 * makes it #ffffff. GitLab's theme is a user setting: `gl-dark` is Dark, `gl-system` is Auto and follows
 * the device. GitLab chrome itself is not restyled.
 */

html.gl-dark img[src*="/appearance/header_logo/"],
html.gl-dark img[src*="/appearance/logo/"] {
  filter: brightness(0) invert(1);
}

@media (prefers-color-scheme: dark) {
  html.gl-system img[src*="/appearance/header_logo/"],
  html.gl-system img[src*="/appearance/logo/"] {
    filter: brightness(0) invert(1);
  }
}

/* Transparent marks: no circular crop, plate or shadow behind them. */
img[src*="/appearance/header_logo/"],
img[src*="/appearance/logo/"] {
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain;
}

/* The sign-in logo is the horizontal lockup: size it by height, keep its proportions. */
.html-devise-layout img[src*="/appearance/logo/"] {
  width: auto;
  max-width: min(18rem, 80vw);
}
