/* Print styles */
@media print {
  /* Reset page margins and ensure content spans full width */
  @page {
    margin: 1.5cm;
    size: auto;
  }

  /* Reset body styles */
  body {
    margin: 0;
    padding: 0;
    min-height: 0 !important;
    display: block !important;
    background: none !important;
  }

  /* Reset flex container styles */
  body.flex,
  .flex,
  .flex-col,
  .h-screen {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
  }

  /* insert ML's email and phone number when printing */
  .ml-email:before {
    content: "matt@christiancourier.com";
  }
  .ml-phone:before {
    content: "(731) 256-7287";
  }

  /* Hide social sharing completely */
  [data-controller="social"],
  [data-controller="social"] * {
    display: none !important;
    visibility: hidden !important;
  }

  /* Ensure main content container takes full width */
  .max-w-7xl,
  .w-full,
  .lg\:w-\[calc\(100\%-544px\)\] {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Reset content area styles */
  .bg-white {
    background: none !important;
  }

  .px-4,
  .lg\:px-6,
  .pt-4 {
    padding: 0 !important;
  }

  /* Hide non-essential elements */
  nav, 
  header,
  button,
  .flash-message,
  [data-turbo-frame],
  .no-print,
  .lg\:block:not(.print\:block),
  #mobile-donate-button,
  #mobile-search-bar,
  .border-r,
  .border-gray-200 {
    display: none !important;
  }

  /* Content styling */
  .trix-content {
    font-size: 12pt;
    line-height: 1.5;
    color: black;
  }

  /* Improve text readability */
  p, li, blockquote {
    orphans: 3;
    widows: 3;
    page-break-inside: avoid;
  }

  /* Ensure proper page breaks */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    break-after: avoid;
    margin-top: 1em !important;
  }

  /* Ensure images don't break across pages and size properly */
  img, figure {
    page-break-inside: avoid;
    break-inside: avoid;
    max-width: 100% !important;
    height: auto !important;
  }

  /* Handle links */
  a {
    text-decoration: none;
    color: black;
  }

  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 90%;
    color: #444;
  }

  a[href^="#"]:after,
  a[href^="javascript:"]:after,
  a[href^="/"]:after {
    content: "";
  }

  /* Reset any gap or spacing utilities */
  .gap-4,
  .mb-6 {
    gap: 0 !important;
    margin: 0 !important;
  }
}

