/*
  The public match page (phase 4, P4.10, BOARDS H1-P4-MatchResult-Phone and -Desktop). Loaded by the match page
  after results.css (GamesPage css), so the team badge from results.css is available. Same rules as h1.css:
  square, nothing under 12px, no filter, no blur, 44px targets. Colors come from the --h1-* properties each band
  sets, so the same rules read on the night bands and on the paper ones.

  A phone is one column. From 1024px the bands stay full width and their words sit in a 960px column, the two
  teams of the scoring band sit side by side, and the blocks the phone board leaves out (the "Chip in" link, the
  next game) appear.
*/

/* ---------- The photo (or a night band) across the top ---------- */

.h1-mr-hero {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  padding: 0 var(--gzs-gutter-public) 14px;
  overflow: hidden;
  background: var(--gzs-raised);
}

.h1-mr-hero-none {
  min-height: 0;
  padding-top: 20px;
  padding-bottom: 0;
  background-color: var(--gzs-night);
}

.h1-mr-hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
  display: block;
}

.h1-mr-hero-shade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(180deg, rgba(14, 14, 18, 0) 0%, rgba(14, 14, 18, 0) 50%, rgba(14, 14, 18, 0.82) 78%, #0e0e12 100%);
}

.h1-mr-tag {
  position: relative;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  margin: 0;
  padding: 4px 10px 4px 8px;
  background: rgba(14, 14, 18, 0.92);
  color: var(--gzs-text-headline-night);
  font-family: var(--gzs-font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.h1-mr-tag-rule {
  flex: none;
  width: 20px;
  height: 3px;
  background: var(--gzs-text-headline-night);
}

.h1-mr-hero-none .h1-mr-tag {
  background: transparent;
  padding-left: 0;
}

.h1-mr-tag-inline {
  background: transparent;
  padding-left: 0;
}

/* ---------- The title, the score and the first actions ---------- */

.h1-mr-band {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.h1-mr-title {
  margin: 0;
  font-family: var(--gzs-font-display);
  font-size: 40px;
  line-height: 0.92;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--h1-fg-strong);
  overflow-wrap: anywhere;
}

.h1-mr-when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0;
  font-family: var(--gzs-font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--h1-fg-2);
}

.h1-mr-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--h1-fg-strong);
}

.h1-mr-dot {
  flex: none;
  width: 4px;
  height: 4px;
  background: var(--gzs-control);
}

.h1-mr-score {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--h1-line);
}

.h1-mr-side {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 8px 0;
  border-bottom: 1px solid var(--h1-line);
  color: var(--h1-fg-2);
  text-decoration: none;
}

a.h1-mr-side:hover .h1-mr-team {
  text-decoration: underline;
}

.h1-mr-side-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.h1-mr-team {
  font-family: var(--gzs-font-display);
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--h1-fg-strong);
  overflow-wrap: anywhere;
}

.h1-mr-word {
  font-family: var(--gzs-font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--h1-fg-2);
}

.h1-mr-pts {
  flex: none;
  min-width: 2ch;
  text-align: right;
  font-family: var(--gzs-font-display);
  font-size: 56px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--h1-fg-strong);
}

.h1-mr-venue {
  margin: 0;
  font-family: var(--gzs-font-body);
  font-size: 15px;
  line-height: 22px;
  color: var(--h1-fg);
}

.h1-mr-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* The gift link is on desktop only, as the board draws it. */
.h1-mr-chip {
  display: none;
}

/* ---------- The report ---------- */

.h1-mr-prose {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.h1-mr-prose .h1-body {
  font-size: 16px;
  line-height: 25px;
}

.h1-mr-provenance {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ---------- Who scored ---------- */

.h1-mr-teams {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.h1-mr-team-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.h1-mr-team-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--h1-line);
}

.h1-mr-team-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--gzs-font-display);
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--h1-fg-strong);
  overflow-wrap: anywhere;
}

.h1-mr-team-points {
  flex: none;
  font-family: var(--gzs-font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--h1-fg-2);
}

.h1-mr-facts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.h1-mr-fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.h1-mr-fact dt {
  font-family: var(--gzs-font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--h1-fg-2);
}

.h1-mr-fact dd {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  font-family: var(--gzs-font-body);
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  color: var(--h1-fg-strong);
}

.h1-mr-goal {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.h1-mr-goal-sub {
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--h1-fg-2);
}

/* ---------- Player of the match ---------- */

.h1-mr-potm {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.h1-mr-potm-photo {
  flex: none;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 2px solid var(--h1-outline);
}

.h1-mr-potm-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.h1-mr-potm-line {
  margin: 0;
  font-family: var(--gzs-font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--h1-fg-2);
}

/* ---------- Photos ---------- */

.h1-mr-photos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.h1-mr-photo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.h1-mr-photo-link {
  display: block;
}

.h1-mr-photo-img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 120px;
  object-fit: cover;
  background: var(--gzs-raised);
}

