/* ============================================================
   Culinary Craft — Print Stylesheet
   Optimized for printing single recipe pages
   ============================================================ */

@media print {
  /* Hide non-essential elements */
  .site-header,
  .site-footer,
  .hero,
  .recipe-tags,
  .btn-primary,
  .btn-secondary,
  .btn-signup,
  .header-actions,
  .pagination,
  .reviews-section,
  .related-recipes,
  #search-bar,
  .nav-toggle,
  .breadcrumb,
  .chef-tips__icon-bg,
  .recipe-card__badge,
  .section-header__link,
  #btn-print-recipe,
  #btn-copy-link,
  .review-form,
  .wpadminbar,
  aside .nutrition-label {
    display: none !important;
  }

  /* Page setup */
  @page {
    margin: 1.5cm 2cm;
    size: A4 portrait;
  }

  body {
    font-family: 'Georgia', serif;
    font-size: 11pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  /* Recipe title */
  h1.display-lg {
    font-size: 22pt;
    margin-bottom: 0.5cm;
    border-bottom: 2pt solid #865300;
    padding-bottom: 0.3cm;
    color: #000;
  }

  /* Hero image — full width, max 8cm tall */
  .recipe-hero-img {
    max-height: 8cm;
    overflow: hidden;
    margin-bottom: 0.8cm;
    border-radius: 0;
  }
  .recipe-hero-img img {
    width: 100%;
    object-fit: cover;
    max-height: 8cm;
  }

  /* Meta card — horizontal compact */
  .recipe-meta-card {
    display: flex;
    flex-wrap: wrap;
    gap: 1cm;
    border: 1pt solid #ccc;
    padding: 0.4cm 0.6cm;
    margin-bottom: 0.8cm;
    background: #f9f9f9;
    box-shadow: none;
  }
  .recipe-meta-item .meta-label { font-size: 8pt; }
  .recipe-meta-item .meta-value { font-size: 14pt; }

  /* Two-column print layout */
  .recipe-content-grid {
    display: grid;
    grid-template-columns: 5fr 8fr;
    gap: 1cm;
    page-break-inside: avoid;
  }

  /* Ingredients */
  .ingredients-section h2 {
    font-size: 14pt;
    border-bottom: 1pt solid #000;
    margin-bottom: 0.4cm;
  }
  .ingredient-item {
    padding: 0.15cm 0;
    border-bottom: 0.5pt solid #eee;
  }
  .ingredient-item__checkbox { display: none; }
  .ingredient-text::before {
    content: '□  ';
    font-size: 10pt;
  }

  /* Instructions */
  .instructions-section h2 {
    font-size: 14pt;
    border-bottom: 1pt solid #000;
    margin-bottom: 0.4cm;
  }
  .instruction-step {
    page-break-inside: avoid;
    margin-bottom: 0.5cm;
  }
  .step-number {
    font-size: 24pt;
    color: #865300;
    min-width: 1.5cm;
  }
  .step-content {
    border-bottom: 0.5pt solid #eee;
    padding-bottom: 0.4cm;
  }
  .step-content h4 { font-size: 12pt; margin-bottom: 0.15cm; }
  .step-content p  { font-size: 10.5pt; }

  /* Chef tips */
  .chef-tips {
    background: #f5f5f5;
    border: 1pt solid #ccc;
    padding: 0.5cm;
    page-break-inside: avoid;
  }
  .chef-tips__title { font-size: 13pt; }
  .chef-tips li { font-size: 10pt; }

  /* Nutrition (show inline in print) */
  .nutrition-label {
    display: block !important;
    border: 1pt solid #000;
    padding: 0.5cm;
    font-size: 10pt;
  }
  .nutrition-label__title {
    font-size: 16pt;
    border-bottom: 3pt solid #000;
    padding-bottom: 0.1cm;
    margin-bottom: 0.3cm;
  }

  /* Footer credits */
  .recipe-content-grid::after {
    content: 'Printed from ' attr(data-site-name) ' · ' attr(data-recipe-url);
    display: block;
    font-size: 8pt;
    color: #999;
    margin-top: 1cm;
    border-top: 0.5pt solid #eee;
    padding-top: 0.3cm;
    grid-column: 1 / -1;
  }

  /* Links — show URL after text */
  a[href]::after {
    content: none;
  }

  /* Avoid page breaks inside key elements */
  .recipe-meta-card,
  .instruction-step,
  .chef-tips,
  .nutrition-label {
    page-break-inside: avoid;
  }

  /* Page break before instructions */
  .instructions-section {
    page-break-before: auto;
  }
}
