/*
 * CSDIFF match page visual pass — UI only.
 * This file intentionally scopes every rule to .match-page so it can be
 * shipped as a drop-in override without changing shared pages or data logic.
 */

body.match-page {
  background:
    radial-gradient(900px 420px at 64% -90px, rgba(43, 124, 255, .10), transparent 70%),
    var(--bg);
}

.match-page main {
  max-width: 1320px;
  padding: 34px 42px 0;
}

.match-page .match-hero {
  position: relative;
  overflow: hidden;
  padding: 30px 42px 27px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(145deg, var(--surface), var(--surface-raised));
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
  isolation: isolate;
}

.match-page .match-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(60% 120% at 50% 0, rgba(43, 124, 255, .11), transparent 70%);
  z-index: -1;
}

.match-page .match-hero .eyebrow {
  position: relative;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .12em;
}

.match-page .versus {
  position: relative;
  gap: 58px;
  max-width: 720px;
  margin: 29px auto 25px;
}

.match-page .versus-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 260px;
  min-width: 0;
  padding: 15px 20px;
  border-radius: 16px;
  transition: background .18s ease, transform .18s ease;
}

.match-page .versus-team:hover {
  background: rgba(255, 255, 255, .04);
  transform: translateY(-2px);
}

.match-page .versus-team > .logo-box {
  width: 84px;
  height: 84px;
  padding: 8px;
  border-radius: 22px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
}

.match-page .versus-team h2 {
  max-width: 100%;
  margin-top: 14px;
  overflow: hidden;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -.04em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.match-page .vs-time {
  min-width: 116px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, .035);
  box-shadow: 0 0 0 5px rgba(43, 124, 255, .04);
}

.match-page .vs-time strong {
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 650;
  letter-spacing: -.06em;
}

.match-page .vs-time p {
  margin-top: 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.match-page .match-probability {
  position: relative;
  max-width: 600px;
}

.match-page .prob-label {
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.match-page .prob-label b {
  color: var(--text);
  font-size: 14px;
}

.match-page .prob-label b:first-child {
  color: var(--accent);
}

.match-page .prob-bar {
  height: 8px;
  gap: 5px;
  padding: 2px;
  margin-top: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .04);
}

.match-page .prob-bar i {
  height: 4px;
  margin: auto 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #c6ee92, #98c86b);
}

.match-page .prob-bar i:last-child {
  background: #52606b;
}

.match-page .events-section {
  margin-top: 40px;
}

.match-page .section-head {
  margin-bottom: 15px;
}

.match-page .section-head h2,
.match-page .events-section > h2 {
  font-size: 20px;
  letter-spacing: -.04em;
}

.match-page .section-head h2::after,
.match-page .events-section > h2::after {
  content: '';
  display: inline-block;
  width: 26px;
  height: 2px;
  margin: 0 0 5px 10px;
  border-radius: 2px;
  background: var(--accent);
  opacity: .7;
}

.match-page .map-grid {
  gap: 12px;
}

.match-page .map-card {
  min-height: 178px;
  border-color: var(--border);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.match-page .map-card:not(.map-card--static):hover {
  transform: translateY(-3px);
  border-color: rgba(43, 124, 255, .75);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22), 0 0 0 3px rgba(43, 124, 255, .08);
}

.match-page .map-card.active {
  transform: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-bg), 0 10px 26px rgba(0, 0, 0, .2);
}

.match-page .map-card > img {
  opacity: .42;
  transition: opacity .18s ease, transform .4s ease;
}

.match-page .map-card:not(.map-card--static):hover > img {
  opacity: .58;
  transform: scale(1.03);
}

.match-page .map-card::after {
  background: linear-gradient(180deg, rgba(16, 18, 20, .08) 0%, rgba(7, 10, 15, .94) 100%);
}

/* Same specificity as the rule above (2 classes + pseudo-element) — placed after it so source
   order wins: a forfeit map with no photo gets a themed surface, not the dark photo overlay. */
.match-page .map-card--plain::after {
  background: none;
}

.match-page .map-content {
  min-height: 178px;
  padding: 15px 17px;
}

/* Forfeit card with no photo (15.09.2026 review): don't reserve the photo card's height — size
   by content instead. The first rule ties on specificity with .match-page .map-card above (2
   classes each) and wins by being declared after it; the second rule (3 classes) outranks
   .match-page .map-content on specificity alone, regardless of order. */
.match-page .map-card--plain {
  min-height: 0;
}

