/*
 * Tlačový (A4) zápis o zápase - Match:print.
 * Načítava sa AŽ PO print-schedule.css (spoločný základ: písmo, farby --ps-*, lišta, papier,
 * hlavička, pätička, @page) - tu sú len prvky zápisu (skóre, zostavy, priebeh, podpisy).
 */

.mr-stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5mm 4mm;
  margin: 0 0 3mm;
  color: var(--ps-muted);
  font-size: 10.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.mr-stage:empty {
  display: none;
}

.mr-tag {
  padding: .6mm 2.5mm;
  background: var(--ps-bar);
  border-left: 1.2mm solid var(--ps-purple);
  color: var(--ps-ink);
}

/* ---- skóre ---- */

.mr-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 5mm;
  padding: 3mm 5mm;
  border: .4mm solid var(--ps-line);
  border-radius: 2mm;
  break-inside: avoid;
  page-break-inside: avoid;
}

.mr-team {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mr-team-home {
  text-align: right;
}

.mr-side {
  color: var(--ps-muted);
  font-size: 9pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.mr-team-name {
  font-size: 17pt;
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.mr-result {
  display: flex;
  align-items: center;
  gap: 2mm;
}

.mr-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16mm;
  height: 16mm;
  border: .5mm solid var(--ps-ink);
  border-radius: 1.5mm;
  font-size: 30pt;
  font-weight: 700;
  line-height: 1;
}

.mr-colon {
  font-size: 26pt;
  font-weight: 700;
}

.mr-parts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2mm 3mm;
  margin: 2.5mm 0 0;
  font-size: 10.5pt;
}

.mr-part {
  display: inline-flex;
  align-items: center;
  gap: 1.5mm;
  padding: 1mm 2.5mm;
  background: var(--ps-zebra);
  border: .2mm solid var(--ps-line);
  border-radius: 1mm;
}

.mr-part-number {
  color: var(--ps-purple);
  font-weight: 700;
}

.mr-part-blank {
  display: inline-block;
  width: 7mm;
  height: 5mm;
  border-bottom: .3mm solid var(--ps-ink);
}

.mr-part-note {
  color: var(--ps-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.mr-note {
  margin: -1.5mm 0 2mm;
  color: var(--ps-muted);
  font-size: 9.5pt;
  font-weight: 600;
}

/* ---- zostavy ---- */

.mr-lineup,
.mr-timeline {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.mr-lineup thead {
  display: table-header-group;
}

.mr-lineup-teams th {
  padding: 1.6mm 2.5mm;
  background: var(--ps-bar);
  border-left: 1.2mm solid var(--ps-purple);
  font-size: 11pt;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mr-lineup-teams th.l-gap {
  background: none;
  border: 0;
}

.mr-lineup-head th {
  padding: 1mm 1.5mm;
  border-bottom: .4mm solid var(--ps-ink);
  color: var(--ps-muted);
  font-size: 8.5pt;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.mr-lineup tbody tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.mr-lineup col.c-gap {
  width: 4mm;
}

.mr-lineup col.c-check {
  width: 7mm;
}

.mr-lineup col.c-dress {
  width: 9mm;
}

.mr-lineup col.c-stat {
  width: 8.5mm;
}

.mr-lineup td {
  height: 6.3mm;
  padding: .8mm 1.5mm;
  border-bottom: .2mm solid var(--ps-line);
  font-size: 10.5pt;
  vertical-align: middle;
}

.mr-lineup tbody tr:nth-child(even) td:not(.l-gap) {
  background: var(--ps-zebra);
}

.mr-lineup .l-gap {
  width: 4mm;
  padding: 0;
  border: 0;
  background: none;
}

.mr-lineup .l-check {
  width: 7mm;
  text-align: center;
}

.mr-lineup .l-dress {
  width: 10mm;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mr-lineup .l-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mr-lineup .l-pos {
  margin-left: 1mm;
  color: var(--ps-purple);
  font-size: 8pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.mr-lineup .l-stat {
  width: 9mm;
  text-align: center;
  font-weight: 700;
}

.mr-lineup td.l-stat,
.mr-lineup td.l-check {
  border-left: .2mm solid var(--ps-line);
}

.checkbox {
  display: inline-block;
  width: 3.6mm;
  height: 3.6mm;
  border: .3mm solid var(--ps-ink);
  border-radius: .5mm;
  vertical-align: middle;
}

.mr-legend {
  margin: 1.5mm 0 0;
  color: var(--ps-muted);
  font-size: 9pt;
  font-weight: 600;
}

.mr-legend strong,
.mr-legend b {
  color: var(--ps-ink);
}

/* ---- priebeh zápasu ---- */

.mr-timeline thead {
  display: table-header-group;
}

.mr-timeline th {
  padding: 1.2mm 2.5mm;
  background: var(--ps-bar);
  font-size: 9.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mr-timeline tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.mr-timeline td {
  height: 6.3mm;
  padding: .8mm 2.5mm;
  border-bottom: .2mm solid var(--ps-line);
  font-size: 10.5pt;
  font-weight: 600;
}

.mr-timeline .t-home {
  text-align: right;
}

.mr-timeline .t-time {
  width: 18mm;
  color: var(--ps-purple);
  font-weight: 700;
  text-align: center;
  border-left: .2mm solid var(--ps-line);
  border-right: .2mm solid var(--ps-line);
}

.mr-timeline th.t-time {
  color: var(--ps-muted);
}

/* ---- údaje, poznámky, podpisy (spolu na jednej strane) ---- */

/* podpisy (aj s nadpisom) sa nerozdelia; údaje a poznámky môžu pokračovať na ďalšej strane */
.mr-sign-block,
.mr-details,
.mr-notes {
  break-inside: avoid;
  page-break-inside: avoid;
}

.mr-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2mm 8mm;
  margin: 0;
}

.mr-detail {
  display: flex;
  align-items: flex-end;
  gap: 2mm;
  min-height: 7mm;
}

.mr-detail dt {
  flex: 0 0 auto;
  color: var(--ps-muted);
  font-size: 9.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.mr-detail dd {
  flex: 1 1 auto;
  min-height: 6mm;
  margin: 0;
  border-bottom: .3mm solid var(--ps-line);
  font-size: 11pt;
  font-weight: 600;
}

.mr-notes span {
  display: block;
  height: 7mm;
  border-bottom: .3mm solid var(--ps-line);
}

.mr-signatures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8mm;
  padding-top: 11mm;
}

.mr-signature {
  padding-top: 1.5mm;
  border-top: .4mm solid var(--ps-ink);
  color: var(--ps-muted);
  font-size: 9.5pt;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .04em;
}

@media print {
  .match-report .section-title {
    margin-top: 4mm;
  }
}
