/* Match ticket skin based on bilet1.pdf. Loaded after the legacy stylesheet on purpose. */
.matches-stats-stage .match-row {
  --ticket-ink: #001d66;
  --ticket-stub-width: 224px;

  grid-template-columns: minmax(126px, 144px) minmax(0, 1fr) minmax(168px, 198px);
  grid-template-rows: auto auto auto;
  column-gap: 24px;
  min-height: 146px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.12)),
    url("assets/ticket-paper.jpg") center / cover no-repeat,
    #f8f6ef;
  padding: 22px 34px 20px 22px;
  box-shadow: 0 18px 34px rgba(0, 29, 102, 0.12);
  filter: none;
  content-visibility: auto;
  contain: layout paint style;
  contain-intrinsic-block-size: 146px;
  -webkit-mask: url("assets/ticket-mask.svg") center / 100% 100% no-repeat;
  mask: url("assets/ticket-mask.svg") center / 100% 100% no-repeat;
}

.matches-stats-stage .match-row::before {
  content: "";
  display: none;
}

.matches-stats-stage .match-row::after {
  display: none;
}

.matches-stats-stage .match-row > * {
  position: relative;
  z-index: 2;
}

.matches-stats-stage .match-ticket-stub {
  position: relative;
  z-index: 2;
  grid-column: 3;
  grid-row: 1 / span 3;
  align-self: center;
  justify-self: center;
  display: flex;
  width: min(100%, 158px);
  min-height: 104px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.matches-stats-stage .match-row > div:first-child {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: center;
  padding: 0;
  text-align: center;
}

.matches-stats-stage .match-row > div:first-child strong {
  color: var(--ticket-ink);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.matches-stats-stage .match-row > div:first-child small {
  display: block;
  margin-top: 13px;
  color: var(--ticket-ink);
  font-size: 15px;
  font-weight: 600;
}

.matches-stats-stage .match-row > div:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  min-width: 0;
}

.matches-stats-stage .match-row > div:nth-child(2) strong {
  display: block;
  overflow: visible;
  color: var(--ticket-ink);
  text-transform: uppercase;
  text-overflow: clip;
  white-space: normal;
  font-family: "Montserrat", Inter, sans-serif;
  font-size: clamp(20px, 1.75vw, 25px);
  font-weight: 950;
  letter-spacing: -0.01em;
  line-height: 1.08;
}

.matches-stats-stage .match-row > div:nth-child(2) > span {
  display: block;
  margin-top: 7px;
  color: var(--ticket-ink);
  font-size: clamp(17px, 1.55vw, 22px);
  font-weight: 850;
  line-height: 1.1;
}

.matches-stats-stage .match-extra-meta {
  grid-column: 2;
  grid-row: 3;
  align-self: end;
  margin-top: 11px;
  color: var(--ticket-ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.28;
}

.matches-stats-stage .match-row .result-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 42px;
  border-radius: 22px;
  background: #bdffa9;
  color: var(--ticket-ink);
  padding: 3px 14px 5px;
  font-family: "Montserrat", Inter, sans-serif;
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
}

.matches-stats-stage .result-pill.win {
  background: #bdffa9;
}

.matches-stats-stage .result-pill.draw,
.matches-stats-stage .result-pill.unknown {
  background: #d9d9d9;
}

.matches-stats-stage .result-pill.loss {
  background: #ff7c7c;
}

.matches-stats-stage .match-row .tag {
  display: block;
  width: 100%;
  min-height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--ticket-ink);
  padding: 0;
  text-align: center;
  font-size: 12.5px;
  font-weight: 950;
  line-height: 1.18;
}

@media (max-width: 1120px) {
  .matches-stats-stage .match-row {
    --ticket-stub-width: 200px;
    grid-template-columns: minmax(112px, 132px) minmax(0, 1fr) minmax(146px, 178px);
    column-gap: 18px;
    padding-right: 24px;
  }

  .matches-stats-stage .match-row > div:nth-child(2) strong {
    font-size: clamp(18px, 2.1vw, 23px);
  }

  .matches-stats-stage .match-row > div:nth-child(2) > span {
    font-size: clamp(16px, 1.85vw, 20px);
  }

  .matches-stats-stage .match-row .result-pill {
    min-width: 104px;
    min-height: 40px;
    font-size: 34px;
  }

  .matches-stats-stage .match-ticket-stub {
    width: min(100%, 146px);
    min-height: 96px;
  }
}

@media (max-width: 860px) {
  .matches-stats-stage .match-row {
    grid-template-columns: 1fr;
    min-height: 0;
    contain-intrinsic-block-size: 220px;
    padding: 18px 20px;
    -webkit-mask: none;
    mask: none;
  }

  .matches-stats-stage .match-row::before,
  .matches-stats-stage .match-row::after {
    display: none;
  }

  .matches-stats-stage .match-row > div:first-child,
  .matches-stats-stage .match-row > div:nth-child(2),
  .matches-stats-stage .match-extra-meta,
  .matches-stats-stage .match-ticket-stub {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
    text-align: left;
  }

  .matches-stats-stage .match-row > div:first-child {
    display: flex;
    gap: 12px;
    align-items: baseline;
  }

  .matches-stats-stage .match-row > div:first-child small {
    margin-top: 0;
  }

  .matches-stats-stage .match-ticket-stub {
    align-items: flex-start;
    min-height: 0;
    width: 100%;
    gap: 8px;
  }

  .matches-stats-stage .match-row .result-pill {
    justify-self: start;
    justify-content: center;
    max-width: 128px;
    min-width: 112px;
    font-size: 32px;
  }

  .matches-stats-stage .match-row .tag {
    font-size: 13px;
  }
}
