/* Sidebar brand — the tenant logo, laid out as elements.css lays it out
   ==========================================================================
   Was sidebar-brand-centered.css (2026-08-20), which stacked the brand: logo on
   its own line, name and environment centred under it, chevron pinned right.
   Reverted the same day on request — the row is back to elements.css's own
   horizontal [logo] Name/Env  ⇕, and the ONLY thing this file still does is swap
   the placeholder initial for the Electrolux logo.

   Everything that made the stack — the grid on .sidebar__brand, the overrides on
   .sidebar__brand-text and the chevron, the margin-top that centred the logo on
   the header band — is gone rather than commented out. The layout it produced is
   described above if it is ever wanted back; the CSS for it is in git.

   TO REVERT THE REST: delete this file and the five <link> tags that reference it
   (index, dashboard, orders, products, channel), and the brand goes back to the
   placeholder "E" in its tinted box. No markup was ever touched, and ce-ui is
   untouched entirely. */

/* THE 44px -> 52px OVERRIDE THAT LIVED HERE IS GONE (2026-09-07). It came in with
   the centred-brand experiment, to give the stacked logo a taller band to sit on;
   that experiment was reverted the same day and the height was kept only because
   nobody had asked for it back. "Drop its height" (the request that moved the
   global header out of the content card) was answered by deleting this block
   rather than by picking a third number — the header is back on ce-ui's own
   --app-header-height, which is 44 and always was.
   Nothing replaced it: this file no longer touches the header at all, and every
   consumer of --app-header-height, including the shell's new cover layer over the
   rail strip, follows the system's value. */

/* The tenant mark — the Electrolux logo in place of the placeholder "E".

   On a pseudo-element rather than the box itself, because the inversion has to
   apply to the artwork ALONE: the SVG is a single dark navy (#011E41) that would
   vanish on the sidebar, but .sidebar__brand-mark also carries a translucent white
   tint and a border, and a filter on the element would bleach those into a solid
   white square.

   brightness(0) invert(1), not invert(1) on its own: inverting #011E41 gives a warm
   cream (#FEE1BE), which reads as a colour choice nobody made. Flattening to black
   first and then inverting gives pure white, which is what "clearly visible on the
   dark background" means here.

   The letter underneath is hidden with a transparent colour rather than removed —
   this file styles the shell, it does not rewrite shell.js's markup, and the mark's
   text is still the accessible fallback if the asset ever fails to load. */
/* Repoints ce-ui's --sidebar-brand-mark rather than restating the mark's
   width/height (2026-09-07). The size is now read in TWO places — the mark itself
   and the COLLAPSED brand's centring inset (elements.css) — so overriding only the
   width left the collapsed mark off the rail's centre line by half the difference.
   ON .sidebar, NOT ON THE MARK: the collapsed brand is the mark's PARENT and custom
   properties only inherit downward, so a value set on the mark is invisible to the
   rule that needs it. .sidebar is the nearest element both can see. */
.sidebar {
  --sidebar-brand-mark: 28px;
}

.sidebar__brand-mark {
  position: relative;
  color: transparent;
  /* No chrome behind the logo. elements.css gives the mark a translucent white tint
     and a border, which is right for a bare initial in a box — it is what makes "E"
     read as an avatar rather than stray text. A real logo does not need the box, and
     with one the mark reads as a logo inside a button inside a button. */
  background: none;
  border: 0;
  /* 28px (2026-08-20, on request), down from the 32 elements.css sets — this file
     was already restating that size, so the change lives here and ce-ui stays
     untouched. The artwork fills all 28px (inset 0) where the placeholder initial
     rendered at 24px inside a 32px box.
     Knock-on: .sidebar__brand is 6px of padding around this mark, so the tenant row
     goes from 44px tall to 40 with it. Nothing else in the sidebar is measured off
     that row — the nav below it is its own scroller — so only the brand row moves. */

  /* Rounded corners on the logo container (2026-08-20, on request — 8px first,
     then 4px). With the tint and border stripped above there was nothing left to
     show elements.css's own --radius-sm: the square you actually see is the LOGO
     ARTWORK, painted by the ::after below, and a parent's radius does not clip a
     child unless it is told to. Hence the overflow.
     --radius-xs, not a hard 4px: it is 4px at the current Rounder default, and it
     is the step the scale already reserves for exactly this — something nested
     inside a --radius-sm box, which the mark is (see tokens.css's note on
     "outer bigger than inner"). It follows the Roundness setting like the rest of
     the shell, so it drops to 2px under Sharp. */
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.sidebar__brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/logos/electrolux logo.svg") center / contain no-repeat;
  filter: brightness(0) invert(1);
  /* Belt and braces with the overflow above: `filter` gives this its own stacking
     context, and rounding the painted box itself does not depend on the parent's
     clip doing the work. `inherit` so the two curves cannot drift apart. */
  border-radius: inherit;
}

