/* Match rows on the server-rendered pages (sport, competition, team).
   Not the homepage scoreboard -- that keeps its own cards (cards.css).
   A dark panel per group, one slim ticket per match; the row is the link. */

.mr-list { display: grid; gap: 20px; }

.mr-panel {
  overflow: hidden;
  border: 1px solid #22395A;
  border-radius: 20px;
  background: linear-gradient(170deg, #10294A 0%, #0A1C33 100%);
  box-shadow: 0 18px 44px rgba(3, 16, 32, .16);
  color: #EFF5FF;
}
.mr-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(37, 99, 235, .26), transparent 75%);
  border-bottom: 1px solid #22395A;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}
.mr-head a { color: #F7FAFF; text-decoration: none; }
.mr-head a:hover { color: #9FC0FF; }
.mr-head-sub { font-family: var(--font-body); font-weight: 400; font-size: .85rem; color: #8DA9CC; }
.mr-count {
  margin-inline-start: auto;
  padding: 2px 10px;
  border-radius: 99px;
  background: rgba(247, 250, 255, .08);
  font-family: var(--font-body);
  font-size: .8rem;
  color: #B4C9E4;
}

/* ---- the row ------------------------------------------------------ */
.mr {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  color: #EFF5FF;
  transition: background .2s ease;
  animation: mr-in .45s var(--ease-out, ease-out) both;
}
.mr + .mr { border-top: 1px solid rgba(38, 61, 86, .9); }
.mr::before {                         /* the edge that lights on hover */
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--electric, #2563EB);
  transform: scaleY(0);
  transition: transform .22s ease;
}
.mr:hover { background: rgba(72, 134, 255, .09); }
.mr:hover::before, .mr:focus-within::before { transform: scaleY(1); }
.mr-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.mr-link:focus-visible { outline: 2px solid #7FC4FF; outline-offset: -2px; }

.mr-when { display: grid; gap: 2px; }
.mr-time { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.mr-date { font-size: .74rem; color: #8DA9CC; }
.mr-state { font-weight: 700; font-size: .82rem; color: #8DA9CC; }
.mr-live { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: .84rem; color: #FF6B6B; }
.mr-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF4D4D;
  box-shadow: 0 0 0 0 rgba(255, 77, 77, .6);
  animation: mr-pulse 1.6s ease-out infinite;
}

.mr-sides { display: grid; gap: 6px; min-width: 0; }
.mr-side {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.mr-crest { width: 24px; height: 24px; object-fit: contain; }
.mr-crest--initial {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #173557;
  color: #B4C9E4;
  font-size: .72rem;
  font-weight: 700;
}
.mr-name {
  position: relative;
  z-index: 2;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: .96rem;
  color: #EFF5FF;
  text-decoration: none;
}
.mr-name:hover { color: #9FC0FF; text-decoration: underline; text-underline-offset: 3px; }
.mr-score {
  min-width: 30px;
  padding: 1px 8px;
  border-radius: 7px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}
.mr-win .mr-score { background: rgba(37, 99, 235, .45); color: #fff; }
.mr-win .mr-name { color: #fff; font-weight: 700; }
.mr[data-status="finished"]:has(.mr-win) .mr-side:not(.mr-win) { opacity: .62; }

.mr-comp {
  position: relative;
  z-index: 2;
  justify-self: start;
  font-size: .76rem;
  color: #8DA9CC;
  text-decoration: none;
}
.mr-comp:hover { color: #9FC0FF; }

.mr-go { color: #5E7FA8; transition: transform .2s ease, color .2s ease; }
.mr:hover .mr-go { color: #9FC0FF; transform: translateX(3px); }

/* Live rows: the edge stays lit in the live colour and a slow sweep runs. */
.mr[data-status="live"], .mr[data-status="halftime"] {
  background: linear-gradient(90deg, rgba(255, 77, 77, .09), transparent 45%);
}
.mr[data-status="live"]::before, .mr[data-status="halftime"]::before { transform: scaleY(1); background: #FF4D4D; }
.mr[data-status="live"]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: mr-sweep 3.2s ease-in-out infinite;
}

@keyframes mr-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes mr-pulse { 70% { box-shadow: 0 0 0 8px rgba(255, 77, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); } }
@keyframes mr-sweep { to { transform: translateX(100%); } }
.mr:nth-child(2) { animation-delay: .04s; } .mr:nth-child(3) { animation-delay: .08s; }
.mr:nth-child(4) { animation-delay: .12s; } .mr:nth-child(5) { animation-delay: .16s; }
.mr:nth-child(n+6) { animation-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  .mr, .mr-live i, .mr[data-status="live"]::after { animation: none; }
}
[data-motion="off"] :is(.mr, .mr-live i) { animation: none; }
[data-motion="off"] .mr[data-status="live"]::after { animation: none; }

@media (max-width: 720px) {
  .mr { grid-template-columns: 66px minmax(0, 1fr) 16px; gap: 12px; padding: 12px 14px; }
  .mr-head { padding: 12px 14px; }
}
