/* =========================================================
   print-aag.css
   ========================================================= */
@media print {

  @page {
    size: 11in 8.5in;      /* Letter — Landscape */
    margin: 0.5in;         /* 0.5" all sides */

    @bottom-left {
      content: "Alveary Year At-A-Glance";
      font-size: 8pt;
      color: #4b544b;
      white-space: nowrap;
    }

    @bottom-center {
      content: "©2026 Charlotte Mason Institute® All rights reserved.";
      font-size: 8pt;
      color: #4b544b;
      white-space: nowrap;
    }

    @bottom-right {
      content: "p." counter(page);
      font-size: 8pt;
      color: #4b544b;
      white-space: nowrap;
    }
  }

  /* ✅ WRAPPING (this was being ignored before) */
  .yaga-cell,
  .yaga-hcell{
    min-width: 0 !important; /* allows grid items to shrink */
  }

  .yaga-title,
  .yaga-term,
  .yaga-sched{
    white-space: normal !important;      /* override pre-line for print */
    overflow-wrap: anywhere !important;  /* break long strings */
    word-break: break-word !important;
    hyphens: auto !important;
  }

  /* If term fields have <br> / newlines you still want respected, use this instead:
     white-space: pre-wrap !important;
  */

  /* ✅ Prevent a single ROW from splitting */
  .yaga-row{
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
}

   @media print {
  /* Let grid cells shrink so text can wrap instead of overflow */
  .yaga-row > .yaga-cell,
  .yaga-grid-header > .yaga-hcell{
    min-width: 0 !important;
  }

  /* Ensure the actual text wraps inside the cell */
  .yaga-term{
    white-space: pre-wrap !important;   /* preserves Airtable newlines + wraps */
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto !important;
  }
}

@media print {
  /* Don’t split a single row across pages */
  .yaga-row{
    break-inside: avoid !important;
    page-break-inside: avoid !important; /* older engines */
  }

  /* Also keep the subject bar from being split */
  .yaga-subject{
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
}
/* print-aag.css */

@media print {

  /* Make the AAG grid behave nicely on a fixed landscape page */
  .yaga-grid-header,
  .yaga-row{
    grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  /* Critical for grid text wrapping: allow items to shrink */
  .yaga-row > .yaga-cell,
  .yaga-grid-header > .yaga-hcell{
    min-width: 0 !important;
  }
}

@media print {
  .yaga-term,
  .yaga-title,
  .yaga-sched{
    white-space: pre-wrap !important;   /* keeps Airtable line breaks + wraps */
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto !important;
  }
}

@media print {
  .yaga-row,
  .yaga-subject{
    break-inside: avoid !important;
    page-break-inside: avoid !important; /* older engines */
  }
}

@media print {
  /* No vertical dividers in body rows */
  .yaga-row > .yaga-cell{
    border-right: none !important;
  }

  /* If you also want to guarantee no header vertical dividers */
  .yaga-grid-header > .yaga-hcell{
    border-right: none !important;
  }
}
