/* ============================================
   Tooltip — a small anchored contextual label.

   The surface chrome (inverse-surface fill, inverse-on-surface ink, hairline
   border, level3 elevation, small radius, edge-flip) is owned by the composed
   <xm-overlay> in the `tooltip` tier — this file styles only the LABEL the
   tooltip projects into the overlay, plus the trigger wrapper.

   The label is a neutral, sentence-cased description — NO severity color, no
   per-severity hue (AD-11). The ink is inverse-on-surface, inherited from the
   overlay surface; it is restated here so the label reads correctly even if the
   cascade is interrupted.

   Motion (short3 fade/translate) is owned by the overlay's open transition.

   BEM block: `tooltip`. Registered in scripts/check-bem.sh STRICT_BLOCKS.
   Elements: __trigger (the anchored control wrapper), __label (the copy).
   ============================================ */

.tooltip__trigger {
  display: inline-flex;
  align-items: center;
}

/* Delegate mode wraps a whole subtree rather than one control, so it must not
   impose a box of its own on the layout it is watching. */
.tooltip__area {
  display: contents;
}

.tooltip__label {
  display: block;
  /* Compact label scale; sentence case enforced by content, no transform. */
  font-family: var(--md-sys-typescale-body-small-font);
  font-size: var(--md-sys-typescale-body-small-size);
  line-height: var(--md-sys-typescale-body-small-line-height);
  letter-spacing: var(--md-sys-typescale-body-small-tracking);
  /* Neutral popover-stack ink (matches the overlay surface). */
  color: var(--md-sys-color-inverse-on-surface);
  padding: var(--s-1-5) var(--s-2);
  /* The surface shrink-wraps to max-content and caps at 260px, so a short label
     stays on one line and only a long one reaches the cap and wraps here. */
  text-wrap: pretty;
}
