/* ==========================================================================
   Match Play Calendario — Eagles Golf
   File: /assets/css/matchplay-calendario.css
   Design: freccia vincitore stile Ryder Cup, card bianche
   ========================================================================== */

.matchday-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.matchday-stat {
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.matchday-stat strong {
  display: block;
  font-family: var(--eagles-heading-family);
  font-size: 28px;
  line-height: 1;
  margin-bottom: 8px;
  color: #fff;
}
.matchday-stat span {
  display: block;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
}

/* ── Round container ── */
.matchday-round {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(17, 18, 21, 0.92), rgba(11, 12, 15, 0.96));
}
.matchday-round-header {
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr minmax(72px, auto);
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 4px 2px 0;
}
.matchday-round-spacer {
  min-width: 72px;
  min-height: 1px;
}
.matchday-round-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  flex: 1 1 auto;
}
.matchday-round-title h2,
.matchday-round-title h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
  font-family: var(--eagles-heading-family);
  text-transform: uppercase;
}
.matchday-round-title .matchday-round-window-desktop {
  display: block;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: .82;
}
.matchday-round-title .matchday-round-window-mobile {
  display: none;
}
.matchday-round-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.68);
}
.matchday-round-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* ── Group container ── */
.matchday-group {
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.matchday-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.matchday-group-head strong {
  font-family: var(--eagles-heading-family);
  font-size: 18px;
  line-height: 1;
  color: #fff;
}
.matchday-group-head span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.58);
}

/* ── Match list & card ── */
.matchday-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
.matchday-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  min-height: 72px;
  padding: 0;
  border-radius: 0;
  background: #ffffff;
  color: #11161c;
  box-shadow: none;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
}
.matchday-card:last-child {
  border-bottom: 0;
}

/* ── Player side ── */
.matchday-side {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  min-width: 0;
  transition: all 0.2s ease;
}
.matchday-side.is-home {
  justify-content: flex-end;
  text-align: right;
}
.matchday-side.is-away {
  justify-content: flex-start;
  text-align: left;
}

/* Winner — red background + arrow clip-path */
.matchday-side.is-winner {
  background: #b11d26;
  position: relative;
}
.matchday-side.is-winner.is-home {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
  padding-right: 28px;
}
.matchday-side.is-winner.is-away {
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 18px 100%, 0 50%);
  padding-left: 28px;
}

/* Loser — muted gray */
.matchday-side.is-loser {
  background: #f9f9f9;
}

/* Avatar — hidden in new design */
.matchday-avatar {
  display: none;
}

/* Player text */
.matchday-player {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.matchday-side.is-home .matchday-player {
  text-align: right;
  align-items: flex-end;
}
.matchday-side.is-away .matchday-player {
  text-align: left;
  align-items: flex-start;
}
.matchday-player strong {
  display: block;
  font-family: var(--eagles-heading-family);
  font-size: 16px;
  line-height: 1.1;
  color: #11161c;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.matchday-player small {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(17,22,28,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: inherit;
}

/* Winner text = white */
.matchday-side.is-winner .matchday-player strong { color: #fff; }
.matchday-side.is-winner .matchday-player small { color: rgba(255,255,255,0.7); }

/* Loser text = muted */
.matchday-side.is-loser .matchday-player strong { color: rgba(17,22,28,0.55); }
.matchday-side.is-loser .matchday-player small { color: rgba(17,22,28,0.35); }

/* ── Center result ── */
.matchday-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 6px 4px;
  background: #ffffff;
  position: relative;
  z-index: 2;
  gap: 0;
}
.matchday-result,
.matchday-result.is-winner-left,
.matchday-result.is-winner-right,
.matchday-result.is-all-square {
  all: unset;
  display: block;
  text-align: center;
}
.matchday-result-score {
  display: block;
  font-family: var(--eagles-heading-family);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  color: #b11d26;
}
/* AS (draw) = gray */
.matchday-result.is-all-square .matchday-result-score {
  color: #3a3a3a;
}
.matchday-result-meta {
  display: block;
  font-family: var(--eagles-heading-family);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(17,22,28,0.5);
}

/* VS for scheduled matches */
.matchday-vs {
  font-family: var(--eagles-heading-family);
  font-size: 16px;
  font-weight: 900;
  color: rgba(17,22,28,0.12);
}
.matchday-vs-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(17,22,28,0.2);
  margin-top: 1px;
}

/* ── Status badge ── */
.matchday-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
  white-space: nowrap;
}
.matchday-status.is-played {
  color: #0d6847;
  border: 1px solid rgba(13,104,71,0.3);
}
.matchday-status.is-scheduled {
  color: #d87a10;
  border: 1px solid rgba(216,122,16,0.3);
}
.matchday-status.is-conceded {
  color: #11161c;
  border: 1px solid rgba(17,22,28,0.25);
}
.matchday-status.is-ritiro {
  color: #3a3a3a;
  border: 1px solid rgba(58,58,58,0.3);
}
.matchday-status.is-walkover {
  color: #5a5a5a;
  border: 1px solid rgba(90,90,90,0.3);
}
.matchday-status.is-undisputed {
  color: rgba(17,22,28,0.35);
  border: 1px solid rgba(17,22,28,0.12);
  padding: 2px 5px;
  letter-spacing: 0.04em;
}

/* ── Group footer ── */
.matchday-group-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 10px 18px 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
  font-size: 11px;
  color: rgba(255,255,255,0.72);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .matchday-summary {
    grid-template-columns: 1fr;
  }
  .matchday-round-groups {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .matchday-round-header {
    grid-template-columns: minmax(56px, auto) 1fr minmax(56px, auto);
    justify-items: stretch;
  }
  .matchday-round-spacer {
    display: block;
    min-width: 56px;
  }
  .matchday-round-title {
    align-items: center;
    text-align: center;
  }
  .matchday-round-title .matchday-round-window-desktop {
    display: none;
  }
  .matchday-round-title .matchday-round-window-mobile {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    opacity: 0.82;
  }
  .matchday-group-head {
    padding: 12px 14px;
  }
  .matchday-card {
    min-height: 56px;
  }
  .matchday-side {
    padding: 10px 12px;
    gap: 6px;
  }
  .matchday-side.is-winner.is-home {
    padding-right: 22px;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
  }
  .matchday-side.is-winner.is-away {
    padding-left: 22px;
    clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
  }
  .matchday-player strong {
    font-size: 12px;
  }
  .matchday-player small {
    font-size: 8px;
    margin-top: 0;
  }
  .matchday-center {
    min-width: 64px;
    padding: 4px 2px;
  }
  .matchday-result-score {
    font-size: 16px;
  }
  .matchday-result-meta {
    font-size: 9px;
  }
  .matchday-status {
    font-size: 6px;
    padding: 2px 6px;
    margin-top: 3px;
  }
  .matchday-status.is-undisputed {
    padding: 2px 4px;
  }
  .matchday-group-footer {
    min-height: 42px;
    padding: 8px 12px 10px;
    font-size: 9px;
  }
}
