/* Sky Sports trending cards. Values are the Sky Sports (light) mode of the ABS Large
   card in Figma (file Sr81TZJx7WajijZIKhl0wm, section 13337:47014). */
@font-face { font-family: 'Sky Text'; font-weight: 700; font-display: swap; src: url('../fonts/SKY_BOLD.TTF') format('truetype'); }
@font-face { font-family: 'Sky Text'; font-weight: 500; font-display: swap; src: url('../fonts/SKY_MED.TTF') format('truetype'); }
@font-face { font-family: 'Inter Tight'; font-weight: 100 900; font-display: swap; src: url('../fonts/InterTight-VariableFont_wght.ttf') format('truetype'); }

:root {
  --sky-bg-content: #ffffff;
  --sky-border: #e4e4e7;
  --sky-text: #1d1d1b;
  --sky-text-secondary: #64748b;
  --sky-positive: #01a04a;
  --sky-bg-primary: rgba(228, 228, 231, 0.4);   /* background/bg-primary, #e4e4e7 at 40% */
  --sky-bar-empty: rgba(100, 116, 139, 0.4);   /* background/bg-scrollbar, #64748b at 40% */
  --sky-scrollbar: rgba(100, 116, 139, 0.4);
  --sky-brand: #1f58c4;
  --sky-on-brand: #ffffff;
  --sky-font: 'Sky Text', -apple-system, BlinkMacSystemFont, sans-serif;
  --sky-font-trend: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
}

.sky-card {
  box-sizing: border-box;
  flex: none;
  width: 300px;
  height: 250px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--sky-bg-content);
  border: 1px solid var(--sky-border);
  border-radius: 12px;
  font-family: var(--sky-font);
  color: var(--sky-text);
  -webkit-font-smoothing: antialiased;
}
.sky-card *, .sky-card *::before, .sky-card *::after { box-sizing: border-box; }
.sky-card p { margin: 0; }

