@sensiblestats/widget-react 0.26.2 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -816,8 +816,15 @@ function initials(name) {
816
816
  function shortSeason(season) {
817
817
  return season.replace(/\d{4}/g, (year) => year.slice(2));
818
818
  }
819
- function Crest({ image }) {
820
- return /* @__PURE__ */ jsx6("span", { className: "ss-w-ecard-crest", style: { backgroundImage: `url(${image})` }, "aria-hidden": "true" });
819
+ function Crest({ image, label }) {
820
+ return /* @__PURE__ */ jsx6(
821
+ "span",
822
+ {
823
+ className: "ss-w-ecard-crest",
824
+ style: { backgroundImage: `url(${image})` },
825
+ ...label ? { role: "img", title: label, "aria-label": label } : { "aria-hidden": "true" }
826
+ }
827
+ );
821
828
  }
822
829
  function FormBar({ w, d, l }) {
823
830
  if (w + d + l === 0) return null;
@@ -827,73 +834,73 @@ function FormBar({ w, d, l }) {
827
834
  l > 0 ? /* @__PURE__ */ jsx6("span", { className: "ss-w-form-l", style: { flexGrow: l } }) : null
828
835
  ] });
829
836
  }
830
- function StatRows({ stats }) {
831
- return /* @__PURE__ */ jsx6("div", { className: "ss-w-ecard-stats", children: stats.map((s) => {
832
- const m = RECORD_RE.exec(s.value);
833
- return /* @__PURE__ */ jsxs4("div", { className: "ss-w-ecard-row", children: [
834
- /* @__PURE__ */ jsx6("span", { className: "ss-w-ecard-rlabel", children: s.label }),
835
- m ? /* @__PURE__ */ jsx6(FormBar, { w: Number(m[1]), d: Number(m[2]), l: Number(m[3]) }) : /* @__PURE__ */ jsx6("span", {}),
836
- /* @__PURE__ */ jsx6("span", { className: "ss-w-ecard-rval", children: s.value })
837
- ] }, s.label);
838
- }) });
839
- }
840
- function CardBody({ c }) {
841
- const [active, setActive] = useState(0);
842
- if (c.scopes.length === 0) return null;
843
- const season = c.season ? /* @__PURE__ */ jsx6("span", { className: "ss-w-ecard-season", children: shortSeason(c.season) }) : null;
844
- if (c.scopes.length === 1) {
845
- const only = c.scopes[0];
846
- return /* @__PURE__ */ jsxs4("div", { className: "ss-w-ecard-body", children: [
847
- /* @__PURE__ */ jsxs4("div", { className: "ss-w-ecard-tabs ss-w-ecard-tabs-static", children: [
848
- /* @__PURE__ */ jsxs4("span", { className: "ss-w-ecard-lead", title: only.label, children: [
849
- only.image ? /* @__PURE__ */ jsx6(Crest, { image: only.image }) : null,
850
- /* @__PURE__ */ jsx6("span", { className: "ss-w-ecard-lead-txt", children: only.label })
851
- ] }),
852
- season
853
- ] }),
854
- /* @__PURE__ */ jsx6(StatRows, { stats: only.stats })
837
+ function StatCellView({ s }) {
838
+ const m = RECORD_RE.exec(s.value);
839
+ if (m) {
840
+ return /* @__PURE__ */ jsxs4("div", { className: "ss-w-ecard-cell", children: [
841
+ /* @__PURE__ */ jsx6("span", { className: "ss-w-ecard-cval", children: /* @__PURE__ */ jsx6(FormBar, { w: Number(m[1]), d: Number(m[2]), l: Number(m[3]) }) }),
842
+ /* @__PURE__ */ jsx6("span", { className: "ss-w-ecard-clabel", children: s.value })
855
843
  ] });
856
844
  }
857
- const current = c.scopes[active] ?? c.scopes[0];
858
- return /* @__PURE__ */ jsxs4("div", { className: "ss-w-ecard-body", children: [
859
- /* @__PURE__ */ jsxs4("div", { className: "ss-w-ecard-tabs", role: "tablist", children: [
860
- c.scopes.map((s, i) => /* @__PURE__ */ jsx6(
861
- "button",
862
- {
863
- type: "button",
864
- role: "tab",
865
- className: "ss-w-ecard-tab",
866
- "aria-selected": i === active,
867
- "aria-label": s.label,
868
- title: s.label,
869
- onClick: () => setActive(i),
870
- children: s.image ? /* @__PURE__ */ jsx6(Crest, { image: s.image }) : s.label
871
- },
872
- String(s.competitionId ?? "all")
873
- )),
874
- season
845
+ return /* @__PURE__ */ jsxs4("div", { className: "ss-w-ecard-cell", children: [
846
+ /* @__PURE__ */ jsx6("span", { className: "ss-w-ecard-cval", children: s.value }),
847
+ /* @__PURE__ */ jsx6("span", { className: "ss-w-ecard-clabel", children: s.label })
848
+ ] });
849
+ }
850
+ function StatStrip({ stats }) {
851
+ if (stats.length === 0) return null;
852
+ const cols = Math.min(stats.length, 4);
853
+ return /* @__PURE__ */ jsx6("div", { className: "ss-w-ecard-strip", style: { gridTemplateColumns: `repeat(${cols}, 1fr)` }, children: stats.map((s) => /* @__PURE__ */ jsx6(StatCellView, { s }, s.label + s.value)) });
854
+ }
855
+ function CardHeader({ c, showScopeCrest }) {
856
+ const onlyScope = c.scopes.length === 1 ? c.scopes[0] : null;
857
+ return /* @__PURE__ */ jsxs4("div", { className: "ss-w-ecard-hd", children: [
858
+ /* @__PURE__ */ jsx6(
859
+ "span",
860
+ {
861
+ className: c.kind === "team" ? "ss-w-thumb ss-w-team" : "ss-w-thumb",
862
+ style: c.image ? { backgroundImage: `url(${c.image})` } : void 0,
863
+ children: c.image ? "" : initials(c.name)
864
+ }
865
+ ),
866
+ /* @__PURE__ */ jsxs4("span", { className: "ss-w-ecard-idtext", children: [
867
+ /* @__PURE__ */ jsx6("span", { className: "ss-w-nm", children: c.name }),
868
+ c.sub ? /* @__PURE__ */ jsx6("span", { className: "ss-w-sub", children: c.sub }) : null
875
869
  ] }),
876
- /* @__PURE__ */ jsx6(StatRows, { stats: current.stats }, String(current.competitionId ?? "all"))
870
+ /* @__PURE__ */ jsxs4("span", { className: "ss-w-ecard-meta", children: [
871
+ showScopeCrest && onlyScope?.image ? /* @__PURE__ */ jsx6(Crest, { image: onlyScope.image, label: onlyScope.label }) : null,
872
+ c.season ? /* @__PURE__ */ jsx6("span", { className: "ss-w-ecard-season", children: shortSeason(c.season) }) : null
873
+ ] })
877
874
  ] });
878
875
  }
876
+ function ScopeTabs({ scopes, active, onSelect }) {
877
+ return /* @__PURE__ */ jsx6("div", { className: "ss-w-ecard-scopes", role: "tablist", children: scopes.map((s, i) => /* @__PURE__ */ jsx6(
878
+ "button",
879
+ {
880
+ type: "button",
881
+ role: "tab",
882
+ className: "ss-w-ecard-scope",
883
+ "aria-selected": i === active,
884
+ "aria-label": s.label,
885
+ title: s.label,
886
+ onClick: () => onSelect(i),
887
+ children: s.image ? /* @__PURE__ */ jsx6(Crest, { image: s.image }) : s.label
888
+ },
889
+ String(s.competitionId ?? "all")
890
+ )) });
891
+ }
879
892
  function EntityCardItem({ c }) {
893
+ const [active, setActive] = useState(0);
880
894
  const hasBody = c.scopes.length > 0;
881
- return /* @__PURE__ */ jsxs4("div", { className: hasBody ? "ss-w-ecard" : "ss-w-ecard ss-w-ecard-bare", "data-kind": c.kind, children: [
882
- /* @__PURE__ */ jsxs4("div", { className: "ss-w-ecard-id", children: [
883
- /* @__PURE__ */ jsx6(
884
- "span",
885
- {
886
- className: c.kind === "team" ? "ss-w-thumb ss-w-team" : "ss-w-thumb",
887
- style: c.image ? { backgroundImage: `url(${c.image})` } : void 0,
888
- children: c.image ? "" : initials(c.name)
889
- }
890
- ),
891
- /* @__PURE__ */ jsxs4("span", { className: "ss-w-ecard-idtext", children: [
892
- /* @__PURE__ */ jsx6("span", { className: "ss-w-nm", children: c.name }),
893
- c.sub ? /* @__PURE__ */ jsx6("span", { className: "ss-w-sub", children: c.sub }) : null
894
- ] })
895
- ] }),
896
- /* @__PURE__ */ jsx6(CardBody, { c })
895
+ if (!hasBody) {
896
+ return /* @__PURE__ */ jsx6("div", { className: "ss-w-ecard ss-w-ecard-bare", "data-kind": c.kind, children: /* @__PURE__ */ jsx6(CardHeader, { c, showScopeCrest: false }) });
897
+ }
898
+ const multi = c.scopes.length > 1;
899
+ const scope = c.scopes[multi ? c.scopes[active] ? active : 0 : 0];
900
+ return /* @__PURE__ */ jsxs4("div", { className: "ss-w-ecard", "data-kind": c.kind, children: [
901
+ /* @__PURE__ */ jsx6(CardHeader, { c, showScopeCrest: !multi }),
902
+ multi ? /* @__PURE__ */ jsx6(ScopeTabs, { scopes: c.scopes, active, onSelect: setActive }) : null,
903
+ /* @__PURE__ */ jsx6(StatStrip, { stats: scope.stats })
897
904
  ] });
898
905
  }
899
906
  function EntityCardList({ cards, disabled, showLessLabel = "Show less", showMoreLabel = (n) => `Show ${n} more` }) {
@@ -1048,7 +1055,7 @@ function Crest2({ url, name, kind }) {
1048
1055
 
1049
1056
  // src/components/BettingInsightList.tsx
1050
1057
  import { Fragment, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
1051
- function StatRows2({ stats }) {
1058
+ function StatRows({ stats }) {
1052
1059
  return /* @__PURE__ */ jsx11("div", { className: "ss-w-bi-rows", children: stats.map((s) => /* @__PURE__ */ jsxs7("div", { className: "ss-w-bi-row", children: [
1053
1060
  /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-row-lbl", children: s.label }),
1054
1061
  /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-row-num", children: s.value })
@@ -1059,7 +1066,7 @@ function ScopedStats({ scopes }) {
1059
1066
  const current = scopes[active] ?? scopes[0] ?? { key: "", label: "", stats: [] };
1060
1067
  return /* @__PURE__ */ jsxs7("div", { className: "ss-w-bi-scoped", children: [
1061
1068
  /* @__PURE__ */ jsx11("div", { className: "ss-w-bi-scopes", role: "group", children: scopes.map((s, i) => /* @__PURE__ */ jsx11("button", { type: "button", className: "ss-w-bi-chip", "aria-pressed": i === active, onClick: () => setActive(i), children: s.label }, s.key)) }),
1062
- /* @__PURE__ */ jsx11(StatRows2, { stats: current.stats }, current.key)
1069
+ /* @__PURE__ */ jsx11(StatRows, { stats: current.stats }, current.key)
1063
1070
  ] });
1064
1071
  }
1065
1072
  function hasStatsContent(it) {
@@ -1076,7 +1083,7 @@ function ReasonStrip({ it, ui }) {
1076
1083
  /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-chart", "aria-hidden": "true" }),
1077
1084
  /* @__PURE__ */ jsxs7("div", { className: "ss-w-bi-reason-body", children: [
1078
1085
  hasText ? /* @__PURE__ */ jsx11("p", { className: `ss-w-bi-text${open ? "" : " ss-w-bi-text-clamp"}`, children: it.text }) : null,
1079
- open && hasStats ? hasScopes ? /* @__PURE__ */ jsx11(ScopedStats, { scopes: it.scopes }) : /* @__PURE__ */ jsx11(StatRows2, { stats: it.stats }) : null
1086
+ open && hasStats ? hasScopes ? /* @__PURE__ */ jsx11(ScopedStats, { scopes: it.scopes }) : /* @__PURE__ */ jsx11(StatRows, { stats: it.stats }) : null
1080
1087
  ] }),
1081
1088
  expandable ? /* @__PURE__ */ jsx11(
1082
1089
  "button",
@@ -1091,22 +1098,44 @@ function ReasonStrip({ it, ui }) {
1091
1098
  ) : null
1092
1099
  ] });
1093
1100
  }
1101
+ function CardFixture({ it }) {
1102
+ if (it.homeTeamName && it.awayTeamName) {
1103
+ return /* @__PURE__ */ jsxs7(Fragment, { children: [
1104
+ /* @__PURE__ */ jsx11(Crest2, { kind: "team", url: it.homeCrest, name: it.homeTeamName }),
1105
+ /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-team", children: it.homeTeamName }),
1106
+ /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-vs", "aria-hidden": "true", children: "vs" }),
1107
+ /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-team", children: it.awayTeamName }),
1108
+ /* @__PURE__ */ jsx11(Crest2, { kind: "team", url: it.awayCrest, name: it.awayTeamName })
1109
+ ] });
1110
+ }
1111
+ if (it.fixture) return /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-fixture-txt", children: it.fixture });
1112
+ if (it.competition) {
1113
+ return /* @__PURE__ */ jsxs7(Fragment, { children: [
1114
+ /* @__PURE__ */ jsx11(Crest2, { kind: "comp", url: it.competitionCrest, name: it.competition }),
1115
+ /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-comp", children: it.competition })
1116
+ ] });
1117
+ }
1118
+ return null;
1119
+ }
1094
1120
  function InsightCard({ it, ui, slip }) {
1095
1121
  const live = it.isLive || it.phase === "live";
1096
1122
  const kickoff = it.kickoffUtc && ui?.bettingKickoff ? ui.bettingKickoff(it.kickoffUtc) : void 0;
1097
1123
  const hasNamedTeams = !!it.homeTeamName && !!it.awayTeamName;
1098
- const showHeader = !!it.competition || live || !!kickoff;
1124
+ const leftIsFixture = hasNamedTeams || !!it.fixture;
1125
+ const compInMeta = leftIsFixture && !!it.competition;
1126
+ const showHeader = leftIsFixture || !!it.competition || live || !!kickoff;
1099
1127
  return /* @__PURE__ */ jsxs7("div", { className: "ss-w-binsight", children: [
1100
1128
  showHeader ? /* @__PURE__ */ jsxs7("div", { className: "ss-w-bi-header", children: [
1101
- /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-header-left", children: it.competition ? /* @__PURE__ */ jsxs7(Fragment, { children: [
1102
- /* @__PURE__ */ jsx11(Crest2, { kind: "comp", url: it.competitionCrest, name: it.competition }),
1103
- /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-comp", children: it.competition })
1104
- ] }) : null }),
1129
+ /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-header-left", children: /* @__PURE__ */ jsx11(CardFixture, { it }) }),
1105
1130
  /* @__PURE__ */ jsxs7("span", { className: "ss-w-bi-header-right", children: [
1106
1131
  live ? /* @__PURE__ */ jsxs7("span", { className: "ss-w-bi-live", children: [
1107
1132
  /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-live-dot", "aria-hidden": "true" }),
1108
1133
  ui?.liveLabel ?? "Live"
1109
1134
  ] }) : null,
1135
+ compInMeta ? /* @__PURE__ */ jsxs7("span", { className: "ss-w-bi-comp-meta", children: [
1136
+ /* @__PURE__ */ jsx11(Crest2, { kind: "comp", url: it.competitionCrest, name: it.competition }),
1137
+ /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-comp", children: it.competition })
1138
+ ] }) : null,
1110
1139
  kickoff ? /* @__PURE__ */ jsxs7("span", { className: "ss-w-bi-kick", children: [
1111
1140
  kickoff.dayLabel,
1112
1141
  " ",
@@ -1114,28 +1143,22 @@ function InsightCard({ it, ui, slip }) {
1114
1143
  ] }) : null
1115
1144
  ] })
1116
1145
  ] }) : null,
1117
- /* @__PURE__ */ jsxs7("div", { className: "ss-w-bi-body", children: [
1118
- /* @__PURE__ */ jsx11("div", { className: "ss-w-bi-fixture", children: hasNamedTeams ? /* @__PURE__ */ jsxs7(Fragment, { children: [
1119
- /* @__PURE__ */ jsx11(Crest2, { kind: "team", url: it.homeCrest, name: it.homeTeamName }),
1120
- /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-team", children: it.homeTeamName }),
1121
- /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-vs", "aria-hidden": "true", children: "vs" }),
1122
- /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-team", children: it.awayTeamName }),
1123
- /* @__PURE__ */ jsx11(Crest2, { kind: "team", url: it.awayCrest, name: it.awayTeamName })
1124
- ] }) : it.fixture ? /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-fixture-txt", children: it.fixture }) : null }),
1125
- /* @__PURE__ */ jsxs7("div", { className: "ss-w-bi-action", children: [
1126
- /* @__PURE__ */ jsxs7("span", { className: "ss-w-bi-mkt", children: [
1127
- /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-market", children: it.market }),
1128
- it.selection ? /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-sel", children: it.selection }) : null
1129
- ] }),
1130
- it.isMarketFloor ? /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-floor", children: ui?.marketFloorLabel ?? "Market price \xB7 not a value pick" }) : null,
1131
- it.odds ? /* @__PURE__ */ jsxs7("span", { className: "ss-w-bi-odds", children: [
1132
- /* @__PURE__ */ jsx11("b", { children: it.odds }),
1133
- /* @__PURE__ */ jsx11(OddsMovementBadge, { previous: it.previousOdds, current: it.odds, direction: it.movementDirection, ui }),
1134
- it.bookmaker ? /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-book", children: it.bookmaker }) : null
1135
- ] }) : null,
1136
- /* @__PURE__ */ jsx11(AddToSlipButton, { it, slip, ui })
1137
- ] })
1146
+ /* @__PURE__ */ jsxs7("div", { className: "ss-w-bi-action-row", children: [
1147
+ /* @__PURE__ */ jsxs7("span", { className: "ss-w-bi-pick", children: [
1148
+ /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-market", children: it.market }),
1149
+ it.selection ? /* @__PURE__ */ jsxs7(Fragment, { children: [
1150
+ /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-pick-dot", "aria-hidden": "true", children: "\xB7" }),
1151
+ /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-sel", children: it.selection })
1152
+ ] }) : null
1153
+ ] }),
1154
+ it.odds ? /* @__PURE__ */ jsxs7("span", { className: "ss-w-bi-odds", children: [
1155
+ /* @__PURE__ */ jsx11("b", { children: it.odds }),
1156
+ /* @__PURE__ */ jsx11(OddsMovementBadge, { previous: it.previousOdds, current: it.odds, direction: it.movementDirection, ui }),
1157
+ it.bookmaker ? /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-book", children: it.bookmaker }) : null
1158
+ ] }) : null,
1159
+ /* @__PURE__ */ jsx11(AddToSlipButton, { it, slip, ui })
1138
1160
  ] }),
1161
+ it.isMarketFloor ? /* @__PURE__ */ jsx11("span", { className: "ss-w-bi-floor", children: ui?.marketFloorLabel ?? "Market price \xB7 not a value pick" }) : null,
1139
1162
  /* @__PURE__ */ jsx11(ReasonStrip, { it, ui }),
1140
1163
  it.disclaimer ? /* @__PURE__ */ jsx11("p", { className: "ss-w-bi-disc", children: it.disclaimer }) : null
1141
1164
  ] });
@@ -2051,10 +2074,9 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
2051
2074
  /* entity cards */
2052
2075
  .ss-w-cards { display: flex; flex-direction: column; gap: 8px; }
2053
2076
 
2054
- /* Identity Hero: crest-led identity block | tabbed stats panel */
2055
- .ss-w-ecard { display: grid; grid-template-columns: 112px 1fr; align-items: stretch; width: 100%; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 12px; overflow: hidden; text-align: left; }
2077
+ /* Entity card: identity header row over a horizontal stat strip */
2078
+ .ss-w-ecard { display: flex; flex-direction: column; width: 100%; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 12px; overflow: hidden; text-align: left; }
2056
2079
 
2057
- .ss-w-ecard-id { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; padding: 13px 10px; border-right: 1px solid var(--ss-w-line); background: linear-gradient(158deg, var(--ss-w-bubble), color-mix(in srgb, var(--ss-w-accent) 9%, var(--ss-w-bubble))); }
2058
2080
  .ss-w-ecard-idtext { display: flex; flex-direction: column; gap: 1px; min-width: 0; max-width: 100%; }
2059
2081
  .ss-w-thumb { width: 54px; height: 54px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 700; color: #fff; background-color: var(--ss-w-nav); background-size: cover; background-position: center; box-shadow: 0 1px 3px rgba(0,0,0,.14); }
2060
2082
  .ss-w-thumb.ss-w-team { border-radius: 12px; }
@@ -2064,27 +2086,31 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
2064
2086
 
2065
2087
  /* bare card (no stat scopes): simple avatar + name row */
2066
2088
  .ss-w-ecard-bare { display: flex; align-items: center; }
2067
- .ss-w-ecard-bare .ss-w-ecard-id { flex-direction: row; text-align: left; gap: 11px; background: none; border-right: none; padding: 10px 12px; }
2068
- .ss-w-ecard-bare .ss-w-thumb { width: 40px; height: 40px; font-size: 13px; box-shadow: none; }
2069
- .ss-w-ecard-bare .ss-w-thumb.ss-w-team { border-radius: 10px; }
2070
-
2071
- .ss-w-ecard-body { min-width: 0; padding: 9px 12px 12px; display: flex; flex-direction: column; }
2072
-
2073
- /* tab strip seated on the stats panel's top edge; active tab underlined in accent */
2074
- .ss-w-ecard-tabs { display: flex; align-items: stretch; gap: 3px; border-bottom: 1px solid var(--ss-w-line); margin-bottom: 9px; flex-wrap: wrap; }
2075
- .ss-w-ecard-tab { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 620; color: var(--ss-w-faint); background: none; border: none; cursor: pointer; padding: 5px 8px 8px; margin-bottom: -1px; border-bottom: 2px solid transparent; }
2076
- .ss-w-ecard-tab[aria-selected="true"] { color: var(--ss-w-ink); border-bottom-color: var(--ss-w-accent); }
2077
- .ss-w-ecard-tabs-static { align-items: center; flex-wrap: nowrap; }
2078
- .ss-w-ecard-lead { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 640; color: var(--ss-w-ink); padding: 4px 2px 8px; min-width: 0; flex: 1; }
2079
- .ss-w-ecard-lead-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2089
+ .ss-w-ecard-bare .ss-w-ecard-hd { padding: 10px 12px; }
2090
+
2091
+ .ss-w-ecard-hd { display: flex; align-items: center; gap: 11px; padding: 11px 13px; }
2092
+ .ss-w-ecard-hd .ss-w-thumb { width: 40px; height: 40px; font-size: 13px; box-shadow: none; }
2093
+ .ss-w-ecard-hd .ss-w-thumb.ss-w-team { border-radius: 10px; }
2094
+ .ss-w-ecard-meta { display: inline-flex; align-items: center; gap: 7px; flex: none; align-self: flex-start; margin-left: auto; }
2095
+ .ss-w-ecard-meta .ss-w-ecard-season { margin: 0; }
2096
+
2097
+ /* scope tabs: reuse the underline pattern, relocated above the strip */
2098
+ .ss-w-ecard-scopes { display: flex; align-items: stretch; gap: 2px; padding: 0 11px; border-top: 1px solid var(--ss-w-line); flex-wrap: wrap; }
2099
+ .ss-w-ecard-scope { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 620; color: var(--ss-w-faint); background: none; border: none; cursor: pointer; padding: 7px 8px; margin-bottom: -1px; border-bottom: 2px solid transparent; }
2100
+ .ss-w-ecard-scope[aria-selected="true"] { color: var(--ss-w-ink); border-bottom-color: var(--ss-w-accent); }
2101
+ .ss-w-ecard-scope .ss-w-ecard-crest { width: 14px; height: 14px; }
2102
+ .ss-w-ecard-scopes + .ss-w-ecard-strip { border-top: none; }
2103
+
2080
2104
  .ss-w-ecard-crest { width: 15px; height: 15px; flex: none; display: block; border-radius: 4px; background-size: cover; background-position: center; }
2081
2105
  .ss-w-ecard-season { flex: none; margin-left: auto; align-self: center; margin-bottom: 5px; font-size: 10.5px; font-weight: 700; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 13%, var(--ss-w-panel)); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
2082
- .ss-w-ecard-tabs-static .ss-w-ecard-season { margin-bottom: 4px; }
2083
2106
 
2084
- .ss-w-ecard-stats { display: flex; flex-direction: column; gap: 4px; }
2085
- .ss-w-ecard-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
2086
- .ss-w-ecard-rlabel { font-size: 9.5px; text-transform: uppercase; letter-spacing: .045em; color: var(--ss-w-faint); font-weight: 600; }
2087
- .ss-w-ecard-rval { justify-self: end; font-size: 15px; font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
2107
+ /* stat strip: 1px gap over a line-colored ground paints hairlines between cells, wrap-safe */
2108
+ .ss-w-ecard-strip { display: grid; gap: 1px; background: var(--ss-w-line); border-top: 1px solid var(--ss-w-line); }
2109
+ .ss-w-ecard-cell { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 10px 4px 11px; background: var(--ss-w-panel); }
2110
+ .ss-w-ecard-cval { height: 20px; display: flex; align-items: center; font-size: 17px; font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
2111
+ .ss-w-ecard-cval .ss-w-form { width: 42px; }
2112
+ .ss-w-ecard-clabel { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--ss-w-faint); font-weight: 600; font-variant-numeric: tabular-nums; }
2113
+
2088
2114
  .ss-w-form { justify-self: end; display: flex; height: 6px; width: 48px; border-radius: 4px; overflow: hidden; gap: 2px; }
2089
2115
  .ss-w-form span { display: block; border-radius: 2px; }
2090
2116
  .ss-w-form-w { background: var(--ss-w-pos); }
@@ -2101,7 +2127,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
2101
2127
 
2102
2128
  /* row 1: competition logo + name on the left, live badge + kickoff on the right */
2103
2129
  .ss-w-bi-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding-bottom: 7px; border-bottom: 1px solid var(--ss-w-line); }
2104
- .ss-w-bi-header-left { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
2130
+ .ss-w-bi-header-left { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1; font-size: 12.5px; font-weight: 650; color: var(--ss-w-ink); }
2105
2131
  .ss-w-bi-header-right { display: inline-flex; align-items: center; gap: 8px; flex: none; }
2106
2132
  .ss-w-bi-comp { font-size: 10.5px; color: var(--ss-w-faint); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
2107
2133
  .ss-w-bi-kick { font-size: 10.5px; font-weight: 600; color: var(--ss-w-faint); white-space: nowrap; flex: none; }
@@ -2114,23 +2140,26 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
2114
2140
  .ss-w-bi-crest { width: 24px; height: 24px; flex: none; display: block; border-radius: 50%; object-fit: contain; }
2115
2141
  .ss-w-bi-crest-mono { display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 16%, var(--ss-w-panel)); }
2116
2142
 
2117
- /* row 2: crest-flanked fixture on the left, boxed action panel on the right */
2118
- .ss-w-bi-body { display: flex; align-items: center; gap: 10px; }
2119
- .ss-w-bi-fixture { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; font-size: 12px; font-weight: 650; color: var(--ss-w-ink); }
2143
+ /* header fixture atoms (team hero lives in .ss-w-bi-header-left; comp demotes to the meta) */
2120
2144
  .ss-w-bi-team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2121
2145
  .ss-w-bi-vs { font-size: 10px; font-weight: 600; color: var(--ss-w-faint); flex: none; }
2122
2146
  .ss-w-bi-fixture-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2123
- .ss-w-bi-action { margin-left: auto; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; }
2124
- .ss-w-bi-action .ss-w-slip { width: 100%; }
2125
- .ss-w-bi-action .ss-w-slip > button { flex: 1; width: 100%; text-align: center; border-radius: 8px; }
2126
- /* The action column is narrow; let its toast size to its own text and anchor to the card's right edge instead of being clipped to the button width. */
2127
- .ss-w-bi-action .ss-w-toast { left: auto; right: 0; width: max-content; max-width: 210px; white-space: normal; }
2128
- .ss-w-bi-mkt { display: flex; flex-direction: column; gap: 1px; min-width: 0; align-items: flex-end; text-align: right; }
2129
- .ss-w-bi-market { font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--ss-w-faint); white-space: nowrap; }
2130
- .ss-w-bi-sel { font-size: 11px; line-height: 1.25; color: var(--ss-w-faint); }
2147
+ .ss-w-bi-comp-meta { display: inline-flex; align-items: center; gap: 5px; flex: none; min-width: 0; }
2148
+ /* shared crest-flanked team row, still consumed by MarketOddsCardList */
2149
+ .ss-w-bi-fixture { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; font-size: 12px; font-weight: 650; color: var(--ss-w-ink); }
2150
+
2151
+ /* row 2: one action line -- market \xB7 selection (left, market ellipsises first), odds, slip button */
2152
+ .ss-w-bi-action-row { display: flex; align-items: center; gap: 9px; }
2153
+ .ss-w-bi-pick { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; }
2154
+ .ss-w-bi-market { font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--ss-w-faint); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2155
+ .ss-w-bi-pick-dot { flex: none; color: var(--ss-w-faint); font-weight: 700; }
2156
+ .ss-w-bi-sel { flex: none; font-size: 12.5px; font-weight: 700; line-height: 1.2; color: var(--ss-w-ink); white-space: nowrap; }
2131
2157
  .ss-w-bi-odds { flex: none; display: flex; align-items: baseline; justify-content: flex-end; gap: 5px; }
2132
- .ss-w-bi-odds b { font-size: 23px; font-family: ui-monospace, monospace; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ss-w-accent); line-height: 1.05; }
2158
+ .ss-w-bi-odds b { font-size: 20px; font-family: ui-monospace, monospace; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ss-w-accent); line-height: 1.05; }
2133
2159
  .ss-w-bi-book { font-size: 9.5px; color: var(--ss-w-faint); }
2160
+ .ss-w-bi-action-row .ss-w-slip { flex: none; }
2161
+ /* let the slip toast size to its own text and anchor to the card's right edge, not the button width */
2162
+ .ss-w-bi-action-row .ss-w-toast { left: auto; right: 0; width: max-content; max-width: 210px; white-space: normal; }
2134
2163
 
2135
2164
  /* row 3: bar-chart glyph + reasoning prose + stats-expander chevron, in a subtle strip */
2136
2165
  .ss-w-bi-reason { display: flex; align-items: flex-start; gap: 8px; background: var(--ss-w-bubble); border-radius: 10px; padding: 8px 10px; }