/* ==========================================================================
   Tooltips: generic info tip, unit tooltip, trait/item/boon content
   ========================================================================== */

.tip, .unit-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  pointer-events: none !important;
  max-width: 21rem;
  padding: 0.75rem 0.85rem 0.8rem;
  background: linear-gradient(180deg, rgba(22, 26, 58, 0.96), rgba(8, 10, 26, 0.97));
  border-color: rgba(232, 193, 112, 0.45);
}
.tip-in { animation: tipIn 0.16s var(--ease-out); }
@keyframes tipIn { from { opacity: 0; transform: translateY(0.3rem) scale(0.98); } to { opacity: 1; transform: none; } }
.tt-section { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin: 0.1rem 0 0.35rem; }
.tt-hint { margin-top: 0.5rem; font-size: 0.7rem; color: var(--text-3); font-style: italic; }

/* ---------- Unit tooltip ---------------------------------------------- */
.unit-tip { width: 20rem; border-top: 2px solid var(--cc, var(--gold)); }
.unit-tip.pinned { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 1.5rem rgba(232, 193, 112, 0.3), var(--shadow); }
.unit-tip.dead { filter: grayscale(0.7); }
.tt-head { display: flex; align-items: center; gap: 0.7rem; }
.tt-portrait { width: 3.9rem; height: 3.9rem; border-radius: 0.45rem; flex: none; border: 2px solid var(--cc, var(--gold)); font-size: 0.95rem; box-shadow: 0 0 0.9rem color-mix(in srgb, var(--cc, #e8c170) 45%, transparent); }
.tt-head-info { flex: 1; min-width: 0; }
.tt-name { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; line-height: 1.12; color: #fff; }
.tt-sub { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.15rem; font-size: 0.74rem; color: var(--text-2); font-weight: 700; }
.tt-cost { display: inline-flex; align-items: center; gap: 0.12rem; color: #ffe08a; font-weight: 900; }
.tt-cost.creep { color: #ffab5c; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.66rem; }
.tt-stars { margin-top: 0.1rem; font-size: 1rem; letter-spacing: 0.04em; line-height: 1; }
.tt-stars span { color: rgba(255, 255, 255, 0.14); }
.tt-stars span.on { color: #ffd66b; text-shadow: 0 0 0.45rem rgba(255, 214, 107, 0.85); }
.tt-team { align-self: flex-start; padding: 0.1rem 0.4rem; border-radius: 0.25rem; font-size: 0.6rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.tt-team.t0 { background: rgba(63, 208, 255, 0.18); color: #9fe6ff; border: 1px solid rgba(63, 208, 255, 0.45); }
.tt-team.t1 { background: rgba(255, 77, 94, 0.18); color: #ffb3bc; border: 1px solid rgba(255, 77, 94, 0.45); }
.tt-traits { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.6rem; }
.tt-live { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.25rem; }
.tt-bar { position: relative; height: 1rem; border-radius: 0.25rem; background: rgba(0, 0, 0, 0.6); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.tt-mp { height: 0.7rem; }
.tt-bar-fill { position: absolute; inset: 0; transform-origin: left; transition: transform 0.12s linear; }
.tt-bar-fill.hp { background: linear-gradient(180deg, #6fe39a, #2a9c57); z-index: 1; }
.tt-bar-fill.shield { background: repeating-linear-gradient(135deg, rgba(235, 242, 255, 0.85) 0 4px, rgba(190, 205, 230, 0.7) 4px 8px); }
.tt-bar-fill.mana { background: linear-gradient(180deg, #8ec2ff, #2f6fd8); }
.tt-bar-text { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; font-size: 0.66rem; font-weight: 800; color: #fff; text-shadow: 0 0 2px #000, 0 0 3px #000, 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.tt-mp .tt-bar-text { font-size: 0.56rem; }
.tt-statuses { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.tt-status { font-size: 0.66rem; font-weight: 700; padding: 0.05rem 0.35rem; border-radius: 0.25rem; background: rgba(255, 255, 255, 0.08); }
.tt-status.shield { background: rgba(220, 230, 255, 0.14); color: #e6eeff; }
.tt-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.18rem 0.8rem; margin-top: 0.65rem; padding: 0.5rem 0.55rem; border-radius: 0.4rem; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.05); }
.tt-stat { display: flex; align-items: center; gap: 0.3rem; font-size: 0.74rem; min-width: 0; }
.tt-stat-ico { font-size: 0.72rem; width: 1rem; text-align: center; }
.tt-stat-label { color: var(--text-3); font-weight: 600; flex: 1; white-space: nowrap; }
.tt-stat-val { font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt-stat-add { color: var(--green); font-weight: 800; }
.tt-ability { margin-top: 0.65rem; }
.tt-ability-head { display: flex; align-items: center; gap: 0.4rem; }
.tt-ability-ico { color: #b98cff; font-size: 0.9rem; text-shadow: 0 0 0.5rem rgba(185, 140, 255, 0.8); }
.tt-ability-name { font-family: var(--font-display); font-weight: 700; font-size: 0.88rem; color: var(--gold-hi); flex: 1; }
.tt-mana { display: inline-flex; align-items: center; gap: 0.1rem; font-size: 0.72rem; font-weight: 800; color: #8ec2ff; }
.tt-ability-desc { margin-top: 0.25rem; font-size: 0.78rem; line-height: 1.45; color: var(--text-2); }
.tt-ability-desc .num { color: #ffe08a; }
.tt-items { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.35rem; padding-top: 0.5rem; border-top: 1px solid rgba(232, 193, 112, 0.18); }
.tt-item-row { display: flex; gap: 0.5rem; align-items: flex-start; }
.tt-item-row-name { font-weight: 800; font-size: 0.76rem; }
.tt-item-row-desc { font-size: 0.7rem; color: var(--text-3); line-height: 1.35; }
.tt-lore { margin-top: 0.6rem; font-size: 0.72rem; font-style: italic; color: var(--text-3); line-height: 1.4; }

/* ---------- Trait tooltip -------------------------------------------- */
.tip-trait { width: 19rem; }
.tt-trait-head { display: flex; align-items: center; gap: 0.6rem; }
.tt-trait-name { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: #fff; }
.tt-trait-kind { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.tt-trait-count { color: var(--gold); letter-spacing: 0.06em; }
.tt-trait-desc { margin-top: 0.5rem; font-size: 0.78rem; color: var(--text-2); line-height: 1.45; }
.tt-tiers { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.18rem; }
.tt-tier { display: flex; gap: 0.5rem; align-items: baseline; font-size: 0.76rem; color: var(--text-3); padding: 0.18rem 0.4rem; border-radius: 0.3rem; }
.tt-tier-bp { font-weight: 900; min-width: 1.6rem; font-variant-numeric: tabular-nums; }
.tt-tier.past { color: var(--text-2); }
.tt-tier.cur { color: #fff; background: rgba(232, 193, 112, 0.14); box-shadow: inset 0.15rem 0 0 var(--gold); }
.tt-tier.cur .tt-tier-bp { color: var(--gold-hi); }
.tt-champs { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.6rem; padding-top: 0.5rem; border-top: 1px solid rgba(232, 193, 112, 0.15); }
.tt-champ { display: flex; flex-direction: column; align-items: center; gap: 0.12rem; width: 3.2rem; opacity: 0.45; filter: grayscale(0.8); }
.tt-champ.owned { opacity: 1; filter: none; }
.tt-champ-portrait { width: 2.4rem; height: 2.4rem; border-radius: 0.35rem; border: 2px solid var(--cc); font-size: 0.55rem; }
.tt-champ-name { font-size: 0.56rem; font-weight: 700; text-align: center; line-height: 1.1; color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Item tooltip --------------------------------------------- */
.tip-item { width: 18rem; }
.tt-item-head { display: flex; align-items: center; gap: 0.6rem; }
.tt-item-name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: #fff; }
.tt-item-kind { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.tt-item-stats { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.tt-item-stats span { font-size: 0.72rem; font-weight: 800; color: var(--green); background: rgba(93, 224, 138, 0.1); padding: 0.08rem 0.4rem; border-radius: 0.25rem; }
.tt-item-desc { margin-top: 0.45rem; font-size: 0.76rem; color: var(--text-2); line-height: 1.45; }
.tt-combos { margin-top: 0.6rem; padding-top: 0.5rem; border-top: 1px solid rgba(232, 193, 112, 0.15); display: flex; flex-direction: column; gap: 0.2rem; }
.tt-combo { display: flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; }
.tt-combo-plus { color: var(--text-3); font-weight: 800; font-size: 0.7rem; }
.tt-combo-name { font-weight: 700; color: var(--text); }
.tt-recipe { margin-top: 0.6rem; display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; font-size: 0.72rem; }
.tt-recipe .tt-section { margin: 0 0.3rem 0 0; }
.tt-recipe-name { font-weight: 700; }

/* ---------- Boon tooltip --------------------------------------------- */
.tt-boon { max-width: 16rem; }
.tt-boon-tier { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.tt-boon-name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin: 0.1rem 0 0.3rem; }
.tt-boon-desc { font-size: 0.78rem; color: var(--text-2); line-height: 1.45; }

/* Hero banner when painted splash art exists */
.unit-tip.with-hero { padding-top: 0; overflow: hidden; }
.tt-hero { position: relative; height: 8.2rem; margin: 0 -0.85rem -2.6rem; border-bottom: 1px solid color-mix(in srgb, var(--cc) 55%, transparent); overflow: hidden; }
.tt-hero .tt-hero-img { object-position: 50% 24%; }
.tt-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 10, 26, 0) 35%, rgba(8, 10, 26, 0.92) 100%); }
.unit-tip.with-hero .tt-head { position: relative; z-index: 1; padding: 0 0.1rem; }
.unit-tip.with-hero .tt-name { font-size: 1.2rem; text-shadow: 0 0.1rem 0.4rem #000; }
.unit-tip.with-hero .tt-team { position: absolute; right: 0; top: -5rem; }
