
/* TennisFinalsPro — Match PRO page. Minimal Flashscore/SaaS compact style. */

:root {
  --pm-bg: #f4f7fb;
  --pm-card: #ffffff;
  --pm-soft: #f8fafc;
  --pm-soft-blue: #eef5ff;
  --pm-border: #dfe7f2;
  --pm-border-strong: #cbd7e8;
  --pm-text: #0f172a;
  --pm-muted: #64748b;
  --pm-blue: #2563eb;
  --pm-blue-2: #0ea5e9;
  --pm-pink: #d946ef;
  --pm-red: #ef4444;
  --pm-green: #10b981;
  --pm-shadow: 0 10px 28px rgba(15, 23, 42, .055);
}

html,
body {
  background: var(--pm-bg) !important;
}

.match-pro-page {
  width: min(1040px, calc(100% - 28px));
  margin: 18px auto 44px;
  padding: 0;
  color: var(--pm-text);
}

.match-pro-hero {
  border: 1px solid var(--pm-border);
  border-radius: 18px;
  padding: 12px;
  background: var(--pm-card);
  box-shadow: var(--pm-shadow);
  color: var(--pm-text);
}

.match-pro-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.match-back-btn {
  min-height: 0 !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  border: 1px solid var(--pm-border) !important;
  background: var(--pm-soft) !important;
  color: var(--pm-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  box-shadow: none !important;
}

.match-pro-chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--pm-blue);
  border: 1px solid #d7e8ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.match-pro-hero__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: center;
}

.match-pro-title-wrap h1 {
  margin: 0 0 4px;
  color: var(--pm-text);
  font-size: clamp(20px, 2.25vw, 28px);
  line-height: 1.06;
  letter-spacing: -.035em;
  font-weight: 900;
}

.match-pro-title-wrap h1 span {
  color: #94a3b8;
  font-weight: 800;
}

.match-pro-title-wrap p {
  margin: 0;
  color: var(--pm-muted);
  font-size: 12px;
  line-height: 1.35;
}

.match-hero-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
  border: 1px solid #dce9fb;
}

.match-hero-scoreboard__player {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--pm-border);
  box-shadow: none;
}

.match-hero-scoreboard__player span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--pm-muted);
  font-size: 11px;
  font-weight: 800;
}

.match-hero-scoreboard__player strong {
  color: var(--pm-text);
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.04em;
}

.match-hero-scoreboard__player.is-winner {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.match-hero-scoreboard__player.is-winner strong {
  color: var(--pm-blue);
}

.match-hero-scoreboard__divider {
  text-align: center;
  color: #94a3b8;
  font-size: 18px;
  font-weight: 900;
}

.match-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.match-summary-mini,
.match-kpi-card,
.match-card,
.match-detail-card,
.match-mini-card {
  border: 1px solid var(--pm-border);
  border-radius: 14px;
  background: var(--pm-card);
  box-shadow: none;
}

.match-summary-mini {
  padding: 9px 10px;
  background: var(--pm-soft);
}

.match-summary-mini span,
.match-kpi-card span,
.match-detail-card span,
.match-mini-card span {
  display: block;
  color: var(--pm-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.match-summary-mini strong,
.match-kpi-card strong,
.match-detail-card strong,
.match-mini-card strong {
  display: block;
  margin-top: 4px;
  color: var(--pm-text);
  font-size: 19px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.03em;
}

.match-summary-mini small,
.match-kpi-card small,
.match-detail-card small,
.match-mini-card small {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
}

.match-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 10px 0;
  padding: 7px;
  border-radius: 15px;
  background: var(--pm-card);
  border: 1px solid var(--pm-border);
  box-shadow: var(--pm-shadow);
  position: static;
}

.match-tab {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--pm-border);
  background: var(--pm-soft);
  color: var(--pm-muted);
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
  transition: .16s ease;
}

.match-tab:hover {
  color: var(--pm-text);
  border-color: var(--pm-border-strong);
}

.match-tab.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--pm-blue), var(--pm-blue-2));
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}

.match-panel {
  display: none;
}

.match-panel.is-active {
  display: block;
}

.match-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.match-kpi-card,
.match-detail-card,
.match-mini-card {
  padding: 10px;
}

.match-two-col {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 10px;
}

.match-card {
  padding: 12px;
  box-shadow: var(--pm-shadow);
}

.match-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 10px;
}

.match-card__head h2 {
  margin: 0;
  color: var(--pm-text);
  font-size: 16px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -.025em;
}

.match-card__head p {
  margin: 0;
  color: var(--pm-muted);
  font-size: 11px;
  line-height: 1.35;
}

.match-set-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.match-set-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  background: var(--pm-soft);
  border: 1px solid var(--pm-border);
  color: var(--pm-muted);
  font-size: 11px;
  font-weight: 850;
}

