/* The band: the listing's boards-deep header with the bar, activity
   chips, 14-day strip, scope line and (mobile) compact strip.
   Contract: DESIGN.md > Component conventions > Band header and
   Color > Text on the band. Phone first (390x844); desktop widens the
   same content into two rows. */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  background: var(--color-boards-deep);
  color: var(--color-band-text);
}

.band-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "brand place account"
    "chips chips chips"
    "strip strip strip";
  align-items: center;
  column-gap: var(--spacing-sm);
  row-gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg) var(--spacing-md);
}

.site-header .brand-link { grid-area: brand; }

/* Focus on the band: ice-blue ring, visible on boards-deep. */
.band-place:focus-visible,
.band-signin:focus-visible,
.band-avatar:focus-visible,
.band-chip:focus-visible,
.strip-cell:focus-visible,
.compact-cell:focus-visible,
.scope-chip-remove:focus-visible,
.earlier-loader-button:focus-visible {
  outline: 2px solid var(--color-ice-blue);
  outline-offset: 2px;
}

/* ---- Bar: location, Sign in / avatar ---------------------------------- */
/* The location pill: a button opening the Where sheet. It reads the
   place, then the distance; the place gives way (ellipsis), the distance
   never shrinks. Items sit 4px apart in 8px side padding and the "·" is
   a DM Sans item, so "Near you · 25 km" fits at 390px under Linux text
   rendering too (DESIGN.md Decisions log 2026-10-14). */
.band-place {
  grid-area: place;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: min(220px, 100%);
  height: 36px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-band-text);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.band-place:hover { border-color: var(--color-band-text-secondary); }
.band-place-chevron {
  flex-shrink: 0;
  color: var(--color-band-text-secondary);
}
.band-place-icon {
  flex-shrink: 0;
  color: var(--color-ice-blue);
}
.band-place-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.band-place-distance {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--color-band-text-secondary);
  white-space: nowrap;
}
.band-place-sep { font-family: var(--font-body); }

.band-account {
  grid-area: account;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
}
.band-signin,
.band-signin:hover {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--color-band-text);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
/* The avatar is a <button> opening the Saved searches sheet: reset the
   UA button padding, font and appearance so it keeps the 36px circle. */
.band-avatar,
.band-avatar:hover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--color-boards-raised);
  border: 1px solid var(--color-band-outline-strong);
  color: var(--color-band-text);
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* ---- Activity chips ------------------------------------------------------ */
.activity-chips {
  grid-area: chips;
  display: flex;
  gap: var(--spacing-sm);
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--spacing-lg));
  padding: 4px var(--spacing-lg);
}
.activity-chips::-webkit-scrollbar { display: none; }
.band-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--color-band-outline);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-band-text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}
.band-chip[aria-pressed="true"] {
  background: #fff;
  border-color: #fff;
  color: var(--color-boards-deep);
}
/* The Goalie chip leads the row with a net glyph, then a divider before
   "Everything" (DESIGN.md > Band header). Same height as every chip. */
.band-chip--goalie { gap: 6px; padding: 0 14px 0 12px; }
.goalie-chip-icon { flex-shrink: 0; }
.chip-divider {
  flex-shrink: 0;
  align-self: center;
  width: 1px;
  height: 22px;
  background: var(--color-band-outline);
}
.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-cat-gray);
}
.chip-dot[data-color="blue"] { background: var(--color-cat-blue); }
.chip-dot[data-color="red"] { background: var(--color-cat-red); }
.chip-dot[data-color="amber"] { background: var(--color-cat-amber); }
.chip-dot[data-color="purple"] { background: var(--color-cat-purple); }
.chip-dot[data-color="teal"] { background: var(--color-cat-teal); }
.chip-dot[data-color="pink"] { background: var(--color-cat-pink); }
.chip-dot[data-color="green"] { background: var(--color-cat-green); }
.chip-dot[data-color="orange"] { background: var(--color-cat-orange); }

