/* ==========================================================================
   Class Roster - Print Styles
   Targets: @media print triggered by window.print() from the Print button.
   Shows only the .msw-print-timetable timetable; hides all chrome.
   ========================================================================== */
/* Screen: hide print-only elements */
.msw-print-header,
.msw-print-legend {
  display: none;
}

@media print {
  /* Hide app chrome: preserve the flex-grow-1 wrapper that holds @Body */
  .mud-appbar,
  .mud-drawer,
  .mud-drawer-overlay,
  header,
  nav,
  .mud-main-content > *:not(.flex-grow-1):not([class*=msw-print]) {
    display: none !important;
  }
  /* Hide hero banner, filter bar, action buttons, page chrome, chat widget, footer */
  .mud-paper:not(.msw-print-timetable),
  .mud-button-root,
  .mud-grid,
  .mud-dialog-container,
  .mud-alert {
    display: none !important;
  }
  /* Ensure the timetable container itself is visible */
  .msw-print-timetable,
  .msw-print-timetable * {
    display: revert !important;
    visibility: visible !important;
  }
  /* Print header and legend: visible in print */
  .msw-print-header,
  .msw-print-legend {
    display: flex !important;
    visibility: visible !important;
  }
  /* Clean page */
  @page {
    margin: 1.5cm;
    size: landscape;
  }
  body {
    background: #fff !important;
    background-image: none !important;
    color: #000 !important;
    font-family: "Inter", "Arial", sans-serif !important;
    font-size: 11pt;
  }
  /* Timetable wrapper */
  .msw-print-timetable {
    position: static !important;
    width: 100% !important;
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  /* Print header row */
  .msw-print-header {
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #999;
  }
  .msw-print-header .msw-print-header-school {
    font-size: 14pt;
    font-weight: 700;
    color: #000;
  }
  .msw-print-header .msw-print-header-week {
    font-size: 10pt;
    color: #444;
  }
  .msw-print-header .msw-print-header-filters {
    font-size: 8pt;
    color: #666;
    margin-left: auto;
  }
  /* Print legend row */
  .msw-print-legend {
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    padding-top: 4px;
  }
  .msw-print-legend .msw-print-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 8pt;
    color: #333;
  }
  .msw-print-legend .msw-print-legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
  }
  .msw-print-legend .msw-print-legend-swatch--open {
    background: #2A9D8F;
  }
  .msw-print-legend .msw-print-legend-swatch--limited {
    background: #FFB703;
  }
  .msw-print-legend .msw-print-legend-swatch--full {
    background: #BA1A1A;
  }
  /* Timetable table */
  .msw-timetable {
    width: 100% !important;
    min-width: unset !important;
    border-collapse: collapse !important;
  }
  .msw-timetable th, .msw-timetable td {
    border: 1px solid #ccc !important;
    padding: 4px 6px !important;
    font-size: 9pt !important;
    color: #000 !important;
    background: #fff !important;
  }
  .msw-timetable th {
    background: #f0f0f0 !important;
    font-weight: 700 !important;
  }
  /* Class entries */
  .msw-tt-entry {
    border-left: 2px solid #333 !important;
    background: #fff !important;
    box-shadow: none !important;
    margin-bottom: 2px !important;
    padding: 3px 5px !important;
  }
  .msw-tt-entry--open {
    border-left-color: #2A9D8F !important;
  }
  .msw-tt-entry--limited {
    border-left-color: #FFB703 !important;
  }
  .msw-tt-entry--full {
    border-left-color: #BA1A1A !important;
  }
  .msw-tt-entry .msw-tt-entry-name {
    font-size: 8pt !important;
    font-weight: 600 !important;
    color: #000 !important;
  }
  .msw-tt-entry .msw-tt-entry-meta {
    font-size: 7pt !important;
    color: #444 !important;
  }
  /* MudBlazor chip/icon overrides */
  .mud-chip,
  .mud-icon-button,
  .mud-tooltip-root {
    display: none !important;
  }
}
