/* FLASHSCORE_H2H_VISUAL_2 — visual-only H2H density/layout. */

#detailH2H > h4 {
  margin-bottom: 10px;
}

.h2h-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.h2h-filter-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  overflow: visible;
}

.h2h-filter-tabs .match-view-tab {
  min-width: 0;
  min-height: 46px;
  padding: 8px 6px;
  white-space: normal;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.h2h-filter-tabs .match-view-tab small {
  display: block;
  margin-top: 3px;
  color: inherit;
  opacity: .75;
  font-size: .58rem;
  font-weight: 600;
}

#h2hRecentMatches {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.h2h-team-block,
.h2h-pair-block {
  margin: 0;
}

.h2h-team-block h5,
.h2h-pair-block h5 {
  margin: 0 0 8px;
  color: var(--cd-text, var(--text));
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .035em;
  line-height: 1.25;
  text-transform: uppercase;
}

.h2h-list {
  overflow: hidden;
  background: var(--cd-panel, var(--panel));
  border: 1px solid var(--cd-border, var(--border));
  border-radius: 12px;
}

.h2h-match-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 34px 26px;
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 8px 9px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}

.h2h-match-row:last-child {
  border-bottom: 0;
}

.h2h-date-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.h2h-date {
  color: var(--cd-muted, var(--muted));
  font-size: .61rem;
  font-weight: 650;
  white-space: nowrap;
}

.h2h-venue-tag {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 1px 5px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 5px;
  background: rgba(255,255,255,.025);
  color: var(--cd-muted-2, var(--muted));
  font-size: .50rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.h2h-teams-cell,
.h2h-score-cell {
  display: grid;
  grid-template-rows: repeat(2, minmax(18px, auto));
  align-items: center;
  min-width: 0;
}

.h2h-team {
  min-width: 0;
  overflow: hidden;
  color: #aeb8b3;
  font-size: .72rem;
  font-weight: 550;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h2h-team--focus {
  color: var(--cd-text, var(--text));
  font-weight: 800;
}

.h2h-score-cell {
  text-align: center;
  justify-items: center;
}

.h2h-score-cell strong {
  color: var(--cd-text, var(--text));
  font-size: .75rem;
  font-weight: 800;
  line-height: 1;
}

.h2h-result-badge {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  border-radius: 6px;
  font-size: .65rem;
  font-weight: 900;
}

.h2h-result-badge--win {
  background: rgba(34,197,94,.15);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,.35);
}

.h2h-result-badge--draw {
  background: rgba(234,179,8,.14);
  color: #facc15;
  border: 1px solid rgba(234,179,8,.32);
}

.h2h-result-badge--loss {
  background: rgba(239,68,68,.14);
  color: #f87171;
  border: 1px solid rgba(239,68,68,.32);
}

.h2h-result-badge--empty {
  background: rgba(255,255,255,.025);
  color: var(--cd-muted-2, var(--muted));
  border: 1px solid rgba(255,255,255,.07);
}

.h2h-empty {
  padding: 14px 13px;
  background: var(--cd-panel, var(--panel));
  border: 1px solid var(--cd-border, var(--border));
  border-radius: 12px;
  color: var(--cd-muted, var(--muted));
  font-size: .72rem;
  line-height: 1.4;
}

.h2h-match-row--pair .h2h-date-cell {
  justify-content: center;
}

@media (max-width: 390px) {
  .h2h-filter-tabs {
    gap: 5px;
  }

  .h2h-filter-tabs .match-view-tab {
    min-height: 44px;
    padding-inline: 4px;
    font-size: .61rem;
  }

  .h2h-match-row {
    grid-template-columns: 47px minmax(0, 1fr) 30px 24px;
    gap: 6px;
    min-height: 52px;
    padding: 7px 8px;
  }

  .h2h-date { font-size: .57rem; }
  .h2h-team { font-size: .68rem; }
  .h2h-score-cell strong { font-size: .72rem; }
  .h2h-result-badge { width: 22px; height: 22px; font-size: .61rem; }
}