.match-page .map-card--plain .map-content {
  min-height: 0;
}

.match-page .map-tag {
  border-color: rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(7, 10, 15, .58);
  font-size: 10px;
  letter-spacing: .03em;
}

.match-page .map-content h3 {
  font-size: 23px;
  letter-spacing: -.04em;
}

.match-page .map-score-value {
  font-size: 28px;
}

/* Higher specificity than the plain .map-score-value rule above (and its 760px override below) on
   purpose — a status label ("LIVE · Счёт обновляется"/"Счёт недоступен") must never be forced back
   up to the large numeric-score size this page applies, especially in a narrow mobile card. */
.match-page .map-score-value.map-score-pending,
.match-page .map-score-value.map-score-unavailable {
  font-size: 13px;
}

.match-page .map-score-ai {
  color: rgba(255, 255, 255, .78);
}

.match-page .map-detail {
  margin-top: 10px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--surface), var(--surface-raised));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
}

.match-page .map-detail-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text);
  text-transform: none;
}

.match-page .map-detail-label--ai {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .08em;
}

.match-page .map-detail-label:not(:first-child) {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.match-page .map-detail-insight {
  font-size: 13px;
  line-height: 1.65;
}

.match-page .map-hist-grid {
  gap: 22px;
}

.match-page .map-hist-col {
  min-width: 0;
  overflow: hidden;
}

.match-page .map-hist-col:first-child {
  padding-right: 20px;
  border-right: 1px solid var(--border);
}

.match-page .map-hist-row {
  min-height: 34px;
  padding: 7px 0;
}

.match-page .map-hist-col > p {
  min-height: 34px;
  padding: 10px 0;
  margin: 0;
  display: flex;
  align-items: center;
}

.match-page .match-context-grid {
  align-items: stretch;
  gap: 16px;
  margin-top: 18px;
}

.match-page .match-context-grid > .panel {
  height: 100%;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--surface), var(--surface-raised));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
}

.match-page .match-context-grid .pad {
  padding: 21px 23px;
}

.match-page .match-context-grid .analysis-kicker {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.match-page .match-context-grid .analysis-title {
  margin: 12px 0 10px;
  font-size: 20px;
  line-height: 1.2;
}

.match-page .match-context-grid .body-copy {
  font-size: 13px;
  line-height: 1.65;
}

.match-page .match-context-grid .analysis-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  border-top-color: var(--border);
}

.match-page .match-context-grid .stats-pair {
  margin: 14px 0 7px;
}

.match-page .match-context-grid .stats-track {
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
}

.match-page .odds-panel {
  margin-top: 38px;
}

.match-page .odds-panel .odds-table {
  margin-top: 14px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
}

.match-page .odds-header,
.match-page .odds-row {
  padding: 13px 18px;
}

.match-page .odds-header {
  font-size: 10px;
  letter-spacing: .08em;
}

.match-page .odds-row {
  transition: background .15s ease;
}

.match-page .odds-row:hover {
  background: var(--hover);
}

.match-page .odds-btn {
  min-width: 64px;
  border-radius: 9px;
}

.match-page .odds-promo-link {
  border-radius: 10px;
}

.match-page .roster-match {
  gap: 16px;
}

.match-page .roster-team-panel {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--surface), var(--surface-raised));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
}

.match-page .roster-team-panel .team-head {
  margin-bottom: 14px;
}

.match-page .roster-list {
  gap: 8px;
}

.match-page .roster-card {
  overflow: hidden;
  border-color: var(--border);
  border-radius: 12px;
  background: var(--surface-raised);
}

.match-page .roster-photo {
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
}

.match-page .roster-name {
  color: var(--text);
}

.match-page .map-stats-table {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface), var(--surface-raised));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
}

.match-page .map-stats-header {
  align-items: end;
  padding: 16px 22px 12px;
}

.match-page .map-stats-header span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.match-page .map-stats-header span:first-child,
.match-page .map-stats-header span:last-child {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-transform: none;
  color: var(--text);
}

.match-page .map-stats-header span:last-child {
  text-align: right;
}

.match-page .map-stats-row {
  padding: 12px 22px;
  transition: background .15s ease;
}

.match-page .map-stats-row:nth-child(even) {
  background: rgba(255, 255, 255, .025);
}

.match-page .map-stats-row:hover {
  background: var(--hover);
}

.match-page .map-stats-side b {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  transition: color .15s ease;
}

.match-page .map-stats-side--lead b {
  color: var(--accent);
}

