/*
 * The information icon (info-tip.js). Every rule is scoped under [data-info-tip-ready] so a page's own broad rules
 * (".field span", ".task-form footer span", ".field small") cannot reshape it.
 */
.bridge-info[data-info-tip-ready] {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin: 0 0 0 4px;
  padding: 0;
  font: inherit;
  font-weight: 400;
  color: inherit;
}
.bridge-info[data-info-tip-ready] .bridge-info-button {
  display: inline-grid;
  place-items: center;
  /* 24 × 24: the smallest target WCAG 2.2 (2.5.8) allows. The ring drawn inside is 18 px. */
  width: 24px;
  height: 24px;
  min-width: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--brand, #007b77);
  cursor: pointer;
  line-height: 1;
}
.bridge-info[data-info-tip-ready] .bridge-info-glyph {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font: 700 11px/1 Georgia, "Times New Roman", serif;
  font-style: italic;
  color: inherit;
}
/* The "i" is drawn, not written: a symbol, not words to translate (the page holds no text for it). */
.bridge-info[data-info-tip-ready] .bridge-info-glyph::before { content: "i"; }
.bridge-info[data-info-tip-ready] .bridge-info-button:hover .bridge-info-glyph,
.bridge-info[data-info-tip-ready].is-open .bridge-info-glyph { background: var(--brand, #007b77); color: #fff; border-color: var(--brand, #007b77); }
.bridge-info[data-info-tip-ready] .bridge-info-button:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 1px; }
.bridge-info[data-info-tip-ready] .bridge-info-text {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  display: block;
  width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  margin: 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: #1f2430;
  color: #fff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.22);
  font: 400 13px/1.45 var(--tenant-font, Inter, "Segoe UI", system-ui, sans-serif);
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
}
.bridge-info[data-info-tip-ready] .bridge-info-text[hidden] { display: none !important; }

/* A field's name and its icon share a line. */
.bridge-info-name { display: inline !important; margin: 0 !important; font: inherit; color: inherit; }

/* A heading followed by its icon keeps them on one line. */
h1:has(+ .bridge-info[data-info-tip-ready]),
h2:has(+ .bridge-info[data-info-tip-ready]) { display: inline-block; }

/* The Work page's footer pushes its save line left with an automatic margin: the icon beside it does not. */
.task-form footer .bridge-info[data-info-tip-ready] { margin: 0 4px 0 0; flex: none; }

/*
 * On a phone a field's help stays a visible line under its name, as before: a hint hidden behind a tap is missed
 * where forms are filled on site. The icon is not drawn there.
 */
@media (max-width: 640px) {
  .bridge-info--field[data-info-tip-ready] { display: block; margin: 4px 0 0; }
  .bridge-info--field[data-info-tip-ready] .bridge-info-button { display: none; }
  .bridge-info--field[data-info-tip-ready] .bridge-info-text,
  .bridge-info--field[data-info-tip-ready] .bridge-info-text[hidden] {
    display: block !important;
    position: static;
    width: auto;
    max-width: none;
    padding: 0;
    background: none;
    box-shadow: none;
    color: var(--muted, #667085);
    font-size: 11px;
  }
}
