/* Hint of a button-like control (core/hint.ts): a compact tooltip in the top layer, centred under the control and
   flipped above it when the window is short of room, so a toolbar or a scrolling list never clips it. */
[part=base] {
  anchor-name: --bythium-hint;
}
[part=hint] {
  position: fixed;
  inset: auto;
  margin: 0;
  inline-size: max-content;
  max-inline-size: min(280px, 80vw);
  padding-block: 4px;
  padding-inline: 8px;
  overflow: visible;
  border: 1px solid var(--bythium-border-subtle);
  border-radius: var(--radius-control);
  background: var(--bythium-surface-overlay);
  color: var(--bythium-text-primary);
  box-shadow: var(--shadow-overlay);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* Hover bridge: the pointer crosses the gap to the hint without closing it (WCAG 1.4.13). */
[part=hint]::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block: -7px -7px;
}
@supports (position-area: block-end) and (position-try-fallbacks: flip-block) {
  [part=hint] {
    position-anchor: --bythium-hint;
    position-area: block-end;
    margin-block-start: 6px;
    position-try-fallbacks: flip-block;
  }
}
/* Without anchor positioning the hint would float at the top of the window: it stays hidden, the name still speaks. */
@supports not ((position-area: block-end) and (position-try-fallbacks: flip-block)) {
  [part=hint] {
    display: none;
  }
}
@media (forced-colors: active) {
  [part=hint] {
    border-color: CanvasText;
  }
}
