/* ===== PM5 — подсветка строки и карточка у курсора ===== */
/* Работает с js/hover-preview.js: .hp-group → .hp-item → .hp-card.
   Палитра берётся из upgrade-center.css (--lime, --txt, --mut). */

.hp-group { position: relative; }

/* Полоса подсветки. Лежит под содержимым строки, поэтому у строк .hp-item
   не должно быть своего фона — иначе полосу не видно. */
.hp-bar {
  position: absolute; left: 0; top: 0; width: 100%; height: 0;
  border-radius: 10px; pointer-events: none; opacity: 0; z-index: 0;
  background: var(--lime, #b5ff3b);
  transition: transform .28s cubic-bezier(.22,.61,.36,1),
              height .28s cubic-bezier(.22,.61,.36,1),
              opacity .2s ease;
}
.hp-bar.on { opacity: 1; }

/* Содержимое строки поверх полосы; на подсвеченной строке текст темнеет.
   Правило сплошное (вплоть до `*`), потому что на разных страницах цвета
   расставлены по-своему — вплоть до инлайновых стилей у отдельных span. */
.hp-item { position: relative; z-index: 1; }
.hp-item > * { position: relative; }
.hp-item.hp-on,
.hp-item.hp-on * { color: #05070b !important; transition: color .2s ease; }
.hp-item.hp-on td,
.hp-item.hp-on th { background: transparent !important; }
/* Бейджи внутри строки. Светлые заливки на лаймовой полосе сливаются,
   поэтому на подсвеченной строке они становятся тёмными, а цвет уходит в текст. */
.hp-item.hp-on .sc-pos,
.hp-item.hp-on .sc-ha { color: #05070b; background: rgba(0,0,0,.12); }
.hp-item.hp-on .sc-score,
.hp-item.hp-on .sc-dir,
.hp-item.hp-on .sc-role { background: #05070b !important; }
.hp-item.hp-on .sc-score.w,
.hp-item.hp-on .sc-role.core,
.hp-item.hp-on .sc-dir.in    { color: var(--lime, #b5ff3b) !important; }
.hp-item.hp-on .sc-score.l   { color: #ff8b8b !important; }
.hp-item.hp-on .sc-score.d,
.hp-item.hp-on .sc-role.sub  { color: var(--txt, #eaf1ff) !important; }
.hp-item.hp-on .sc-role.rot,
.hp-item.hp-on .sc-dir.out   { color: #ffc44d !important; }

/* Сама карточка: фиксированная, у курсора, раскрывается из центра. */
.hp-layer {
  position: fixed; left: 0; top: 0; z-index: 4000; pointer-events: none;
  opacity: 0; clip-path: inset(50%);
  transition: clip-path .45s cubic-bezier(.22,.61,.36,1), opacity .2s ease;
  font-family: 'Outfit', system-ui, sans-serif;
}
.hp-layer.on { opacity: 1; clip-path: inset(0%); }

.hp-box {
  min-width: 210px; max-width: 290px; padding: 14px;
  border-radius: 16px; border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, #0c111b, #05070b);
  box-shadow: var(--elev-4);
  color: var(--txt, #eaf1ff);
}
.hp-box-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hp-box-h img { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; }
.hp-box-h .t { font-size: 14px; font-weight: 700; line-height: 1.25; }
.hp-box-h .s { font-size: 11px; color: var(--mut, #8b93a7); margin-top: 2px; }

.hp-shot { display: block; width: 100%; border-radius: 12px; margin-bottom: 10px; }

.hp-score {
  display: inline-block; padding: 5px 12px; border-radius: 10px; margin-bottom: 10px;
  font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.hp-score.w { color: #05070b; background: var(--lime, #b5ff3b); }
.hp-score.d { color: var(--txt, #eaf1ff); background: rgba(255,255,255,.1); }
.hp-score.l { color: #05070b; background: #ff5c5c; }

.hp-rows { display: flex; flex-direction: column; gap: 6px; }
.hp-rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.hp-rows span { color: var(--mut, #8b93a7); }
.hp-rows b { font-weight: 700; font-variant-numeric: tabular-nums; }

.hp-note { margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--mut, #8b93a7); }

/* Мягкий режим: подсветка обводкой, цвета строки не трогаем. Нужен там, где у
   строк уже есть свой фон (карточки матчей, плитки) — сплошная полоса под ним
   всё равно не видна, а инверсия текста ломала бы акценты страницы. */
.hp-group.soft .hp-bar {
  background: rgba(181,255,59,.14);
  border: 1px solid rgba(181,255,59,.5);
  box-sizing: border-box;
}
.hp-group.soft .hp-item.hp-on,
.hp-group.soft .hp-item.hp-on * { color: inherit !important; }
.hp-group.soft .hp-item.hp-on td,
.hp-group.soft .hp-item.hp-on th { background: inherit; }
