/* Golf (sports/golf.js): a season's events, an event's leaderboard, a player's scorecard. */

.gf-h {
  margin: 0;
  padding: 10px 14px;
  font: 700 20px/1.1 var(--display);
  border-bottom: 1px solid var(--line);
}
.gf-h-sub { margin-left: 6px; font: 500 13px var(--body); color: var(--muted); }
.gf-none { color: var(--faint); }
.gf-nw { white-space: nowrap; }
.gf-cc { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--muted); }
.gf-tag { margin-left: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.gf-major {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--major); /* tennis's Slam green */
  color: #fff;
  font: 700 11px/1.6 var(--body);
  text-transform: uppercase;
  vertical-align: 2px;
}
.gf-sm { display: none; }

/* ─── Season ─── */

/* A tour with standings: its events beside them, as tennis's season page has its tournaments
   beside the ATP ranking; one above the other on narrower screens. */
.gf-season {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 16px;
  align-items: start;
}

.gf-cal, .gf-lb, .gf-st { width: 100%; border-collapse: collapse; }
.gf-cal thead th, .gf-lb thead th, .gf-st thead th {
  padding: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
}
/* The dates and the purse are as wide as their widest; the event and its winner share the rest
   and give way (ellipsis) when it runs short. */
.gf-cal .gf-date, .gf-cal .gf-purse { width: 1px; }
.gf-cal th.gf-win { width: 30%; }
.gf-cal .gf-purse { text-align: right; padding-right: 14px; }
.gf-cal thead th:first-child, .gf-cal td:first-child { padding-left: 14px; }
.gf-cal td {
  padding: 8px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}
