/* Keep dynamically substituted crests inside the original v17 match layout.
   The generic .team-monogram dimensions are intended for the match-detail dialog. */
.match-bar .team-monogram.match-crest,
.match-bar .verified-crest.match-crest {
  width: calc(var(--u) * 78);
  height: calc(var(--u) * 76);
  min-width: 0;
  min-height: 0;
  flex-shrink: 0;
  font-size: calc(var(--u) * 28);
}
.match-bar .verified-crest.match-crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (min-width: 701px) {
  /* Intrinsic image/crest sizes must not stretch the fixed-height grid row. */
  .match-bar { grid-template-rows: minmax(0, 1fr); }
  .match-bar > * { min-height: 0; }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .match-bar .team-monogram.match-crest,
  .match-bar .verified-crest.match-crest {
    width: 62px;
    height: 65px;
    font-size: 26px;
  }
}
@media (max-width: 700px) {
  .match-bar .team-monogram.match-crest,
  .match-bar .verified-crest.match-crest {
    width: 62px;
    height: 61px;
    font-size: 21px;
  }
  .match-bar .away-side .team-monogram.match-crest,
  .match-bar .away-side .verified-crest.match-crest {
    width: 40px;
    height: 48px;
  }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .match-bar .match-main { padding-left: 16px; padding-right: 16px; }
  .match-bar .matchup { grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr); }
  .match-bar .club-side { gap: 8px; }
  .match-bar .club-side > div { min-width: 0; }
  .match-bar .club-side > div > strong {
    font-size: 15px !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .match-bar .club-side .match-crest,
  .match-bar .club-side .verified-crest {
    width: 40px;
    height: 48px;
    min-width: 0;
    min-height: 0;
    margin-left: 0;
    flex-shrink: 0;
    font-size: 21px;
  }
  .match-bar .verified-crest img { height: 100%; }
}
.fixture-row .fixture-teams > b.fixture-kickoff {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 9px;
  border: 1px solid #79967b80;
  border-radius: 5px;
  background: #254b393b;
  color: #dce9dc;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.fixture-row .fixture-teams > b.fixture-kickoff small {
  display: block;
  color: #afc5af;
  font-size: 8px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 1px;
}
.directory-crest [hidden] { display: none; }

/* Appointments and results deliberately use different visual languages. */
.kickoff-badge,
.match-date > .kickoff-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 13px;
  border: 1px solid #afc5af70;
  border-radius: 8px;
  background: #afc5af12;
  color: #dce9dc;
  line-height: 1.2;
  letter-spacing: 0;
}
.kickoff-badge .kickoff-label {
  font: 500 9px/1.3 Arial, sans-serif;
  letter-spacing: .6px;
  text-transform: uppercase;
  white-space: nowrap;
  color: #afc5af;
}
.kickoff-badge > time,
.match-date .kickoff-badge > time {
  font: 500 22px/1.15 Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: .3px;
  color: #dce9dc;
}
.match-date > .home-kickoff { margin: 4px 0; padding: 4px 9px; }
.match-date .home-kickoff > time { font-size: clamp(15px, 1.25vw, 21px); }
.match-date .home-kickoff .kickoff-label { font-size: clamp(7px, .55vw, 9px); }
.detail-score > b.match-versus {
  color: #afc5af;
  font: 500 30px/1.3 Arial, sans-serif;
  letter-spacing: 3px;
}
@media (max-width: 700px) {
  .match-date > .home-kickoff { padding: 4px 7px; margin: 3px 0; }
  .match-date .home-kickoff > time { font-size: 18px; }
  .detail-score > b.match-versus { font-size: 24px; }
}

/* Upcoming fixture: a balanced date/time column, with room around each team. */
.match-bar[data-fixture-status="scheduled"] .match-main {
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 10);
}
.match-bar[data-fixture-status="scheduled"] .match-topline > span { padding-right: 0; }
.match-bar[data-fixture-status="scheduled"] .matchup {
  flex: 1;
  margin-top: 0;
  grid-template-columns: minmax(0, 1fr) calc(var(--u) * 155) minmax(0, 1fr);
  gap: calc(var(--u) * 12);
}
.match-bar[data-fixture-status="scheduled"] .match-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 6);
  padding: 0;
}
.match-bar[data-fixture-status="scheduled"] .match-date::before,
.match-bar[data-fixture-status="scheduled"] .match-date::after { content: none; }
.match-bar[data-fixture-status="scheduled"] .match-date > time { line-height: 1.3; }
.match-bar[data-fixture-status="scheduled"] .home-kickoff {
  margin: 0;
  padding: calc(var(--u) * 6) calc(var(--u) * 12);
}
.match-bar[data-fixture-status="scheduled"] .club-side { gap: calc(var(--u) * 12); }
.match-bar[data-fixture-status="scheduled"] .club-side > div { min-width: 0; }
.match-bar[data-fixture-status="scheduled"] .club-side strong {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}
.match-bar[data-fixture-status="scheduled"] .club-side div > span { line-height: 1.4; }
.match-bar[data-fixture-status="scheduled"] .match-crest { margin-left: 0; }
.match-bar[data-fixture-status="scheduled"] .away-side { justify-content: flex-end; }
@media (min-width: 701px) and (max-width: 1100px) {
  .match-bar[data-fixture-status="scheduled"] .match-main { padding: 16px 20px; gap: 12px; }
  .match-bar[data-fixture-status="scheduled"] .matchup { grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); gap: 10px; }
  .match-bar[data-fixture-status="scheduled"] .club-side { gap: 10px; }
  .match-bar[data-fixture-status="scheduled"] .club-side strong { font-size: 16px !important; }
  .match-bar[data-fixture-status="scheduled"] .club-side div > span { font-size: 8px; letter-spacing: .5px; }
  .match-bar[data-fixture-status="scheduled"] .home-kickoff { padding: 6px 10px; }
  .match-bar[data-fixture-status="scheduled"] .match-date { gap: 6px; }
}
@media (max-width: 700px) {
  .match-bar[data-fixture-status="scheduled"] .match-main { padding: 18px 12px 20px; gap: 20px; }
  .match-bar[data-fixture-status="scheduled"] .matchup { grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr); gap: 8px; }
  .match-bar[data-fixture-status="scheduled"] .match-date { gap: 8px; }
  .match-bar[data-fixture-status="scheduled"] .home-kickoff { padding: 7px 10px; }
  .match-bar[data-fixture-status="scheduled"] .home-kickoff .kickoff-label { font-size: 8px; }
  .match-bar[data-fixture-status="scheduled"] .club-side { gap: 9px; }
  .match-bar[data-fixture-status="scheduled"] .club-side strong { font-size: 14px !important; letter-spacing: 0; }
  .match-bar[data-fixture-status="scheduled"] .club-side div > span { font-size: 8px !important; letter-spacing: .3px; }
  .match-bar[data-fixture-status="scheduled"] .club-side .match-crest,
  .match-bar[data-fixture-status="scheduled"] .club-side .verified-crest { width: 48px; height: 54px; min-width: 0; }
  .match-bar[data-fixture-status="scheduled"] .club-side .verified-crest img { height: 100%; }
  .match-bar[data-fixture-status="scheduled"] .away-side { flex-direction: column-reverse; }
}
