/* ────────────────────────────────────────────────────────────────────────
   Shared tooltip system — ONE mechanism for the whole app (Terminal + Report).
   Markup:  <span class="tip-wrap"><span class="tip-i">i</span>
              <div class="tip-box"><div class="tip-title">…</div>
                <div class="tip-text">…</div><div class="tip-example">…</div></div></span>
   Behaviour + positioning live in Pages/Shared/_Tooltips.cshtml (hover + tap).
   Global on/off is the "TIPS" toggle (body.tips-off), set in Terminal Settings and
   honoured on every page. Gated to Pro/Sysadmin via permissions.tipsEnabled.
   ──────────────────────────────────────────────────────────────────────── */

/* Canonical trigger icon — a CSS-drawn circled "i" (cross-platform consistent,
   unlike the Unicode ⓘ glyph). */
.tip-i{
  display:inline-flex;align-items:center;justify-content:center;
  width:14px;height:14px;border-radius:50%;
  border:1px solid var(--border2);color:var(--text3);
  font-size:9px;font-style:italic;font-family:var(--font-cond, monospace);
  line-height:1;cursor:help;vertical-align:middle;flex:0 0 auto;
}
.tip-i:hover{color:var(--text2);border-color:var(--text3);}

.tip-wrap{position:relative;}

.tip-box{
  display:none;
  position:fixed;
  width:220px;
  background:var(--bg2);
  border:1px solid var(--border2);
  border-radius:8px;
  padding:10px 12px;
  z-index:9999;
  pointer-events:none;
  box-shadow:0 4px 20px rgba(0,0,0,0.3);
  animation:tipFade .15s ease;
  /* Tooltip body always reads as plain sentences, even inside an uppercase/tracked title. */
  text-transform:none;letter-spacing:normal;
}
.tip-box.visible{display:block;}
.tip-box::after{
  content:'';position:absolute;
  bottom:100%;left:var(--arrow-left, 50%);
  border:5px solid transparent;
  border-bottom-color:var(--border2);
}
@keyframes tipFade{
  from{opacity:0;transform:translateY(-4px)}
  to{opacity:1;transform:translateY(0)}
}

/* Global TIPS off → hide every tooltip (one switch for all). */
body.tips-off .tip-box{display:none !important;}

/* dtable overrides — JS positioned, keep fixed */
.dtable .tip-wrap{display:inline-block;width:100%;}
.dtable .tip-box{width:230px;}

.tip-title{font-family:var(--font-mono);font-size:9px;letter-spacing:.1em;color:var(--green);text-transform:uppercase;margin-bottom:5px;}
.tip-text{font-size:11px;color:var(--text2);line-height:1.5;}
.tip-example{font-family:var(--font-mono);font-size:9px;color:var(--text3);margin-top:5px;padding-top:5px;border-top:1px solid var(--border);}
/* Teaching assessment (UX slice 3) — the "what's good?" line under a metric's definition. */
.tip-verdict{font-size:10.5px;line-height:1.5;margin-top:6px;padding-top:6px;border-top:1px solid var(--border);color:var(--text2);}
.tip-verdict.good{color:var(--green);}
.tip-verdict.warn{color:var(--gold);}
.tip-verdict.bad{color:var(--red);}
.tip-verdict.info{color:var(--blue);}
