/* Availability asterisk + popup (2026-09-08). See static/avail_note.js.
 *
 * The asterisk sits inline beside a player's name or his value, so it has to
 * stay small — but the app's floor is a 44pt tap target (design/HIG_REVIEW_PLAN.md).
 * Resolved the way the AI dock's close button was: a small glyph in a 44px
 * box, with negative margins so the box does not push the row apart.
 */

.availstar {
  /* Undo index.html's global `button { width: 100% }` (the AI FAB needed the
     same escape) and the league pages' bare-button rules. */
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -14px -14px;          /* keep the 44px box, spend no layout on it */
  vertical-align: middle;
  cursor: pointer;
  color: var(--warn, #f59e0b);  /* amber: a caution, not an error */
  font-weight: 900;
  font-size: var(--fs-body, 15px);
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.availstar:hover,
.availstar[aria-expanded="true"] { color: var(--warn-bright, #fcd34d); }
.availstar:focus-visible {
  outline: 2px solid var(--accent, #38bdf8);
  outline-offset: -10px;
  border-radius: 8px;
}

.availnote {
  position: absolute;
  z-index: 90;                  /* over the tab bar (50) and its sheet (54) */
  max-width: min(280px, calc(100vw - 16px));
  padding: 0.55rem 0.7rem;
  background: var(--bg-raised, #334155);
  color: var(--ink, #e2e8f0);
  border: 1px solid var(--line-mid, #64748b);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  font-size: var(--fs-small, 13px);
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  pointer-events: none;         /* never eats the tap that would close it */
}
.availnote[hidden] { display: none !important; }
.availnote-why { font-weight: 600; }
.availnote-basis {
  margin-top: 0.3rem;
  color: var(--ink-2, #cbd5e1);
  font-size: var(--fs-caption, 11px);
  font-weight: 400;
}

/* The same disclosure spelled out in full, for the DETAIL surfaces that have
   the room — the player mini-card and /compare. A comparison page is exactly
   where an unexplained number misleads most, so there it is a block, not a
   glyph you have to find. */
.avail-why {
  margin: 0.5rem 0 0.1rem;
  padding: 0.5rem 0.65rem;
  background: var(--warn-bg, #422006);
  border-left: 3px solid var(--warn, #f59e0b);
  border-radius: 6px;
  color: var(--ink-2, #cbd5e1);
  font-size: var(--fs-small, 13px);
  line-height: 1.45;
  text-align: left;
}
.avail-why b { color: var(--ink, #e2e8f0); font-weight: 700; }