/* ---- 14-day strip -------------------------------------------------------- */
.day-strip {
  grid-area: strip;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(48px, 1fr);
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--spacing-lg));
  padding: 0 var(--spacing-lg);
}
.day-strip::-webkit-scrollbar { display: none; }
.strip-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 64px;
  padding: 6px 4px;
  border: 0;
  border-radius: 10px;
  background: var(--color-boards-raised);
  color: var(--color-band-text-secondary);
  font-family: var(--font-body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.strip-weekday {
  font-size: var(--font-size-xs);
  font-weight: 600;
}
.strip-cell.is-weekend .strip-weekday { color: var(--color-band-text); }
.strip-day {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-band-text);
}
.strip-count {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.strip-cell[aria-disabled="true"] { cursor: default; }
.strip-cell[aria-current="true"],
.strip-cell[aria-current="true"] .strip-weekday,
.strip-cell[aria-current="true"] .strip-day {
  background: #fff;
  color: var(--color-boards-deep);
}

/* ---- Scope line ---------------------------------------------------------- */
/* Its own grid row only when present: an absent line takes no height. */
.scope-line {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-sm);
}
.scope-saved {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-sm);
  font-weight: 600;
}
.scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 32px;
  padding: 0 2px 0 12px;
  border: 1px solid var(--color-band-outline);
  border-radius: var(--radius-pill);
  background: var(--color-boards-raised);
  font-size: var(--font-size-sm);
  font-weight: 600;
  white-space: nowrap;
}
/* 24px visual inside a 44px hit area (DESIGN.md > Spacing > Touch targets). */
.scope-chip-remove {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-band-text);
  cursor: pointer;
}
.scope-chip-remove::after {
  content: "";
  position: absolute;
  inset: -10px;
}

/* ---- Compact strip (mobile, once the band has scrolled away) ------------- */
.compact-strip {
  position: fixed;
  top: 2px; /* under the red line */
  left: 0;
  right: 0;
  z-index: 50;
  display: none;
  gap: 6px;
  align-items: center;
  height: 52px;
  padding: 0 var(--spacing-lg);
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--color-boards-deep);
  visibility: hidden;
}
.compact-strip::-webkit-scrollbar { display: none; }
.compact-strip.is-visible { visibility: visible; }
.compact-cell {
  flex-shrink: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-band-outline);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-band-text-secondary);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.compact-cell.is-weekend { color: var(--color-band-text); }
.compact-day {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-band-text);
}
.compact-cell[aria-disabled="true"] { cursor: default; }
.compact-cell[aria-current="true"],
.compact-cell[aria-current="true"] .compact-day {
  background: #fff;
  border-color: #fff;
  color: var(--color-boards-deep);
}

/* ---- The strip's earlier loader (in the list) ---------------------------- */
.earlier-loader { padding: var(--spacing-sm) 0; }
.earlier-loader-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-fresh-sheet);
  color: var(--color-rink-blue);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
}

/* A strip tap scrolls a day group to the top of the list. band.js reads
   this margin as where a tapped day lands and counts the day at the top
   of the list from just below it. */
.date-group { scroll-margin-top: var(--spacing-sm); }
/* While the next page is on its way, room below the loaded rows lets a
   tapped day near their end land at the top at once (band.js). */
.session-list-container.is-awaiting-rows { padding-bottom: 100vh; }

@media (max-width: 767px) {
  .compact-strip { display: flex; }
  /* The compact strip is the only sticky day indicator on the phone
     (DESIGN.md > Layout > Sticky elements), so day headers scroll with
     the list and a scrolled-to day clears the strip. */
  .date-header { position: static; }
  .date-group { scroll-margin-top: 60px; }
}

@media (min-width: 1024px) {
  .band-grid {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "brand chips account"
      "strip strip place";
    column-gap: var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-xl);
  }
  .activity-chips,
  .day-strip {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .band-place { align-self: start; }
}
