/* ═══════════════════════════════════════════════════════════════
   BTS Food Service — print.css
   Print-optimized styles for the combined menu view.
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

@media print {

  /* ── Page setup — landscape, fit to one page ── */
  @page {
    size: letter landscape;
    margin: 0.35in 0.35in;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-sizing: border-box;
  }

  /* ── Force single page ── */
  html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  body {
    background: #fff;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 8pt;
    color: #111;
    zoom: 1;
  }

  /* ── Hide everything except the menu calendar ── */
  .site-header,
  .site-footer,
  .building-selector,
  .month-nav,
  .btn,
  .modal-overlay,
  .toast-container,
  .no-print,
  #menu-loading,
  #menu-no-selection,
  #menu-coming-soon,
  .page-hero,
  nav,
  header,
  footer {
    display: none !important;
  }

  /* ── Show print-only elements ── */
  .print-header,
  .print-footer {
    display: flex !important;
  }

  /* ── Main content — remove padding/margin ── */
  .page-main,
  .container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  #menu-calendar {
    display: block !important;
  }

  /* ── Print header ── */
  .print-header {
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 3pt solid #002366;
    padding-bottom: 5pt;
    margin-bottom: 6pt;
  }

  .print-header__maize-bar {
    height: 3pt;
    background: #faeb5c !important;
    margin-bottom: 3pt;
    border-radius: 2pt;
    width: 40pt;
  }

  .print-header__school {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 14pt;
    color: #002366;
    line-height: 1;
  }

  .print-header__month {
    font-size: 10pt;
    font-weight: 600;
    color: #002366;
    margin-top: 2pt;
  }

  .print-header__sub {
    font-size: 6.5pt;
    color: #666;
    margin-top: 2pt;
  }

  .print-header__right {
    text-align: right;
    font-size: 7pt;
    color: #666;
    line-height: 1.5;
  }

  /* ── Calendar wrapper — fit to page ── */
  .calendar-wrapper {
    width: 100%;
    overflow: visible;
  }

  /* ── Calendar table ── */
  .calendar {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    page-break-inside: avoid;
  }

  /* Force the entire calendar onto one page */
  .calendar tbody {
    page-break-inside: avoid;
  }

  .calendar tr {
    page-break-inside: avoid;
    page-break-after: avoid;
  }

  /* ── Header row ── */
  .calendar__head th,
  .calendar thead th {
    background: #002366 !important;
    color: #faeb5c !important;
    font-family: 'DM Sans', Arial, sans-serif;
    font-weight: 700;
    font-size: 7pt;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4pt 3pt;
    text-align: center;
    border: 0.75pt solid #001540;
  }

  /* ── Calendar cells ── */
  .pub-cell,
  .calendar td {
    vertical-align: top !important;
    border: 0.75pt solid #ccd0db !important;
    padding: 3pt !important;
    width: 20% !important;
    page-break-inside: avoid;
    height: auto !important;
    min-height: 0 !important;
  }

  .pub-cell--empty,
  .cal-cell--empty {
    background: #f8f9fc !important;
  }

  /* ── Day date number ── */
  .pub-cell__date {
    font-size: 7pt !important;
    font-weight: 700;
    color: #8a94a8;
    margin-bottom: 2pt;
  }

  .pub-cell__date--today {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12pt;
    height: 12pt;
    background: #002366 !important;
    color: #faeb5c !important;
    border-radius: 50%;
    font-size: 6pt;
  }

  /* ── Day content blocks ── */
  .pub-day-block {
    margin-bottom: 3pt !important;
    padding-bottom: 3pt !important;
    border-bottom: 0.5pt solid #eee !important;
    page-break-inside: avoid;
  }

  .pub-day-block:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
  }

  .pub-day-block__label {
    display: inline-block !important;
    font-size: 5.5pt !important;
    font-weight: 800;
    color: white !important;
    background: #002366 !important;
    padding: 1pt 4pt !important;
    border-radius: 2pt !important;
    margin-bottom: 2pt !important;
    letter-spacing: 0.05em;
  }

  .pub-day-block__entree {
    font-weight: 700 !important;
    font-size: 7pt !important;
    color: #1a1a2e !important;
    line-height: 1.3;
  }

  .pub-day-block__sides {
    font-size: 6.5pt !important;
    color: #444 !important;
    line-height: 1.3;
    margin-top: 1pt;
  }

  .pub-day-block__milk {
    font-size: 6pt !important;
    color: #666 !important;
    margin-top: 1pt;
  }

  .pub-day-block__note {
    font-size: 6pt !important;
    color: #888 !important;
    font-style: italic;
    margin-top: 1pt;
  }

  .pub-day-block--no-school .pub-day-block__no-school {
    font-size: 7pt !important;
    color: #aaa !important;
    font-style: italic;
  }

  .pub-cell__empty {
    color: #ccc !important;
    font-size: 7pt !important;
  }

  /* ── Print footer ── */
  .print-footer {
    align-items: center;
    justify-content: space-between;
    margin-top: 5pt;
    padding-top: 4pt;
    border-top: 0.75pt solid #002366;
    font-size: 6pt;
    color: #8a94a8;
    display: flex !important;
  }

  .print-footer__right { text-align: right; }
}
