/* daily.anh.pw custom styles
   - No visible header/page tabs (pages are switched by keyboard, see keys.js).
   - Desktop (>= 1001px CSS width, i.e. also 125-175% zoom on a 1080p screen): the layout is locked to the
     viewport. The page itself never scrolls; columns fill the height and an individual widget scrolls
     internally when its content does not fit.
   - Below 1001px (phones / small tablets) Glance's normal stacked mobile layout and page scroll are kept. */

.header-container { display: none !important; }

@media (min-width: 1001px) {
  html, body { height: 100dvh; overflow: hidden; }
  .body-content { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  .body-content > .content-bounds { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .page { flex: 1 1 auto; height: auto; min-height: 0; display: flex; flex-direction: column; }
  .page.content-ready > .page-content { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .page-columns { flex: 1 1 auto; min-height: 0; align-items: stretch; }

  /* columns: full height, widgets stacked; overflow handled per widget */
  .page-column { display: flex !important; flex-direction: column; gap: var(--widget-gap);
                 min-height: 0; overflow: hidden; position: relative; }
  .page-column > .widget { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; margin-top: 0 !important; }
  .page-column > .widget > .widget-header { flex-shrink: 0; }
  .page-column > .widget > .widget-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
                                             position: relative; /* keeps Glance's absolutely-positioned
                                             .visually-hidden helpers inside the scroll box, not the page */ }
  /* very short widgets keep their natural size */
  .page-column > .widget-type-clock,
  .page-column > .widget-type-monitor:not(:has(.monitor-site)) /* "All sites are online" */ { flex-shrink: 0; }

  /* Google Calendar iframe: fill the remaining height of its column instead of a fixed height */
  .page-column > .widget-type-iframe { flex: 1 1 0; min-height: 200px; }
  .page-column > .widget-type-iframe > .widget-content { display: flex; overflow: hidden; }
  .page-column > .widget-type-iframe iframe { flex: 1 1 auto; height: 100% !important; min-height: 0; width: 100%; }

  /* Glance's own mobile layout starts at <= 1190px; between 1001 and 1190px keep the desktop columns */
  .mobile-navigation, .mobile-navigation-offset { display: none !important; }
}
@media (min-width: 1001px) and (max-width: 1190px) {
  .page-column-small { width: 250px; flex-shrink: 0; }
  .page-column-full { width: 100%; min-width: 0; }
}

/* thin, subtle scrollbars for widgets/columns that scroll internally */
.widget-content, .page-column {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--bghs), calc(var(--bgl) + 16%)) transparent;
}
.widget-content::-webkit-scrollbar, .page-column::-webkit-scrollbar { width: 8px; height: 8px; }
.widget-content::-webkit-scrollbar-track, .page-column::-webkit-scrollbar-track { background: transparent; }
.widget-content::-webkit-scrollbar-thumb, .page-column::-webkit-scrollbar-thumb {
  background: hsl(var(--bghs), calc(var(--bgl) + 16%)); border-radius: 4px;
}
.widget-content::-webkit-scrollbar-thumb:hover, .page-column::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--bghs), calc(var(--bgl) + 26%));
}