.match-page .map-stats-side--behind b {
  color: var(--muted);
}

.match-page .map-stats-side--empty b {
  color: var(--muted);
  font-weight: 600;
  opacity: .55;
}

.match-page .map-stats-mid {
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.match-page .map-stats-mid .map-badge {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 10px;
}

.match-page .map-stats-icon-wrap {
  display: inline-flex;
}

.match-page .map-stats-icon-wrap .map-badge {
  display: none;
}

.match-page .map-stats-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
}

.match-page .recent-list {
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
}

.match-page .recent-list::-webkit-scrollbar {
  width: 6px;
}

.match-page .recent-list::-webkit-scrollbar-track {
  background: transparent;
}

.match-page .recent-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

.match-page .recent-list::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.match-page .recent-row {
  min-height: 44px;
  padding: 11px 14px;
  transition: background .15s ease;
}

.match-page .recent-row .team-inline {
  min-width: 0;
  flex: 1;
}

.match-page .recent-row .team-inline span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.match-page .recent-row:hover {
  background: var(--hover);
}

.match-page .recent-badge {
  min-width: 26px;
  text-align: center;
}

.match-page .table-scroll {
  overflow: auto;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
}

.match-page .data-table {
  background: transparent;
}

.match-page .data-table th,
.match-page .data-table td {
  padding: 13px 18px;
}

.match-page .data-table tbody tr {
  transition: background .15s ease;
}

.match-page .data-table tbody tr:hover {
  background: var(--hover);
}

.match-page .match-seo {
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--surface), var(--surface-raised));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
}

.match-page .match-seo h2,
.match-page .match-faq h2 {
  margin: 0 0 15px;
}

.match-page .match-seo .body-copy {
  max-width: 930px;
  line-height: 1.65;
}

.match-page .match-faq-list {
  border-radius: 18px;
  background: linear-gradient(145deg, var(--surface), var(--surface-raised));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
}