.h1-mr-caption {
  margin: 0;
  font-family: var(--gzs-font-body);
  font-size: 14px;
  line-height: 20px;
  color: var(--h1-fg-2);
}

/* ---------- Share ---------- */

.h1-mr-share {
  padding-top: 8px;
  padding-bottom: 20px;
}

.h1-mr-share[hidden],
.h1-mr-act[hidden] {
  display: none;
}

.h1-mr-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.h1-mr-act {
  display: inline-flex;
}

.h1-mr-share-note {
  min-height: 0;
}

.h1-mr-share-note:empty {
  display: none;
}

/* ---------- Thank you to our sponsors ---------- */

.h1-mr-sponsors-intro {
  display: none;
}

.h1-mr-credits {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.h1-mr-credit {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--h1-line);
}

.h1-mr-credit-label {
  margin: 0;
  font-family: var(--gzs-font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--h1-fg-2);
}

.h1-mr-credit-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.h1-mr-credit-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 4px 0;
  color: var(--h1-fg-strong);
  text-decoration: none;
}

.h1-mr-credit-link:hover .h1-mr-credit-name {
  text-decoration: underline;
}

.h1-mr-credit-logo {
  flex: none;
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: #ffffff;
}

.h1-mr-credit-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.h1-mr-credit-name {
  font-family: var(--gzs-font-display);
  font-size: 22px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.h1-mr-credit-detail {
  font-family: var(--gzs-font-body);
  font-size: 14px;
  line-height: 20px;
  color: var(--h1-fg-2);
}

/* ---------- Also in the round, next game, all results ---------- */

.h1-mr-more {
  gap: 24px;
}

.h1-mr-mates,
.h1-mr-next {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.h1-mr-mates .h1-eyebrow,
.h1-mr-next .h1-eyebrow {
  align-items: center;
}

.h1-mr-mate-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.h1-mr-mate-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 0;
  border-bottom: 1px solid var(--h1-line);
  color: var(--h1-fg-strong);
  text-decoration: none;
}

a.h1-mr-mate-link:hover .h1-mr-mate-name {
  text-decoration: underline;
}

.h1-mr-mate-state {
  flex: none;
  min-width: 72px;
  font-family: var(--gzs-font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--h1-fg-2);
}

.h1-mr-mate-side {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.h1-mr-mate-name {
  min-width: 0;
  font-family: var(--gzs-font-display);
  font-size: 18px;
  line-height: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.h1-mr-mate-pts {
  margin-left: auto;
  font-family: var(--gzs-font-display);
  font-size: 22px;
  line-height: 24px;
  font-weight: 800;
}

/* The next game: desktop only, as the board draws it. */
.h1-mr-next {
  display: none;
}

.h1-mr-next-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 44px;
  padding: 10px 0;
  border-bottom: 1px solid var(--h1-line);
  color: var(--h1-fg-strong);
  text-decoration: none;
}

.h1-mr-next-teams {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.h1-mr-v {
  font-family: var(--gzs-font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--h1-fg-2);
}

.h1-mr-next-venue {
  font-family: var(--gzs-font-body);
  font-size: 14px;
  line-height: 20px;
  color: var(--h1-fg-2);
}

.h1-mr-all {
  display: flex;
}

/* ---------- A postponed game ---------- */

.h1-mr-postponed {
  gap: 20px;
}

/* ---------- Desktop ---------- */

/* The bands stay full width and the words sit in a 960px column. The compound selector beats .h1-band, which
   loads after this file. */
@media (min-width: 1024px) {
  .h1-band.h1-mr-band {
    padding-left: max(var(--gzs-gutter-public), calc((100% - 960px) / 2));
    padding-right: max(var(--gzs-gutter-public), calc((100% - 960px) / 2));
  }

  .h1-mr-hero {
    min-height: 360px;
    padding-left: max(var(--gzs-gutter-public), calc((100% - 960px) / 2));
    padding-right: max(var(--gzs-gutter-public), calc((100% - 960px) / 2));
  }

  .h1-mr-hero-none {
    min-height: 0;
  }

  .h1-mr-title {
    font-size: 72px;
  }

  .h1-mr-side {
    min-height: 104px;
  }

  .h1-mr-team {
    font-size: 36px;
  }

  .h1-mr-pts {
    font-size: 72px;
  }

  .h1-mr-actions {
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }

  .h1-mr-actions .h1-main {
    width: auto;
    min-width: 320px;
  }

  .h1-mr-chip {
    display: inline-flex;
  }

  .h1-mr-teams {
    flex-direction: row;
    gap: 48px;
  }

  .h1-mr-team-block {
    flex: 1;
  }

  .h1-mr-photos {
    grid-template-columns: repeat(3, 1fr);
  }

  .h1-mr-sponsors-intro {
    display: block;
    max-width: 640px;
  }

  .h1-mr-credits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 48px;
  }

  .h1-mr-next {
    display: flex;
  }

  .h1-mr-more {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 48px;
    align-items: start;
  }

  .h1-mr-all {
    grid-column: 1 / -1;
  }
}
