/* Games & Events page: category accordions and the rules pop-up.
   Kept out of styles.css so returning visitors get it without waiting for the cached stylesheet to expire. */

.game-category .category-heading {
  margin: 0;
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1.15rem;
}

/* games-events.js turns each heading into a button that shows and hides its list. */
.game-category .category-heading.is-toggle {
  padding: 0;
}

.category-heading button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}

.category-heading button::after {
  content: "+";
  content: "+" / "";
  font-size: 1.4rem;
  line-height: 1;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.category-heading button[aria-expanded="true"]::after {
  content: "\2212";
  content: "\2212" / "";
}

.category-heading button:hover {
  background: var(--color-bg-alt);
}

.category-heading button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: -3px;
}

.games-more {
  margin-top: 2rem;
}

.game-dialog {
  width: min(46rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 1.5rem;
  overflow: auto;
  color: var(--color-text);
  background: var(--color-bg);
  border: 3px solid var(--color-border);
  border-radius: var(--radius);
}

.game-dialog::backdrop {
  background: rgba(59, 27, 13, 0.7);
}

.game-dialog h2 {
  margin-top: 0;
}

.game-dialog h2:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.game-rules li {
  margin-bottom: 0.4rem;
}

.game-dialog-actions {
  margin: 1.5rem 0 0;
}

html.game-dialog-open {
  overflow: hidden;
}

/* Special & Past Events: the second main heading on the page, and the recording player pop-up. */
.special-heading {
  margin-top: 3rem;
}

.recording-native {
  display: block;
  width: 100%;
  max-width: 40rem;
  margin: 1rem 0 1.5rem;
}

.recording-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.recording-buttons .btn {
  font-family: inherit;
  cursor: pointer;
}

.recording-field {
  margin-bottom: 1.25rem;
}

.recording-field label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.recording-field input[type="range"] {
  display: block;
  width: 100%;
  height: 2rem;
  margin: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.recording-field input[type="range"]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.recording-time {
  margin: 0.35rem 0;
  font-weight: 600;
}

.recording-status {
  font-weight: 600;
}

/* Home page and Upcoming on GGM: schedule lists and the Tournament Top 10's. */
.schedule-cancelled {
  font-weight: 700;
}

/* An entry that links to its rules: the time sits inside the link, kept on the same line. */
.schedule-list li.schedule-linked {
  display: block;
}

.schedule-linked .schedule-time {
  display: inline-block;
  margin-right: 1.25rem;
}

/* The playback slider handles its own dragging, so the page must not scroll under a finger. */
#recording-position {
  touch-action: none;
}

.standings h3.category-heading {
  font-family: var(--font-body);
}

.standings-text {
  line-height: 1.7;
}

.standings-updated {
  font-style: italic;
}