.match-page .match-seo-links {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.match-page .match-seo-links a {
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.match-page .match-seo-links a:hover {
  border-color: var(--accent);
  background: var(--hover);
  color: var(--accent);
}

.match-page .match-faq-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.match-page .match-faq-list details {
  padding: 0;
  margin: 0;
  border-top: 0;
  border-bottom: 1px solid var(--border);
}

.match-page .match-faq-list details:last-child {
  border-bottom: 0;
}

.match-page .match-faq-list summary {
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  transition: background .15s ease, color .15s ease;
}

.match-page .match-faq-list summary::-webkit-details-marker {
  display: none;
}

.match-page .match-faq-list summary::after {
  content: '+';
  float: right;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.match-page .match-faq-list details[open] summary::after {
  content: '−';
}

.match-page .match-faq-list summary:hover {
  background: var(--hover);
  color: var(--accent);
}

.match-page .match-faq-list details p {
  padding: 0 18px 16px;
}

.match-page .telegram {
  margin-top: 27px;
  padding: 24px 0;
  border-color: var(--border);
}

.match-page footer {
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

@media (max-width: 960px) {
  .match-page main {
    padding: 28px 26px 0;
  }

  .match-page .versus {
    gap: 24px;
  }

  .match-page .versus-team h2 {
    font-size: 24px;
  }
}

@media (max-width: 760px) {
  .match-page main {
    padding: 20px 16px 0;
  }

  .match-page .match-hero {
    padding: 22px 16px 20px;
    border-radius: 18px;
  }

  .match-page .match-hero .eyebrow {
    overflow: hidden;
    font-size: 9px;
    letter-spacing: .08em;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .match-page .versus {
    gap: 8px;
    margin: 20px auto;
  }

  .match-page .versus-team {
    min-width: 0;
    padding: 9px 5px;
  }

  .match-page .versus-team > .logo-box {
    width: 58px;
    height: 58px;
    padding: 6px;
    border-radius: 16px;
  }

  .match-page .versus-team h2 {
    max-width: 120px;
    margin-top: 9px;
    font-size: 17px;
  }

  .match-page .vs-time {
    min-width: 75px;
    padding: 8px;
    border-radius: 12px;
  }

  .match-page .vs-time strong {
    font-size: 25px;
  }

  .match-page .vs-time p {
    font-size: 8px;
    letter-spacing: .1em;
  }

  .match-page .match-probability {
    max-width: none;
  }

  .match-page .prob-label {
    font-size: 10px;
  }

  .match-page .prob-label b {
    font-size: 12px;
  }

  .match-page .events-section {
    margin-top: 30px;
  }

  .match-page .section-head h2,
  .match-page .events-section > h2 {
    font-size: 18px;
  }

  .match-page .map-grid {
    gap: 6px;
  }

  .match-page .map-card,
  .match-page .map-content {
    min-height: 120px;
  }

  .match-page .map-content {
    padding: 9px 8px;
  }

  .match-page .map-content h3 {
    font-size: 10px;
    letter-spacing: normal;
  }

  .match-page .map-score-value {
    font-size: 16px;
  }

  .match-page .map-tag {
    font-size: 8px;
    padding: 2px 5px;
  }

  .match-page .map-detail {
    padding: 16px;
  }

  .match-page .map-hist-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .match-page .map-hist-col:first-child {
    padding-right: 8px;
    border-right: 1px solid var(--border);
  }

  .match-page .map-hist-col:last-child {
    padding-left: 8px;
  }

  .match-page .map-hist-row {
    gap: 6px;
    padding: 6px 0;
  }

  .match-page .map-hist-grid .team-inline {
    gap: 5px;
    min-width: 0;
    flex: 1;
    font-size: 11px;
  }

  .match-page .map-hist-grid .team-inline img {
    width: 16px;
    height: 16px;
  }

  .match-page .map-hist-grid .team-inline span:last-child {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .match-page .map-hist-score {
    padding-left: 4px;
    font-size: 11px;
  }

  .match-page .match-context-grid {
    gap: 10px;
    margin-top: 14px;
  }

  .match-page .match-context-grid .pad {
    padding: 17px 15px;
  }

  .match-page .match-context-grid .analysis-title {
    font-size: 18px;
  }

  .match-page .odds-panel .odds-table {
    margin-top: 11px;
  }

  .match-page .odds-header,
  .match-page .odds-row {
    grid-template-columns: 64px 1fr 1fr;
    gap: 6px;
    padding: 10px 9px;
  }

  .match-page .odds-table--promo .odds-header,
  .match-page .odds-table--promo .odds-row {
    grid-template-columns: 58px 1fr 1fr 1fr;
  }

  .match-page .odds-name {
    font-size: 10px;
  }

  .match-page .odds-btn {
    min-width: 44px;
    padding: 6px 5px;
    font-size: 12px;
  }

  .match-page .roster-team-panel {
    padding: 13px 10px;
    border-radius: 15px;
  }

  .match-page .roster-card {
    border-radius: 9px;
  }

  .match-page .map-stats-header,
  .match-page .map-stats-row {
    grid-template-columns: 1fr 52px 1fr;
    gap: 6px;
    padding: 10px 9px;
  }

  .match-page .map-stats-header span:first-child,
  .match-page .map-stats-header span:last-child {
    font-size: 12px;
  }

  .match-page .map-stats-side b {
    font-size: 19px;
  }

  .match-page .map-stats-mid .map-badge,
  .match-page .map-stats-icon {
    width: 20px;
    height: 20px;
  }

  .match-page .recent-list {
    max-height: 220px;
  }

  .match-page .split-grid:not(.match-lineups) {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .match-page .split-grid:not(.match-lineups) > div {
    min-width: 0;
    overflow: hidden;
  }

  .match-page .split-grid:not(.match-lineups) > div > h3.section-head {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 15px;
  }

  .match-page .recent-row {
    gap: 6px;
    padding: 9px 8px;
  }

  .match-page .recent-row .team-inline {
    gap: 5px;
    font-size: 11px;
  }

  .match-page .recent-row .team-inline img {
    width: 16px;
    height: 16px;
  }

  .match-page .recent-date {
    display: none;
  }

  .match-page .recent-score {
    padding-left: 2px;
    font-size: 11px;
  }

  .match-page .recent-badge {
    min-width: 20px;
    margin-left: 4px;
    padding: 1px 5px;
    font-size: 10px;
  }

  .match-page .data-table {
    font-size: 12px;
  }

  .match-page .data-table th,
  .match-page .data-table td {
    padding: 11px 12px;
  }

  .match-page .match-faq-list summary {
    padding: 14px 13px;
    font-size: 13px;
  }

  .match-page .match-faq-list details p {
    padding: 0 13px 14px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .match-page .versus-team h2 {
    max-width: 100px;
    font-size: 15px;
  }

  .match-page .vs-time {
    min-width: 68px;
  }

  .match-page .versus {
    gap: 2px;
  }
}
