/* X-Golf Leaderboard. Matches the course list on /courses/: an X-Golf green
   header bar, white rows on hairline rules, 6px corners, the site's own font.

   Everything is scoped to .xgl and the table, cells and buttons are reset
   first, because the theme and Elementor style bare <table>, <th> and
   <button>, and a button's hover and focus would otherwise come from them. */

.xgl {
  --xgl-green: #007041;
  --xgl-green-wash: #e5f2ec;
  --xgl-green-rim: #bfe0d0;
  --xgl-ink: #1a1a1a;
  --xgl-muted: #666666;
  --xgl-rule: #f0f0f0;
  --xgl-edge: #e0e0e0;
  --xgl-hover: #f8faf9;

  max-width: 1200px;
  margin: 0 auto;
  font-family: inherit;
  color: var(--xgl-ink);
  border: 1px solid var(--xgl-edge);
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}
.xgl * { box-sizing: border-box; }

/* The bar, as the course list's region header. */
.xgl-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 12px 20px;
  background: var(--xgl-green);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.xgl-bar strong { font-weight: 700; }

/* Title, description and the Gross / Net switch. */
.xgl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 20px;
  border-bottom: 1px solid var(--xgl-edge);
}
.xgl .xgl-title {
  margin: 0 0 4px;
  padding: 0;
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--xgl-ink);
  text-transform: none;
  letter-spacing: 0;
}
.xgl .xgl-desc { margin: 0; font-size: 0.85rem; color: var(--xgl-muted); }

.xgl-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 6px;
  background: #f5f5f5;
}
.xgl .xgl-tabs button,
.xgl .xgl-tabs button:hover,
.xgl .xgl-tabs button:focus {
  appearance: none;
  margin: 0;
  padding: 9px 20px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: #444444;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
}
.xgl .xgl-tabs button:hover { background: #ebebeb; color: var(--xgl-ink); }
.xgl .xgl-tabs button[aria-selected="true"],
.xgl .xgl-tabs button[aria-selected="true"]:hover,
.xgl .xgl-tabs button[aria-selected="true"]:focus {
  background: var(--xgl-green);
  color: #ffffff;
}
.xgl .xgl-tabs button:focus-visible { outline: 2px solid var(--xgl-green); outline-offset: 2px; }

/* The board. */
.xgl-scroll { overflow-x: auto; }
.xgl-scroll[hidden] { display: none; }

/* "Show the top 10" (1.3.0). Every place is in the page; folded, the ones
   past the top N are hidden. Above the board, and again below it. */
.xgl.is-top [data-more] { display: none; }
.xgl-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--xgl-edge);
}
.xgl-tools[hidden] { display: none; }
.xgl-tools--end { justify-content: center; border-bottom: 0; border-top: 1px solid var(--xgl-edge); }
.xgl .xgl-count { font-size: 0.85rem; color: var(--xgl-muted); }
.xgl .xgl-toggle,
.xgl .xgl-toggle:hover,
.xgl .xgl-toggle:focus {
  appearance: none;
  margin: 0;
  padding: 9px 18px;
  border: 1px solid var(--xgl-green);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: none;
  color: var(--xgl-green);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
}
.xgl .xgl-toggle:hover { background: var(--xgl-green-wash); }
.xgl .xgl-toggle:focus-visible { outline: 2px solid var(--xgl-green); outline-offset: 2px; }
.xgl .xgl-table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  background: transparent;
  font-size: 0.95rem;
}
.xgl .xgl-table th,
.xgl .xgl-table td {
  padding: 12px 20px;
  border: 0;
  background: transparent;
  text-align: left;
  vertical-align: middle;
}
.xgl .xgl-table thead th {
  background: #fafafa;
  border-bottom: 1px solid var(--xgl-edge);
  color: var(--xgl-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.xgl .xgl-table tbody td { border-top: 1px solid var(--xgl-rule); }
.xgl .xgl-table tbody tr:first-child td { border-top: 0; }
.xgl .xgl-table tbody tr { transition: background 0.15s ease; }
.xgl .xgl-table tbody tr:hover td { background: var(--xgl-hover); }
.xgl .xgl-table tbody tr.is-first td { background: var(--xgl-green-wash); }

.xgl .xgl-c-rank, .xgl .xgl-rank { width: 90px; }
.xgl .xgl-table .xgl-c-score, .xgl .xgl-table .xgl-score { width: 120px; text-align: right; } /* .xgl-table: outranks the left-align reset above */
.xgl .xgl-table .xgl-c-hcp, .xgl .xgl-table .xgl-hcp { width: 150px; text-align: right; }
.xgl .xgl-hcp { font-size: 1.05rem; font-weight: 700; color: var(--xgl-ink); font-variant-numeric: tabular-nums; }
.xgl .xgl-rank { color: var(--xgl-green); font-weight: 600; font-variant-numeric: tabular-nums; }
.xgl .xgl-player { font-weight: 600; color: var(--xgl-ink); }
.xgl .xgl-loc { font-size: 0.85rem; color: var(--xgl-muted); }
.xgl .xgl-score { font-size: 1.15rem; font-weight: 700; color: var(--xgl-ink); font-variant-numeric: tabular-nums; }
.xgl .xgl-loc-inline { display: none; }
.xgl .xgl-empty { padding: 28px 20px; color: var(--xgl-muted); text-align: center; }

/* Notes, with the course list's pill badge. */
.xgl-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--xgl-edge);
  background: #fafafa;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--xgl-muted);
}
.xgl .xgl-foot p { margin: 0; }
.xgl .xgl-foot p + p { margin-top: 10px; }
.xgl-badge {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  padding: 2px 8px;
  border: 1px solid var(--xgl-green-rim);
  border-radius: 999px;
  background: var(--xgl-green-wash);
  color: var(--xgl-green);
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.xgl .xgl-flight { color: var(--xgl-ink); font-weight: 600; }
.xgl .xgl-updated { font-size: 0.75rem; }

/* The sponsor's badge: the last thing in the card, centred, on the
   footer's grey so the note and the badge read as one block. */
.xgl-sponsor-badge { padding: 4px 20px 20px; background: #fafafa; text-align: center; line-height: 0; }
.xgl .xgl-sponsor-badge img { display: inline-block; width: 150px; max-width: 60%; height: auto; border-radius: 0; box-shadow: none; } /* the theme rounds every img by 10px, which shaves the corner letters */
.xgl-foot + .xgl-sponsor-badge { margin-top: -1px; }

/* Phones: the location moves under the player's name, as on the course list. */
@media (max-width: 768px) {
  .xgl-bar { flex-direction: column; align-items: flex-start; font-size: 0.72rem; }
  .xgl-head { padding: 16px; }
  .xgl .xgl-table th, .xgl .xgl-table td { padding: 12px 14px; }
  .xgl .xgl-c-rank, .xgl .xgl-rank { width: 56px; }
  .xgl .xgl-table .xgl-c-score, .xgl .xgl-table .xgl-score { width: 76px; }
  .xgl .xgl-table .xgl-c-hcp, .xgl .xgl-table .xgl-hcp { width: 72px; }
  .xgl .xgl-hcp { font-size: 0.95rem; }
  .xgl .xgl-c-loc, .xgl .xgl-loc { display: none; }
  .xgl .xgl-loc-inline { display: block; margin-top: 2px; font-size: 0.8rem; font-weight: 400; color: var(--xgl-muted); }
  .xgl-foot { padding: 14px 16px; }
  .xgl .xgl-sponsor-badge img { width: 110px; }
}
