/* Live match table rows */
.liveSection { display: flex; flex-direction: column; gap: 12px; }

.leagueGroup {
  background: var(--color-support-1);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius);
}
.leagueGroup__body {
  border-radius: 0 0 var(--radius) var(--radius);
}
.leagueGroup__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: calc(var(--header-h) + var(--tabs-h));
  z-index: 5;
  background: var(--color-secondary-3);
  border-radius: var(--radius) var(--radius) 0 0;
  min-height: 34px;
}
.leagueGroup--collapsed .leagueGroup__header {
  border-radius: var(--radius);
}
.leagueGroup__header:hover { background: var(--color-secondary-3-active); }
.leagueGroup__flag {
  width: 18px;
  height: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 1px;
}
.leagueGroup__country {
  font-size: 12px;
  color: var(--color-support-2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.leagueGroup__country::after {
  content: ':';
  margin-right: 2px;
}
.leagueGroup__name {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-white);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.leagueGroup__name:hover { color: var(--color-primary); text-decoration: underline; }
.leagueGroup__liveBadge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #fff;
  background: var(--color-primary);
  border-radius: 999px;
  padding: 1px 8px;
  flex-shrink: 0;
}
.leagueGroup__count {
  font-size: 11px;
  color: var(--color-support-2);
}
.leagueGroup__chevron {
  width: 10px;
  height: 10px;
  transition: transform 0.2s;
}
.leagueGroup--collapsed .leagueGroup__chevron { transform: rotate(-90deg); }
.leagueGroup--collapsed .leagueGroup__body { display: none; }

/* Match row */
.matchRow {
  display: grid;
  grid-template-columns:
    28px  /* state icon */
    minmax(120px, 1fr) /* home team */
    36px  /* home score */
    44px  /* time / status */
    36px  /* away score */
    minmax(120px, 1fr) /* away team */
    32px; /* actions */
  align-items: center;
  padding: 6px 12px;
  gap: 4px;
  border-top: 1px solid var(--color-divider);
  cursor: pointer;
  position: relative;
}
.matchRow:hover { background: var(--color-row-hover); }
.matchRow--finished { opacity: 0.75; }
.matchRow--live { background: rgba(255, 0, 70, 0.06); }
.matchRow--live .matchRow__time { color: var(--color-live-time); font-weight: 800; }
.matchRow--selected { background: var(--color-highlight); }

/* goal detected: brief green flash */
.matchRow--goal {
  animation: goalFlash 1.6s ease-out 5;
  position: relative;
  z-index: 1;
}
.matchRow--goal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-left: 3px solid var(--color-green);
  background: linear-gradient(90deg, rgba(20, 220, 75, 0.22), rgba(20, 220, 75, 0) 55%);
}
@keyframes goalFlash {
  0% { background-color: rgba(20, 220, 75, 0.30); }
  60% { background-color: rgba(20, 220, 75, 0.10); }
  100% { background-color: transparent; }
}

.matchRow__state {
  width: 28px;
  display: flex;
  justify-content: center;
}
.stateIcon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  border-radius: 3px;
  background: transparent;
}
.stateIcon--live {
  background: transparent;
  animation: none;
}
.stateIcon__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: pulse 1.6s ease-in-out infinite;
}
.stateIcon--ht .stateIcon__dot { background: var(--color-yellow); }
.stateIcon--ft { color: var(--color-support-2); font-size: 9px; }
.stateIcon--ns { color: var(--color-support-2); font-size: 11px; }
.stateIcon--ht { color: var(--color-yellow); font-size: 9px; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.teamCell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.teamCell--away { justify-content: flex-end; }
.teamCell__crest {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-secondary-3);
}
.teamCell__name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-white);
}

.scoreCell {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--color-white);
  min-width: 32px;
}
.scoreCell--dim { color: var(--color-support-2); font-weight: 600; }
.scoreCell--win { color: var(--color-green); }

.matchRow__time {
  text-align: center;
  font-size: 12px;
  color: var(--color-support-2);
  font-weight: 700;
}
.matchRow__clock {
  display: inline-block;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.matchRow__actions {
  display: flex;
  justify-content: center;
}
.iconBtn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--color-support-2);
  border-radius: 50%;
}
.iconBtn:hover { background: var(--color-secondary-3); color: var(--color-white); }
.iconBtn.is-fav svg { color: var(--color-yellow); }

/* Section headers (Live / Yesterday / Today / Tomorrow blocks) */
.sectionHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--color-white);
  border-bottom: 2px solid var(--color-primary);
  margin-bottom: 8px;
}
.sectionHeader__badge {
  background: var(--color-primary);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  padding: 2px 10px;
}

/* Match detail inline panel (inside a row when expanded) */
.matchDetail {
  display: none;
  grid-column: 1 / -1;
  background: var(--color-support-1);
  border-top: 1px solid var(--color-divider);
  padding: 12px;
  font-size: 12px;
}
.matchRow--expanded + .matchDetail { display: block; }
.matchDetail__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.matchDetail__cell {
  background: var(--color-secondary-3);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: grid;
  gap: 4px;
}
.matchDetail__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-support-2);
  font-weight: 700;
}
.matchDetail__value {
  color: var(--color-white);
  font-weight: 700;
}
.matchDetail__error { color: var(--color-red); grid-column: 1 / -1; }

/* Loading rows */
.loadingRow {
  display: grid;
  grid-template-columns: 28px minmax(120px,1fr) 36px 44px 36px minmax(120px,1fr) 32px;
  gap: 4px;
  padding: 8px 12px;
  align-items: center;
  border-top: 1px solid var(--color-divider);
}
.loadingRow .sk { height: 14px; }
.loadingRow .sk--team { grid-column: 2; }
.loadingRow .sk--score { grid-column: 3; width: 30px; margin: 0 auto; }
.loadingRow .sk--time { grid-column: 4; width: 30px; margin: 0 auto; }
.loadingRow .sk--score2 { grid-column: 5; width: 30px; margin: 0 auto; }
.loadingRow .sk--team2 { grid-column: 6; }

@media (max-width: 640px) {
  .matchRow {
    grid-template-columns: 24px minmax(80px,1fr) 30px 44px 30px minmax(80px,1fr) 28px;
    padding: 5px 8px;
  }
  .matchRow__clock { font-size: 10px; }
  .matchDetail__grid { grid-template-columns: repeat(2, 1fr); }
}
