/* rebrand.css — pairs with rebrand.js (../static/rebrand.js).
   CSS handles the cases where text replacement is too slow or doesn't
   reach: img tags, sprite SVGs, the splash-screen logo. The JS handles
   visible text. */

/* Hide Supabase wordmarks/logos that we can target by selector. These
   keep the layout intact (no `display: none` reflow flashes) by zeroing
   their visibility but preserving size where possible. */
img[alt*="Supabase" i],
img[src*="supabase-logo" i],
[class*="supabase-logo" i],
[data-testid*="supabase-logo" i] {
  visibility: hidden !important;
}

/* The sidebar header in self-hosted Studio renders the Supabase wordmark
   as inline SVG with class "supabase-logo-wordmark". Some Studio builds
   use different class names — these catch the common ones. */
.supabase-logo,
.supabase-logo-wordmark {
  visibility: hidden !important;
  position: relative;
}

/* When we hide the logo container, drop in our DPL chip in its place
   via a background-image. The container's existing width/height is
   preserved so layout doesn't shift. */
.supabase-logo::after,
.supabase-logo-wordmark::after,
img[alt*="Supabase" i]::after {
  content: "DPL";
  visibility: visible;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6cb144, #becd33);
  color: #182239;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Soften Studio's signature green to DPL's exact brand green where
   it shows up as a flat fill on small brand chips. We're conservative
   here — only override on classes that look brand-specific, not on
   every green in the UI (which would break charts, buttons, etc.). */
:root {
  /* If we ever needed to override CSS custom properties Studio
     exposes, this is the spot. Left empty intentionally — Studio's
     palette is close enough to DPL that recoloring causes more harm
     than good. */
}
