/* ════════════════════════════════════════════════════════════
   DISPLAY PREFERENCES — coach toggles in the in-game settings
   panel pick which sections of the game screen are visible.
   Persisted in localStorage['ck_game_display'] and applied via
   body classes set by applyDisplayPrefs() in gameday.html.
   ════════════════════════════════════════════════════════════ */

/* Section visibility — each toggle flips a hide-* class on body. */
body.hide-score #scoreRow         { display: none; }
body.hide-last-sub  #nsLastSub    { display: none !important; }
/* Foul dots live on the chips (.chip-fouls) and the player rows
   (.foul-dots). Hide both to honour a single coach choice. */
body.hide-foul-dots .chip-fouls,
body.hide-foul-dots .foul-dots    { display: none; }

/* Compact period + clock — appears only when score row is hidden so
   the coach still sees what half it is and the time. Single line
   above the chips. */
#periodClockCompact {
  display: none;
  justify-content: center;
  padding: 4px 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 16px;
  color: var(--white);
  gap: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.5px;
}
body.hide-score #periodClockCompact { display: flex; }
#periodClockCompact #pcCompactHalf {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
  align-self: center;
  text-transform: uppercase;
}

/* Chip scaling — when the score row is hidden the chips can grow
   to use the recovered vertical space. Targets the same .ptray-chip
   the tray actually renders. */
body.hide-score .ptray-chip       { min-height: 90px; }
body.hide-score .sgb-chip-label   { font-size: 14px !important; }

/* Display Options section header in the in-game settings panel.
   Same typography as the Advanced divider in the saved-settings tab
   so the two panels feel consistent. */
#ingameSettingsPanel .igsp-section-header {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-family: 'Barlow Condensed', sans-serif;
  margin: 4px 0 4px;
}
#ingameSettingsPanel .igsp-section-divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0 6px;
}

/* Toggle rows that carry a description below the label. The base
   .igsp-row already does space-between; .igsp-row-text wraps the
   two text lines on the left. */
#ingameSettingsPanel .igsp-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
#ingameSettingsPanel .igsp-row-text .igsp-row-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
}
#ingameSettingsPanel .igsp-row-desc {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.3;
}