.match-set-pill strong {
  color: var(--pm-text);
  font-size: 14px;
  line-height: 1;
}

.match-mini-grid,
.match-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.match-card--compare {
  overflow: hidden;
}

.match-compare-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 9px 10px;
  border-radius: 13px;
  background: var(--pm-soft);
  border: 1px solid var(--pm-border);
}

.match-compare-head__player {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.match-compare-head__player.is-right {
  justify-content: flex-end;
}

.match-compare-head__player strong {
  min-width: 0;
  color: var(--pm-text);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-compare-head__dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--pm-blue);
}

.is-right .match-compare-head__dot {
  background: var(--pm-pink);
}

.match-compare-head__center {
  justify-self: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--pm-border);
  color: var(--pm-muted);
  font-size: 10px;
  font-weight: 900;
}

.match-compare-list {
  display: grid;
  gap: 7px;
}

.match-compare-row {
  padding: 9px 10px;
  border: 1px solid var(--pm-border);
  border-radius: 13px;
  background: #fff;
}

.match-compare-row__meta {
  display: grid;
  grid-template-columns: minmax(42px, 1fr) minmax(90px, auto) minmax(42px, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 7px;
}

.match-compare-row__value {
  display: grid;
  gap: 1px;
}

.match-compare-row__value.is-right {
  text-align: right;
}

.match-compare-row__value strong {
  color: var(--pm-text);
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
}

.match-compare-row__value small {
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.1;
  font-weight: 800;
}

.match-compare-row__label {
  color: var(--pm-muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.match-compare-row__bars {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr);
  align-items: center;
}

.match-compare-row__bar-shell {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: #eaf0f8;
  overflow: hidden;
}

.match-compare-row__bar-shell span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.match-compare-row__bar-shell.is-left span {
  margin-left: auto;
  background: linear-gradient(90deg, #8bc5ff, var(--pm-blue));
}

.match-compare-row__bar-shell.is-right span {
  background: linear-gradient(90deg, var(--pm-pink), #f472b6);
}

.match-compare-row__bar-gap {
  position: relative;
  height: 12px;
}

.match-compare-row__bar-gap::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #d5dfec;
}

.match-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--pm-border);
  border-radius: 13px;
  background: #fff;
}

.match-event-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.match-event-table th,
.match-event-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--pm-border);
  text-align: left;
  vertical-align: top;
  font-size: 11px;
}

