@tailwind base;
@tailwind components;
@tailwind utilities;

@media print {
  /* Set page to A3 landscape */
  @page {
    size: A3 landscape;
    margin: 15mm;
  }

  /* Prevent page breaks */
  body, html {
    height: auto !important;
    overflow: visible !important;
  }

  /* Constrain to single page - A3 landscape without margins is ~297mm height */
  body {
    max-height: 267mm !important;
  }

  .print-calendar-only {
    max-height: 267mm !important;
    overflow: hidden !important;
  }

  * {
    page-break-after: avoid !important;
    page-break-before: avoid !important;
    page-break-inside: avoid !important;
  }

  .print\:text-xxs {
    font-size: 0.625rem;
    line-height: 0.75rem;
  }

  /* Hide all dashboard sections except calendar */
  .print-hide-dashboard {
    display: none !important;
  }

  /* Hide sidebar and navigation */
  #sidebar,
  .fixed.top-0.left-0.right-0 {
    display: none !important;
  }

  /* Remove left margin and padding from main content area */
  .lg\:ml-64,
  main {
    margin-left: 0 !important;
    padding-top: 0 !important;
  }

  /* Make calendar full width for print */
  .print-calendar-only {
    width: 100% !important;
    max-width: 100% !important;
    grid-column: 1 / -1 !important;
    page-break-inside: avoid !important;
    page-break-after: avoid !important;
    page-break-before: avoid !important;
  }

  .print-calendar-only > div {
    border: none !important;
    box-shadow: none !important;
    max-width: none !important;
    page-break-inside: avoid !important;
  }

  /* Ensure grid doesn't create extra pages */
  .grid {
    page-break-inside: avoid !important;
  }
}