/* ---------- header: acca ---------- */
.sky-head { flex: none; display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 8px; }
.sky-head.is-fixture { flex-direction: row; align-items: flex-start; gap: 8px; }
.sky-head-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sky-head-sub { font-weight: 500; font-size: 12px; line-height: 16px; color: var(--sky-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sky-title { font-weight: 700; font-size: 14px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* absMatchIcon: two 32px team discs overlapping by 8px */
.sky-match { flex: none; display: flex; width: 56px; height: 32px; isolation: isolate; }
.sky-match-team {
  display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9999px;
  border: 1px solid rgba(113, 113, 123, 0.4); color: #fff;
  font: 700 8px/10px 'Inter', 'Inter Tight', sans-serif; text-align: center;
}
.sky-match-team:first-child { margin-right: -8px; z-index: 2; }
.sky-match-team.is-light { color: var(--sky-text); }

/* ---------- body: the scrolling list of legs ---------- */
.sky-body { position: relative; flex: 1 1 0; min-height: 0; padding: 0 14px; }
.sky-list {
  height: 100%; overflow-y: auto; scrollbar-width: none;
  --scroll-fade-size: var(--spacing-8);   /* 32px, the depth of the card's fade in Figma */
  --scroll-fade-reveal: 1px;               /* full depth from the first pixel of scroll, no growing */
  display: flex; flex-direction: column;
}
.sky-list::-webkit-scrollbar { display: none; }
.sky-card.is-acca .sky-list { gap: 6px; }
.sky-card.is-spin .sky-list { gap: 4px; }
.sky-card.is-bb .sky-list { gap: 8px; }
.sky-scroll { position: absolute; top: 0; bottom: 0; right: 5px; width: 4px; border-radius: 9999px; overflow: hidden; pointer-events: none; }
.sky-scroll-thumb { position: absolute; left: 0; width: 4px; border-radius: 9999px; background: var(--sky-scrollbar); }
/* the 300x250 card fades its list top and bottom with ScrollFade; no scrollbar */
.sky-scroll { display: none; }

/* ---------- leg: acca (dial) ---------- */
.sky-leg { flex: none; display: flex; flex-direction: column; gap: 2px; }
.sky-leg-top {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.sky-leg-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.sky-leg-title { font-weight: 700; font-size: 14px; line-height: 18px; }
.sky-leg-sub { font-weight: 500; font-size: 12px; line-height: 16px; color: var(--sky-text-secondary); }
.sky-dial { position: relative; flex: none; width: 48px; height: 24px; }
.sky-dial svg { position: absolute; display: block; }
.sky-dial-label {
  position: absolute; left: 0; bottom: 0; width: 48px; height: 12px;
  font-weight: 700; color: var(--sky-text); text-align: center;
}
.sky-dial-label span { position: absolute; left: 0; right: 0; bottom: -4px; line-height: 16px; font-size: 12px; }
.sky-dial-label small { font-size: 7.74px; line-height: 16px; }

/* ---------- leg: bet builder (icon + stats toggle) ---------- */
.sky-bbleg { flex: none; display: flex; gap: 8px; align-items: flex-start; }
.sky-bbleg-icon { flex: none; width: 14px; height: 18px; display: flex; align-items: center; justify-content: center; }
.sky-bbleg-icon img, .sky-bbleg-icon svg { width: 14px; height: 14px; display: block; }
.sky-bbleg-content { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sky-bbleg-row { display: flex; justify-content: space-between; align-items: flex-start; }
.sky-bbleg-row .sky-leg-title { flex: 1 1 0; min-width: 0; }
.sky-stats-btn {
  flex: none; position: relative; width: 14px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer;
}
.sky-stats-btn img { position: absolute; left: 0; top: 2px; width: 14px; height: 14px; display: block; }
.sky-stats-btn .is-on { display: none; }
.sky-stats-btn[aria-expanded="true"] .is-on { display: block; }
.sky-stats-btn[aria-expanded="true"] .is-off { display: none; }
.sky-leg-top:focus-visible, .sky-stats-btn:focus-visible, .sky-cta:focus-visible { outline: 2px solid var(--sky-brand); outline-offset: 2px; border-radius: 4px; }

/* ---------- TrendCard (Hit Rate) ---------- */
.sky-trend {
  display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 8px;
  background: var(--sky-bg-content); border: 1px solid var(--sky-border); border-radius: 4px;
  font-family: var(--sky-font-trend); letter-spacing: 0.3px;
}
.sky-trend[hidden] { display: none; }
.sky-trend p { margin: 0; }
.sky-trend-badge { display: flex; align-items: center; gap: 6px; }
.sky-trend-badge img { height: 10px; display: block; }
.sky-trend-badge p { display: flex; gap: 4px; font-size: 10px; line-height: 10px; white-space: nowrap; }
.sky-trend-badge b { font-weight: 700; color: var(--sky-text); }
.sky-trend-badge span { font-weight: 500; color: var(--sky-text-secondary); }
.sky-trend-figures { display: flex; gap: 6px; align-items: baseline; white-space: nowrap; }
.sky-trend-figures b { font-weight: 700; font-size: 12px; line-height: 12px; color: var(--sky-positive); }
.sky-trend-figures span { font-weight: 500; font-size: 10px; line-height: 12px; color: var(--sky-text-secondary); }
.sky-trend.is-last { padding: 10px; }
.sky-trend-last { display: flex; flex-direction: column; gap: 6px; }
.sky-trend-headline { font-weight: 700; font-size: 12px; line-height: 16px; color: var(--sky-positive); }
.sky-trend-context { font-weight: 500; font-size: 10px; line-height: 10px; color: var(--sky-text-secondary); white-space: nowrap; }
.sky-trend-strip { display: flex; gap: 2px; border-radius: 4px; overflow: hidden; }
.sky-trend-strip i { flex: 1 1 0; min-width: 0; height: 4px; background: var(--sky-bar-empty); }
.sky-trend-strip i.is-hit { background: var(--sky-positive); }
.sky-trend-rows { display: flex; flex-direction: column; gap: 8px; }
.sky-trend-row { display: flex; flex-direction: column; gap: 8px; }
.sky-trend-rowline { display: flex; justify-content: space-between; align-items: baseline; }
.sky-trend-rowline strong { font-weight: 700; font-size: 12px; line-height: 12px; color: var(--sky-text); }
.sky-trend-bars { display: flex; gap: 2px; height: 24px; align-items: flex-end; }
.sky-trend-bars i { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--sky-bar-empty); }
.sky-trend-bars i.is-hit { background: var(--sky-positive); }

/* ---------- footer ---------- */
.sky-foot { flex: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; background: var(--sky-bg-content); }
.sky-cta {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 36px; padding: 6px;
  border: 0; border-radius: 8px; background: var(--sky-brand); color: var(--sky-on-brand);
  font: inherit; cursor: pointer; overflow: hidden;
}
.sky-cta-logo { flex: none; width: 24px; height: 24px; border-radius: 4px; overflow: hidden; }
.sky-cta-logo img { width: 24px; height: 24px; display: block; }
.sky-cta-text { flex: 1 1 0; min-width: 0; text-align: center; font-weight: 700; font-size: 14px; line-height: 18px; }
.sky-terms { font-weight: 500; font-size: 8px; line-height: 10px; height: 10px; text-align: center; color: var(--sky-text-secondary); }

/* ---------- leg spinner ---------- */
.sky-spin-sub { display: flex; align-items: center; gap: 4px; font-weight: 500; font-size: 12px; line-height: 16px; color: var(--sky-text-secondary); }
.sky-spin-sub img { width: 12px; height: 12px; display: block; }
.sky-leg.is-compact { gap: 4px; }
.sky-leg.is-compact .sky-leg-title { font-size: 12px; line-height: 16px; }
.sky-leg.is-compact .sky-leg-sub { font-size: 10px; line-height: 12px; }
.sky-leg-row { display: flex; align-items: center; gap: 8px; }
.sky-leg-row .sky-leg-top { flex: 1 1 0; min-width: 0; }
.sky-spin-btn {
  flex: none; align-self: stretch; display: flex; align-items: flex-start; padding: 0;
  border: 0; background: none; cursor: pointer;
}
.sky-spin-btn span {
  display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 4px;
  border-radius: 8px; background: var(--sky-bg-primary);
}
.sky-spin-btn img { width: 16px; height: 16px; display: block; transition: transform 300ms ease; }
.sky-spin-btn.is-spun img { transform: rotate(180deg); }
.sky-spin-btn:focus-visible { outline: none; }
.sky-spin-btn:focus-visible span { box-shadow: inset 0 0 0 2px var(--sky-brand); }
.sky-leg.is-new .sky-leg-text { animation: sky-swap 300ms ease; }
@keyframes sky-swap { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