/* Light theme — the inversion above has to come OFF (2026-08-31).
   brightness(0) invert(1) exists to turn the artwork's #011E41 pure white so it
   survives the navy rail. On the Light theme the rail is white, so that same filter
   paints a white logo on a white sidebar: invisible, and invisible in the one way
   nothing else on the rail is, since every other sidebar colour is derived from
   --color-sidebar-on and re-derived itself when the theme flipped. This asset is the
   one hard-coded inversion in the shell, so it is the one thing that needed saying
   twice.
   `filter: none` restores the SVG's own navy, which is what the mark is supposed to
   be on a light ground — the logo as drawn, not a re-tint of it.
   Here rather than in tokens.css or elements.css because the logo is this
   prototype's own experiment (see this file's header): ce-ui knows nothing about the
   Electrolux asset, and a theme in the system should not have to.
   LIGHT IS THE ONLY THEME HERE AGAIN (2026-09-07). New briefly joined it, for the
   same reason — a pale rail is a light ground — and went when the themes were
   consolidated to three. This stays the one selector a future light-rail theme has
   to be added to by hand, precisely because this asset is the one hard-coded colour
   in the shell: everything else on the rail derives from --color-sidebar-on and
   re-derives itself when a theme moves.
   NOTE FOR THE L-SHAPED SHELL: that shape paints the global HEADER in
   --color-sidebar too, but the mark is not in the header, so nothing here needs a
   shape guard. */
:root[data-theme="light"] .sidebar__brand-mark::after {
  filter: none;
}

/* The CHANNELENGINE lockup in the rail's footer — the other logo, and the other
   thing the Light theme breaks (2026-09-08, on request: "the channelengine logo is
   not visible in light mode").

   THE ASSET IS TWO INKS, WHICH IS WHY NO FILTER FIXES IT. channelengine-logo.png is
   the blue mark (#2196F3-ish) beside a WHITE wordmark — drawn for the navy rail, and
   on Light's pale-blue rail the wordmark is white on near-white while the mark stays
   perfectly visible. So the sidebar shows a mark and a blank. `invert(1)` would darken
   the wordmark and turn the blue mark orange; brightness(0) would flatten both to one
   colour and throw the brand away. The Electrolux mark above could take a filter
   because it is ONE ink; this one cannot.
   A SECOND ASSET, then — assets/logos/channelengine-logo-dark.png, the same artwork
   with the wordmark repainted in the brand navy (#18294F, the Classic rail's own
   colour) and the blue mark untouched, pixel for pixel. Generated from ce-ui's PNG
   and checked in beside the channel logos, the way this prototype's other artwork is.
   `content:` ON AN <img>, not a background on a wrapper: it replaces the rendered
   image in place and leaves the element's own box, sizing (.sidebar__logo's 18px
   height) and alt text exactly as ce-ui set them. Nothing here touches shell.js's
   markup or ce-ui's stylesheets, so deleting this block is the whole revert.
   ONLY THE LOCKUP. .sidebar__logo--mark (the collapsed rail's square mark) is the
   blue arrows alone with no white in it, so it already reads on a light rail and is
   deliberately left alone.
   WHY HERE AND NOT IN ce-ui: same reason as the tenant logo above — an asset swap is
   not a token repoint, and a theme in the system should not have to know about a
   second copy of a brand file. If Light becomes the default this belongs upstream as
   a proper light-ink asset. Any future light-rail theme has to be added to this
   selector by hand, exactly as the note above says of the tenant mark. */
:root[data-theme="light"] .sidebar__logo:not(.sidebar__logo--mark) {
  content: url("assets/logos/channelengine-logo-dark.png");
}
