/* UI State Initialization - Prevents flashing of hidden elements on page load */

/* 
  Hide weekends by default if the preference is stored.
  This uses a simple attribute selector trick: we check if a data attribute 
  exists on the html element (which will be set by a minimal inline script).
*/
html[data-hide-weekends="true"] .weekend-day,
html[data-hide-weekends="true"] .weekend-row {
  display: none !important;
}

/* Keep weekend trace markers (dividers) visible even when weekends are hidden */
html[data-hide-weekends="true"] .weekend-trace-marker {
  display: table-cell !important;
}

html[data-hide-weekends="true"] .mini-calendar .weekend-trace-marker {
  display: flex !important;
}

/* For yearly view: hide empty weekend rows when weekends are hidden */
html[data-hide-weekends="true"] .mini-calendar .calendar-days .d-flex {
  display: flex !important;
}

html[data-hide-weekends="true"] .calendar-day.weekend-day:not(:has(*)) {
  background-color: transparent !important;
}
