/* Keep the approved rail styling while making the filtering order explicit. */
.moneylab-v3 #nflGameFilters .nfl-schedule-note,
.moneylab-v3 .moneylab-schedule-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 2px 0 6px;
  color: #bfc9bc;
  font-size: 11px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
.moneylab-v3 #nflGameFilters select { width: 100%; min-width: 0; max-width: 100%; }

.moneylab-v3 #nflGameFilterCount { grid-column: 1 / -1; padding-bottom: 0; }

/* Native selects must shrink with their grid track, including Safari's intrinsic
   option sizing. Bound the controls and each mount rather than hiding overflow. */
body.phase1-money-lab .moneylab-v3 :is(
  .moneylab-v3-game-field,
  .moneylab-v3-filter-field,
  [data-v3-game-mount],
  [data-v3-filter-mount],
  #moneyLabReferenceGameMount,
  #moneyLabReferenceFiltersMount,
  #nflGameFilters,
  .moneylab-schedule-selector
) {
  box-sizing: border-box;
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  max-inline-size: 100%;
}
body.phase1-money-lab .moneylab-v3 :is(#nflGameFilters,.moneylab-schedule-selector) > label {
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  max-inline-size: 100%;
  grid-template-columns: minmax(0,1fr);
}
body.phase1-money-lab .moneylab-v3 :is([data-v3-game-mount],[data-v3-filter-mount]) :is(select,input) {
  display: block;
  box-sizing: border-box;
  width: 100%;
  inline-size: 100%;
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  max-inline-size: 100%;
}

/* Timeframes carry longer season/round/date labels than the two compact season
   fields. Give date and team search full rows instead of clipping the control. */
body.phase1-money-lab .moneylab-v3 #nflGameFilters :is(.nfl-timeframe-filter,.nfl-date-filter,.nfl-team-filter) {
  grid-column: 1 / -1;
}

@media (max-width: 360px) {
  body.phase1-money-lab .moneylab-v3 #nflGameFilters {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