.gf-cal td.gf-name, .gf-cal td.gf-win { max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gf-cal tr.gf-mo th, .gf-lb tr.gf-grp th {
  padding: 7px 14px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
}
.gf-cal tr.gf-ev { cursor: pointer; }
.gf-cal tr.gf-ev:hover td { background: var(--surface-2); }
.gf-cal td.gf-date { color: var(--muted); }
.gf-cal .gf-name a { font-weight: 600; text-decoration: none; }
.gf-cal .gf-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gf-cal tr.is-major .gf-name a { font-weight: 700; }
.gf-win-sm { display: none; }

/* Standings: rank, player, points, events, wins. Numbers are never cut; the name gives way. */
.gf-st { font-size: 14px; font-variant-numeric: tabular-nums; }
.gf-st thead th { padding: 8px 6px; white-space: nowrap; }
.gf-st td { padding: 6px; border-top: 1px solid var(--line); white-space: nowrap; }
.gf-st .gf-st-rk { width: 1px; padding-left: 14px; text-align: right; color: var(--muted); }
.gf-st td.gf-st-pl { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.gf-st .gf-st-pts, .gf-st .gf-st-ev, .gf-st .gf-st-w { width: 1px; text-align: right; }
.gf-st .gf-st-w { padding-right: 14px; }
.gf-st td.gf-st-ev { color: var(--muted); }
.gf-zero { color: var(--faint); }
.gf-st-x { display: none; }
.gf-st-all .gf-st-x { display: table-row; }
.gf-more {
  display: block;
  width: 100%;
  padding: 10px;
  border: 0;
  background: var(--surface-2);
  font: 600 13px var(--body);
  color: var(--ink);
  cursor: pointer;
}
.gf-more:hover { background: var(--line); }
.gf-more:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
/* Wikipedia's final standings (the Race to Dubai, LIV's points, the PGA Tour before 2019): a team
   column for LIV, the last column against the card's edge. */
.gf-st .gf-st-tm { width: 1px; color: var(--muted); }
.gf-st-listed tr > :last-child { padding-right: 14px; }
.gf-st-note { margin: 0; padding: 9px 14px 11px; font-size: 12px; color: var(--muted); }
.gf-st-note a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.gf-st-note a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ─── Event ─── */

.gf-back {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.gf-back:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.gf-back:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.gf-meta { margin: 4px 0 14px; font-size: 14px; color: var(--muted); }
.gf-meta .gf-major { margin: 0 8px 0 0; }
.gf-dot { margin: 0 7px; color: var(--faint); }

.gf-lb { font-size: 14px; }
.gf-lb thead th { padding: 8px 6px; }
.gf-lb td { padding: 7px 6px; border-top: 1px solid var(--line); white-space: nowrap; }
.gf-lb .gf-pos { width: 52px; padding-left: 14px; }
.gf-lb td.gf-pos { font-weight: 600; }
.gf-lb td.gf-pl { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.gf-lb .gf-r, .gf-lb .gf-tot, .gf-lb .gf-par, .gf-lb .gf-earn { text-align: right; }
.gf-lb .gf-r { width: 40px; color: var(--muted); }
.gf-lb thead .gf-r { color: var(--muted); }
.gf-lb .gf-tot { width: 46px; }
.gf-lb .gf-par { width: 52px; font-weight: 700; }
.gf-lb .gf-earn { width: 118px; padding-right: 14px; color: var(--muted); }
.gf-lb .gf-x { width: 40px; padding: 0 8px 0 0; text-align: right; }
.gf-lb tr > :last-child:not(.gf-x) { padding-right: 14px; }
.gf-lb tr.is-out td.gf-pos, .gf-lb tr.is-out td.gf-pl { color: var(--muted); font-weight: 500; }
.gf-lb.has-cards tr.gf-row { cursor: pointer; }
.gf-lb.has-cards tr.gf-row:hover td, .gf-lb tr.gf-row.is-open td { background: var(--surface-2); }

.gf-exp {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.gf-exp svg { transition: transform .15s ease; }
.gf-exp[aria-expanded="true"] svg { transform: rotate(180deg); }
.gf-exp:hover { background: var(--line); color: var(--ink); }
.gf-exp:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

/* ─── Scorecard ─── */

.gf-lb tr.gf-card-row > td { padding: 0; border-top: 0; background: var(--surface-2); white-space: normal; }
.gf-card { padding: 4px 14px 14px; }
.gf-card-msg { margin: 0; padding: 10px 0 0; color: var(--muted); }
.gf-card-foot { display: flex; justify-content: flex-end; margin: 6px -8px -8px 0; }
.gf-halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.gf-sc { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.gf-sc th, .gf-sc td { padding: 3px 0; text-align: center; border-bottom: 1px solid var(--line); }
.gf-sc thead th { font-size: 11px; font-weight: 700; color: var(--muted); }
.gf-sc th:first-child { width: 38px; text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); }
.gf-sc .gf-sum { width: 36px; font-weight: 700; }
.gf-sc .gf-rt { color: var(--ink); }
.gf-sc tr.gf-parrow td { color: var(--muted); }
.gf-sc tr.gf-course th {
  padding-top: 8px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gf-s {
  display: inline-block;
  min-width: 20px;
  height: 20px;
  line-height: 18px;
  border: 1px solid transparent;
}
.gf-birdie { border-color: var(--ink); border-radius: 50%; }
.gf-eagle { border-color: var(--ink); border-radius: 50%; outline: 1px solid var(--ink); outline-offset: 1px; }
.gf-bogey { border-color: var(--ink); border-radius: 2px; }
.gf-double { border: 3px double var(--ink); border-radius: 2px; line-height: 14px; }

/* ─── Match-play cups ─── */

.gf-cup-s { margin-bottom: 12px; }
.gf-cup-tot { border-collapse: collapse; margin: 6px 14px; font: 600 22px/1.3 var(--display); }
.gf-cup-tot th { padding-right: 18px; text-align: left; font-weight: 600; }
.gf-cup-tot td { text-align: right; }
.gf-cup-tot tr.is-win { font-weight: 700; }
.gf-cup { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.gf-cup th, .gf-cup td { padding: 7px 14px; border-top: 1px solid var(--line); }
.gf-cup thead th { border-top: 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gf-cup .gf-cup-l { text-align: left; }
.gf-cup .gf-cup-r { text-align: right; }
.gf-cup .gf-cup-res { width: 120px; text-align: center; white-space: nowrap; font-weight: 600; }
.gf-cup .is-win { font-weight: 700; }
.gf-cup td:not(.is-win):not(.gf-cup-res) { color: var(--muted); }
.gf-cup-team { font-size: 11px; font-weight: 700; color: var(--muted); }
.gf-cup td.is-win a.gp-a { font-weight: 700; }
/* A bracket's finish: champion, runner-up, third, fourth */
.gf-cup-pod th { width: 120px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; }
.gf-cup-pod tr:first-child th, .gf-cup-pod tr:first-child td { border-top: 0; }
.gf-cup-pod .gf-cup-m { width: 90px; text-align: right; white-space: nowrap; font-weight: 600; }
.gf-cup.gf-cup-pod td:not(.is-win):not(.gf-cup-res) { color: var(--ink); }
.gf-cup-pod tr.is-win td, .gf-cup-pod tr.is-win a.gp-a { font-weight: 700; }
/* LIV's ties: the two teams and the tie's score over its matches */
.gf-cup tr.gf-tie th {
  padding: 7px 14px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
}
.gf-cup tr.gf-tie .is-win { color: var(--ink); font-weight: 700; }
.gf-tie-s { margin: 0 8px; color: var(--ink); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .gf-season { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .gf-halves { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .gf-h { padding: 9px 12px; font-size: 19px; }
  .gf-cal th.gf-date { width: 92px; }
  .gf-cal th.gf-purse { width: 64px; }
  .gf-cal .gf-purse { padding-right: 12px; }
  .gf-cal td.gf-purse { font-size: 13px; vertical-align: top; }
  .gf-cal thead th:first-child, .gf-cal td:first-child, .gf-cal tr.gf-mo th, .gf-lb tr.gf-grp th { padding-left: 12px; }
  .gf-cal .gf-win { display: none; }
  .gf-cal td.gf-name { white-space: normal; }
  .gf-cal td.gf-date { font-size: 13px; vertical-align: top; white-space: normal; }
  .gf-win-sm { display: block; font-size: 13px; color: var(--muted); }
  .gf-st .gf-st-rk { padding-left: 12px; }
  .gf-st .gf-st-w { padding-right: 12px; }
  .gf-st-note { padding: 9px 12px 11px; }

  .gf-lb { font-size: 13px; }
  .gf-lb thead th { padding: 8px 3px; font-size: 10px; letter-spacing: .04em; }
  .gf-lb td { padding: 7px 3px; }
  .gf-lb .gf-pos { width: 40px; padding-left: 10px; }
  .gf-lb .gf-r { width: 27px; }
  .gf-lb .gf-tot { width: 33px; }
  .gf-lb .gf-par { width: 34px; }
  .gf-lb .gf-earn { display: none; }
  .gf-lb .gf-x { width: 26px; padding-right: 4px; }
  .gf-lb tr > :last-child:not(.gf-x) { padding-right: 10px; }
  .gf-exp { width: 22px; }
  .gf-lg { display: none; }
  .gf-sm { display: inline; }
  .gf-lb .gf-cc { display: none; }
  .gf-card { padding: 4px 10px 12px; }
  .gf-sc { font-size: 12px; }
  .gf-sc th:first-child { width: 34px; font-size: 10px; }
  .gf-sc .gf-sum { width: 28px; }
  .gf-s { min-width: 18px; height: 18px; line-height: 16px; }
  .gf-double { line-height: 12px; }
  .gf-cup th, .gf-cup td { padding: 7px 10px; font-size: 13px; }
  .gf-cup .gf-cup-res { width: 78px; }
  .gf-cup-pod th { width: 86px; font-size: 10px; }
  .gf-cup-pod .gf-cup-m { width: 64px; }
  .gf-cup tr.gf-tie th { padding: 7px 10px; font-size: 11px; }
  .gf-lb td.gf-pl.is-team { white-space: normal; }
  .gf-st-listed tr > :last-child { padding-right: 12px; }
}
