/* ============================================================================
   MAITRI brand logo — mirrors the iOS MaitriBrandLogo component.

   A brand mark on a chip that stays LIGHT in BOTH day and night. This is the
   key idea: brand guidelines assume a light background, so a dark or black mark
   (Apple, Visa) never disappears in night mode. A soft warm off-white in night
   keeps the chip from being harsh.

   Resolution chain (see brandlogo.js):
     1. bundled official SVG  -> logos/<slug>.svg, full color, offline, private
     2. (production-only proxy -> off by default, skipped in the demo)
     3. brand-tinted monogram -> the deep tintLight color, on the same light chip

   The monogram fallback reuses the existing .provlogo footprint but recolored
   onto the light chip, so a logo and a monogram occupy one calm, consistent
   shape. Each deep tint clears WCAG 3:1 on the light chip (verified on iOS,
   tints copied verbatim from the shared brands.json).
   ========================================================================== */

:root {
  --brandlogo-chip: #ffffff;          /* light chip, day */
  --brandlogo-border: #e9e1d6;        /* 1px border, day */
}
[data-theme="night"] {
  --brandlogo-chip: #ede9e2;          /* soft warm off-white, night */
  --brandlogo-border: #cfc7ba;        /* 1px border, night */
}

/* the chip — sized like the existing icon tiles (.provlogo 44, .avatar 40) */
.brandlogo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--brandlogo-chip);
  border: 1px solid var(--brandlogo-border);
  box-sizing: border-box;
}

/* the official mark, inset so it breathes on the chip (matches iOS padding) */
.brandlogo__img {
  width: 68%;
  height: 68%;
  object-fit: contain;
  display: block;
}

/* the monogram fallback: deep brand tint as text on the SAME light chip.
   Reuses .provlogo type treatment but recolors it for the light surface. */
.brandlogo--mono {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: var(--fs-title);
  letter-spacing: var(--tracking-tight);
  /* color is set inline per brand from the registry tintLight */
  color: var(--color-text);
}

/* size variant to match the 40px .avatar rows in mydata screens */
.brandlogo--40 { width: 40px; height: 40px; }
.brandlogo--40.brandlogo--mono { font-size: var(--fs-caption); }
