/* =====================================================
   Featured matches and real codes (js/featured.js)
   ===================================================== */

/* Featured match cards: a sideways carousel above the quick picks */
.fm-track {
  --cell: #eef1f4;
  --cell-text: #15202b;
  --meta: var(--muted);
  display: flex;
  gap: 10px;
  padding: 4px 16px 8px;
  scroll-snap-type: x mandatory;
}
.fm-card {
  flex: 0 0 min(78%, 300px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 2px 10px rgba(15, 25, 35, 0.08);
  min-width: 0;
}
.fm-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fm-league {
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fm-teams { display: grid; gap: 4px; cursor: pointer; }
.fm-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; }
.fm-team .crest { flex: none; }
.fm-team span:not(.crest) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-team b { font-variant-numeric: tabular-nums; color: var(--red); }
.fm-time { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.fm-live { color: var(--red); font-weight: 800; }
.fm-odds { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; }
.fm-odd { display: grid; gap: 2px; text-align: center; }
.fm-odd small { font-size: 0.7rem; color: var(--muted); }
.fm-odd .odd { width: 100%; height: 40px; }

/* HOT tag: featured cards and match rows */
.hot-tag {
  flex: none;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* Where a real code comes from */
.code-title { font-size: 0.75rem; font-weight: 700; color: var(--green); }
.code-head .code-title { margin-left: 6px; }

.theme-dark .fm-track { --cell: #183549; --cell-text: #e3eef7; }

/* ===== Matches tab: league chips, then one big card per match ===== */
.fx-chips { display: flex; gap: 8px; padding: 10px 16px 6px; }
.fx-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}
.fx-chip small { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-chip.on { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }

.fx-track {
  display: flex;
  gap: 10px;
  padding: 6px 16px 14px;
  scroll-snap-type: x mandatory;
}
.fx-card {
  flex: 0 0 min(88%, 380px);
  scroll-snap-align: start;
  display: grid;
  gap: 10px;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 2px 10px rgba(15, 25, 35, 0.08);
  min-width: 0;
}
.fx-card:only-child { flex-basis: 100%; }

/* HOT tag and "Football - International - UEFA Nations League" */
.fx-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fx-hot {
  flex: none;
  padding: 1px 8px 1px 6px;
  border-radius: 4px 0 0 4px;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
  background: var(--red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.02em;
}
.fx-league {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--green);
  font-size: 0.78rem;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* Home crest and name | time, day and 1X2 | away crest and name */
.fx-mid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.fx-team { display: grid; justify-items: center; gap: 6px; min-width: 0; }
.fx-team .crest { width: 44px; height: 44px; font-size: 1.1rem; }
.fx-team > span:not(.crest) {
  max-width: 100%;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fx-centre { display: grid; justify-items: center; gap: 6px; text-align: center; }
.fx-when { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.fx-when strong { font-size: 1rem; }
.fx-when span { padding-left: 6px; border-left: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.fx-score { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.fx-live { color: var(--red); font-weight: 700; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.fx-centre em { color: var(--green); font-style: normal; font-weight: 700; font-size: 0.9rem; }

/* Wide price buttons: "1   3.95" */
.fx-odds { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; }
.fx-odd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: none;
  border-radius: 6px;
  background: color-mix(in srgb, var(--green) 10%, var(--card));
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}
.fx-odd strong { font-variant-numeric: tabular-nums; }
.fx-odd.selected { background: var(--green); color: #fff; }
.fx-odd.locked, .fx-odd.empty { color: var(--muted); justify-content: space-between; }
.fx-odd .icon { width: 16px; height: 16px; }
button.fx-odd:not(:disabled) { cursor: pointer; }

@media (max-width: 360px) {
  .fx-odd { padding: 0 8px; font-size: 0.88rem; }
  .fx-team .crest { width: 38px; height: 38px; }
}
