/* === Layout === */

.page-title {
  font-size: 2.5rem;   /* adjust size as you like */
  font-weight: bold;   /* keeps it prominent */
  margin: 20px 0;      /* space above/below */
}

.sport-section {
  padding-top: 20px;
}

.main-container {
  max-width: 1940px;
  margin: 0 auto;
  padding: 4px 20px;
  text-align: center;
}

.scroll-top-button {
  background-color: rgba(240, 240, 240, 0.6);
  border: 1px solid #ccc;
  padding: 6px 12px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.scroll-top-button:hover {
  background-color: #ddd;
}

body {
  font-family: Arial, sans-serif;
  background-color: rgb(255, 255, 244);
  padding-top: 60px;
  text-align: center;
}

#controls-sticky {
  position: sticky;
  top: 40px;
  z-index: 999;
  background-color: rgb(255 244 244);         /* solid background (pick your color) */
  padding: 0;
  border-bottom: 1px solid #ccc;
  opacity: 1;                         /* ensure no inherited fade */
  backdrop-filter: none;              /* kill any blur if set elsewhere */
  -webkit-backdrop-filter: none;
}

.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.controls-left-extra {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  gap: 10px;
  min-width: 100px;
  white-space: nowrap;
}

.controls-left {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 200px;
  white-space: nowrap;
}

.controls-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 150px;
}

.controls-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  min-width: 0;
  gap: 10px;
  scrollbar-width: none; /* Firefox */
}

.controls-center::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

#lastUpdated {
  font-size: 10px;
  text-align: center;
  align-self: center;
  padding: 2px;
}
/* === Sticky Bar: 2-row grid with center spanning both rows === */
#controls-sticky { overflow: hidden; }

.sticky-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;   /* left | center | right */
  grid-template-rows: auto auto;          /* top + bottom */
  gap: 2px 16px;                          /* row gap | col gap */
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 20px;  /* first value controls top/bottom */
}

/* Map the five regions to grid cells */
.top-left      { grid-column: 1; grid-row: 1; justify-self: start; }
.bottom-left   { grid-column: 1; grid-row: 2; justify-self: start; }

.center-span   {
  grid-column: 2;
  grid-row: 1 / span 2;                    /* center spans both rows */
  justify-self: center;
  align-self: stretch;
  display: flex; 
  align-items: center;       /* keep buttons vertically centered */
  gap: 14px; /* space between sport buttons */
}

.top-right     { grid-column: 3; grid-row: 1 / span 2; justify-self: end; align-self: center; }

/* Ensure side clusters don’t pull inward */
.controls-left-extra,
.controls-left,
.controls-right { margin: 0; flex: 0 0 auto; }

/* Optional: keep sport buttons from shrinking too small */
#sport-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;         /* space between sport buttons */
  min-height: 36px;
}

.starter-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}

#toggleStarters {
  width: 14px;
  height: 14px;
}

#controls-sticky .bottom-left #selectAllHeatMaps {
  width: 14px;
  height: 14px;
}

/* Sticky bar: make both left-side toggle rows use the same inline-flex alignment */
#controls-sticky .starter-toggle-wrapper,
#controls-sticky .bottom-left .heatmap-toggle-wrapper {
  display: inline-flex;
  align-items: center;      /* vertically center checkbox + text */
  gap: 8px;                 /* match spacing */
  line-height: 1;           /* avoid label sitting low */
}

/* Keep your larger global checkbox, ensure it centers with the label */
#controls-sticky .bottom-left #selectAllHeatMaps {
  width: 14px;
  height: 14px;
  vertical-align: middle;   /* align to text middle */
}

/* Nudge the Heat Maps label to match the Starters label baseline */
#controls-sticky .bottom-left .heatmap-toggle-label {
  display: inline-block;
  line-height: 14px;        /* match the 14px checkbox height */
}

.heatmap-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}

/*html, body { height: 100%; margin: 0; background: #0d1117; }
body > .main-container { min-height: 100vh; }
@supports (height: 100dvh) { body > .main-container { min-height: 100dvh; } }

:root {
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
  --safe-right: env(safe-area-inset-right);
}
body {
  padding-top: max(0px, var(--safe-top));
  padding-bottom: max(0px, var(--safe-bottom));
  padding-left: max(0px, var(--safe-left));
  padding-right: max(0px, var(--safe-right));
}
