/* ============================================================================
   RealCajunRecipes.com - Print Stylesheet
   Optimized for printing recipes
   ============================================================================ */

@media print {
  /* Hide non-essential elements */
  .site-header,
  .site-footer,
  .sidebar,
  .header-search,
  .main-navigation,
  .mobile-menu-toggle,
  .related-recipes,
  .cookbook-badge,
  .recipe-taxonomies,
  .newsletter-section,
  .section-cta,
  .btn,
  .pagination,
  .error-alphonse,
  .hero-alphonse,
  #search {
    display: none !important;
  }

  /* Reset page margins */
  @page {
    margin: 1cm;
  }

  /* Basic reset */
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12pt;
    line-height: 1.5;
    color: black;
    background: white;
  }

  /* Typography */
  h1 {
    font-size: 24pt;
    margin-bottom: 12pt;
    page-break-after: avoid;
  }

  h2 {
    font-size: 18pt;
    margin-top: 18pt;
    margin-bottom: 10pt;
    page-break-after: avoid;
    border-bottom: 2px solid black;
    padding-bottom: 4pt;
  }

  h3 {
    font-size: 14pt;
    margin-top: 12pt;
    margin-bottom: 8pt;
    page-break-after: avoid;
  }

  p {
    margin-bottom: 10pt;
    orphans: 3;
    widows: 3;
  }

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

  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    font-style: italic;
  }

  /* Images */
  img {
    max-width: 100%;
    height: auto;
    page-break-inside: avoid;
  }

  .recipe-featured-image {
    max-width: 50%;
    margin: 0 auto 20pt;
  }

  /* Recipe Page Layout */
  .recipe-page {
    width: 100%;
    padding: 0;
  }

  .recipe-header {
    text-align: center;
    margin-bottom: 20pt;
    border-bottom: 3px solid black;
    padding-bottom: 10pt;
  }

  .recipe-title {
    font-size: 24pt;
    margin-bottom: 8pt;
  }

  .recipe-meta {
    font-size: 10pt;
    margin-bottom: 6pt;
  }

  .recipe-quick-info {
    display: flex;
    justify-content: center;
    gap: 20pt;
    margin: 10pt 0;
    font-weight: bold;
  }

  /* Recipe Content */
  .recipe-description {
    font-size: 12pt;
    line-height: 1.6;
    margin-bottom: 20pt;
  }

  /* Ingredients */
  .recipe-ingredients {
    page-break-inside: avoid;
    margin-bottom: 20pt;
    padding: 10pt;
    border: 2px solid black;
  }

  .recipe-ingredients h2 {
    margin-top: 0;
  }

  .ingredients-list {
    list-style: none;
    padding: 0;
  }

  .ingredient-item {
    margin-bottom: 6pt;
    padding-left: 20pt;
    position: relative;
  }

  .ingredient-item:before {
    content: "☐ ";
    position: absolute;
    left: 0;
    font-size: 14pt;
  }

  .ingredient-checkbox {
    display: none;
  }

  .ingredient-item label {
    display: inline;
  }

  /* Directions */
  .recipe-directions {
    page-break-inside: avoid;
    margin-bottom: 20pt;
  }

  .directions-list {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
  }

  .direction-step {
    counter-increment: step-counter;
    margin-bottom: 12pt;
    padding-left: 40pt;
    position: relative;
    page-break-inside: avoid;
  }

  .direction-step:before {
    content: counter(step-counter) ".";
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 14pt;
  }

  .step-checkbox {
    display: none;
  }

  .direction-step label {
    display: inline;
  }

  /* Recipe Lagniappe */
  .recipe-lagniappe {
    page-break-inside: avoid;
    margin: 20pt 0;
    padding: 15pt;
    border: 2px dashed black;
  }

  .recipe-lagniappe h2 {
    margin-top: 0;
    text-align: center;
  }

  .lagniappe-intro {
    text-align: center;
    font-style: italic;
    margin-bottom: 10pt;
  }

  .lagniappe-tips li {
    margin-bottom: 8pt;
  }

  /* Ensure sections don't break across pages */
  .recipe-ingredients,
  .recipe-directions,
  .recipe-lagniappe,
  .glossary-card,
  .tip-card,
  .culture-card {
    page-break-inside: avoid;
  }

  /* Lists */
  ul, ol {
    margin-left: 20pt;
  }

  li {
    margin-bottom: 4pt;
  }

  /* Tables (if any) */
  table {
    border-collapse: collapse;
    width: 100%;
    page-break-inside: avoid;
  }

  th, td {
    border: 1px solid black;
    padding: 6pt;
    text-align: left;
  }

  th {
    font-weight: bold;
    background: #f0f0f0 !important;
  }

  /* Footer with page number */
  .recipe-page:after {
    content: "Page " counter(page);
    position: fixed;
    bottom: 0;
    right: 0;
    font-size: 10pt;
  }

  /* Print-specific message */
  .print-note {
    font-size: 10pt;
    font-style: italic;
    margin-top: 20pt;
    padding-top: 10pt;
    border-top: 1px solid black;
  }
}
