/* EG Matches 4.5.4: the sidebar rankings ([eg_matches_rankings]), one compact block with the tabs
   Today, Week, Month and Year. Scoped to the block, with the site's colors where the theme has
   them. Rows are one line high. The open tab's panel is as tall as what it shows (its rows, or the
   one line of the empty text), so the link follows right after; tabs with the same number of rows
   (count each, once enough members play) keep the block's height. */
.eg-matches-side {
  --egm-side-accent: var(--eg-moss, #446931);
  --egm-side-accent-strong: var(--eg-moss-dark, #355d20);
  --egm-side-accent-soft: var(--eg-moss-soft, #edf3e7);
  --egm-side-surface: var(--eg-tint, #f2f7ec);
  --egm-side-paper: var(--eg-paper, #f6f3ea);
  --egm-side-border: var(--eg-rule-strong, #cfcbbf);
  --egm-side-ink: var(--eg-ink, #1f2c1e);
  --egm-side-muted: var(--eg-text, #313b2f);
  --egm-side-row: 32px;
  --egm-side-gap: 4px;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}
.eg-matches-side[hidden],
.eg-matches-side [hidden] {
  display: none !important;
}

/* The tabs: a small segmented control, as in the Matches page's Rankings panel; the theme's
   button look (its size, hover, focus and transitions) doesn't reach them. */
.eg-matches-side .egm-side-tabs {
  display: flex;
  gap: 2px;
  margin: 0 0 10px;
  padding: 2px;
  border: 1px solid var(--egm-side-border);
  border-radius: 8px;
  background: var(--egm-side-paper);
}
.eg-matches-side .egm-side-tab,
.eg-matches-side .egm-side-tab:focus-visible {
  flex: 1 1 0;
  min-width: 0;
  min-height: 28px;
  margin: 0;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--egm-side-muted);
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  cursor: pointer;
  transform: none;
  transition: none;
}
.eg-matches-side .egm-side-tab:hover {
  background: var(--egm-side-accent-soft);
  color: var(--egm-side-accent-strong);
}
.eg-matches-side .egm-side-tab.is-active,
.eg-matches-side .egm-side-tab.is-active:hover,
.eg-matches-side .egm-side-tab.is-active:focus-visible {
  background: var(--egm-side-accent);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(35, 59, 23, 0.15);
}
.eg-matches-side .egm-side-tab:focus-visible,
.eg-matches-side .egm-side-panel:focus-visible {
  outline: 2px solid var(--egm-side-accent-strong);
  outline-offset: 2px;
}

.eg-matches-side .egm-side-panels {
  margin: 0 0 10px;
}
.eg-matches-side .egm-side-panel {
  border-radius: 8px;
}
.eg-matches-side .egm-side-list {
  display: grid;
  /* 4.26.0: the one column is as wide as the list and no wider. Left to itself it took the width of the
     longest name (a name is kept on one line), and a row with a 20-letter name stood out of the box:
     on a phone the whole page could then be moved sideways. Now such a name is cut with "…". */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--egm-side-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.eg-matches-side .egm-side-row {
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  height: var(--egm-side-row);
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: var(--egm-side-surface);
  color: var(--egm-side-ink);
  list-style: none;
}
.eg-matches-side .egm-side-pos {
  flex: 0 0 auto;
  min-width: 1.6em;
  color: var(--egm-side-accent-strong);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.eg-matches-side .egm-side-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eg-matches-side .egm-side-figures {
  flex: 0 0 auto;
  color: var(--egm-side-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.eg-matches-side .egm-side-empty {
  margin: 0;
  color: var(--egm-side-muted);
}
/* 4.5.4: "Play Matches" is a button across the block, as the course box's "Continue" (EG Account's
   button: the site's green, white text, 46px high, the site's corner radius). */
.eg-matches-side .egm-side-play {
  margin: 0;
}
.eg-matches-side .egm-side-play a {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid var(--egm-side-accent);
  border-radius: var(--eg-radius, 6px);
  background: var(--egm-side-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.eg-matches-side .egm-side-play a:hover,
.eg-matches-side .egm-side-play a:focus-visible {
  border-color: var(--egm-side-accent-strong);
  background: var(--egm-side-accent-strong);
  color: #fff;
  text-decoration: none;
}
.eg-matches-side .egm-side-play a:focus-visible {
  outline: 2px solid var(--egm-side-accent);
  outline-offset: 2px;
}

/* EG Matches 4.27.0: the Total's block. Under its rows one line says how the total is made; then
   the way to each of the two rankings, side by side (a label that needs it breaks into two lines). */
.eg-matches-side .egm-side-note {
  margin: 0 0 10px;
  color: var(--egm-side-muted);
  font-size: 13.5px;
  line-height: 1.4;
}
.eg-matches-side .egm-side-play--two {
  display: flex;
  gap: 8px;
}
.eg-matches-side .egm-side-play--two a {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 8px;
  font-size: 15px;
}

/* EG Matches 4.24.0: a box of several rankings: a tab for each ("Exercises", "Matches") above the
   ranking's own block. The two tabs share the box's width; the open one is underlined in the
   site's green. The theme's button look doesn't reach them. */
.egm-boards {
  --egm-boards-accent: var(--eg-moss, #446931);
  --egm-boards-accent-strong: var(--eg-moss-dark, #355d20);
  --egm-boards-border: var(--eg-rule-strong, #cfcbbf);
  --egm-boards-ink: var(--eg-ink, #1f2c1e);
  --egm-boards-muted: var(--eg-text, #313b2f);
  margin: 0;
}
.egm-boards[hidden],
.egm-boards [hidden] {
  display: none !important;
}
.egm-boards .egm-boards-tabs {
  display: flex;
  gap: 0;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--egm-boards-border);
}
.egm-boards .egm-boards-tab,
.egm-boards .egm-boards-tab:hover,
.egm-boards .egm-boards-tab:focus-visible {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  margin: 0 0 -1px;
  padding: 8px 6px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--egm-boards-muted);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  cursor: pointer;
  transform: none;
  transition: none;
}
.egm-boards .egm-boards-tab:hover {
  color: var(--egm-boards-accent-strong);
  border-bottom-color: var(--egm-boards-border);
}
.egm-boards .egm-boards-tab.is-active,
.egm-boards .egm-boards-tab.is-active:hover,
.egm-boards .egm-boards-tab.is-active:focus-visible {
  border-bottom-color: var(--egm-boards-accent);
  color: var(--egm-boards-ink);
  font-weight: 700;
}
.egm-boards .egm-boards-tab:focus-visible {
  outline: 2px solid var(--egm-boards-accent-strong);
  outline-offset: -2px;
}
@media (forced-colors: active) {
  .egm-boards .egm-boards-tab.is-active {
    border-bottom-color: Highlight;
  }
}