.match-event-table th {
  position: sticky;
  top: 0;
  background: var(--pm-soft);
  color: var(--pm-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.player-empty {
  padding: 14px;
  border-radius: 12px;
  background: var(--pm-soft);
  border: 1px dashed var(--pm-border);
  color: var(--pm-muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .match-pro-page {
    width: min(375px, calc(100% - 18px));
    margin: 10px auto 34px;
  }

  .match-pro-hero {
    padding: 10px;
    border-radius: 16px;
  }

  .match-pro-topline {
    justify-content: center;
    gap: 6px;
    margin-bottom: 9px;
  }

  .match-back-btn {
    width: auto;
    padding: 6px 9px !important;
    font-size: 10px !important;
  }

  .match-pro-chip {
    min-height: 22px;
    padding: 4px 8px;
    font-size: 9px;
  }

  .match-pro-hero__header {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .match-pro-title-wrap {
    text-align: center;
  }

  .match-pro-title-wrap h1 {
    font-size: 18px;
    line-height: 1.12;
  }

  .match-pro-title-wrap p {
    font-size: 10px;
  }

  .match-hero-scoreboard {
    padding: 7px;
    border-radius: 14px;
  }

  .match-hero-scoreboard__player {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 7px 8px;
  }

  .match-hero-scoreboard__player span {
    font-size: 10px;
  }

  .match-hero-scoreboard__player strong {
    font-size: 24px;
  }

  .match-summary-strip,
  .match-kpi-grid,
  .match-mini-grid,
  .match-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .match-summary-mini,
  .match-kpi-card,
  .match-mini-card,
  .match-detail-card {
    padding: 9px;
    border-radius: 13px;
  }

  .match-summary-mini strong,
  .match-kpi-card strong,
  .match-mini-card strong,
  .match-detail-card strong {
    font-size: 18px;
  }

  .match-tabs {
    margin: 9px 0;
    padding: 6px;
    border-radius: 14px;
  }

  .match-tab {
    padding: 7px 10px;
    font-size: 10px;
  }

  .match-two-col {
    grid-template-columns: 1fr;
  }

  .match-card {
    padding: 10px;
    border-radius: 14px;
  }

  .match-card__head h2 {
    font-size: 15px;
  }

  .match-card__head p {
    font-size: 10px;
  }

  .match-compare-head {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .match-compare-head__player,
  .match-compare-head__player.is-right {
    justify-content: center;
  }

  .match-compare-row {
    padding: 8px 9px;
  }

  .match-compare-row__meta {
    grid-template-columns: 44px minmax(100px, 1fr) 44px;
    gap: 6px;
  }

  .match-compare-row__value strong {
    font-size: 14px;
  }

  .match-compare-row__label {
    font-size: 8.5px;
  }
}

@media (max-width: 380px) {
  .match-pro-page {
    width: calc(100% - 14px);
  }

  .match-summary-strip,
  .match-kpi-grid,
  .match-mini-grid,
  .match-detail-grid {
    gap: 6px;
  }

  .match-summary-mini span,
  .match-kpi-card span,
  .match-detail-card span,
  .match-mini-card span {
    font-size: 8.5px;
  }
}


/* Detailed PRO tab */
.match-card--details-pro {
  padding-bottom: 14px;
}

.match-details-pro {
  display: grid;
  gap: 10px;
}

.match-details-group {
  border: 1px solid var(--pm-border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.match-details-group header {
  padding: 9px 11px;
  background: var(--pm-soft);
  border-bottom: 1px solid var(--pm-border);
  color: var(--pm-text);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.match-details-group__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.match-details-stat {
  min-width: 0;
  padding: 10px 11px;
  border-right: 1px solid var(--pm-border);
  border-bottom: 1px solid var(--pm-border);
}

.match-details-stat:nth-child(4n) {
  border-right: 0;
}

.match-details-stat span {
  display: block;
  min-height: 24px;
  color: var(--pm-muted);
  font-size: 9px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.match-details-stat strong {
  display: block;
  margin-top: 5px;
  color: var(--pm-text);
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.035em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-details-stat small {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 9.5px;
  line-height: 1.25;
  font-weight: 750;
}

@media (max-width: 760px) {
  .match-tabs {
    scroll-snap-type: x proximity;
  }

  .match-tab {
    scroll-snap-align: start;
  }

  .match-details-group__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-details-stat:nth-child(4n) {
    border-right: 1px solid var(--pm-border);
  }

  .match-details-stat:nth-child(2n) {
    border-right: 0;
  }

  .match-details-stat {
    padding: 9px 10px;
  }

  .match-details-stat strong {
    font-size: 18px;
  }
}

@media (max-width: 380px) {
  .match-details-stat span {
    font-size: 8.5px;
  }

  .match-details-stat small {
    font-size: 8.5px;
  }
}


/* V5: Szczegółowe dane as comparison rows */
.match-details-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.match-details-group header span {
  min-width: 0;
}

.match-details-group header small {
  color: var(--pm-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.match-detail-compare-list {
  display: grid;
  gap: 0;
}

.match-detail-compare-row {
  padding: 9px 10px;
  border-bottom: 1px solid var(--pm-border);
  background: #fff;
}

.match-detail-compare-row:last-child {
  border-bottom: 0;
}

.match-detail-compare-row__meta {
  display: grid;
  grid-template-columns: minmax(46px, 1fr) minmax(106px, auto) minmax(46px, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.match-detail-compare-row__value {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.match-detail-compare-row__value.is-right {
  text-align: right;
}

.match-detail-compare-row__value strong {
  color: var(--pm-text);
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-detail-compare-row__value small {
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.1;
  font-weight: 800;
}

.match-detail-compare-row__label {
  color: var(--pm-muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.match-detail-compare-row__bars {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr);
  align-items: center;
}

.match-detail-compare-row__bar-shell {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: #eaf0f8;
  overflow: hidden;
}

.match-detail-compare-row__bar-shell span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.match-detail-compare-row__bar-shell.is-left span {
  margin-left: auto;
  background: linear-gradient(90deg, #8bc5ff, var(--pm-blue));
}

.match-detail-compare-row__bar-shell.is-right span {
  background: linear-gradient(90deg, var(--pm-pink), #f472b6);
}

.match-detail-compare-row.is-neutral .match-detail-compare-row__bar-shell span {
  background: #cbd5e1;
  opacity: .55;
}

.match-detail-compare-row__bar-gap {
  position: relative;
  height: 12px;
}

.match-detail-compare-row__bar-gap::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #d5dfec;
}

@media (max-width: 760px) {
  .match-details-group header {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .match-details-group header small {
    white-space: normal;
    font-size: 8.5px;
  }

  .match-detail-compare-row {
    padding: 8px 9px;
  }

  .match-detail-compare-row__meta {
    grid-template-columns: 46px minmax(112px, 1fr) 46px;
    gap: 6px;
  }

  .match-detail-compare-row__value strong {
    font-size: 14px;
  }

  .match-detail-compare-row__label {
    font-size: 8.4px;
  }
}
