/**
 * leckivo – Professional Print Stylesheet
 * Optimized for recipe printing with clean, readable layout
 *
 * @package leckivo
 */

@media print {

  /* ── 1. Reset & Base ──────────────────────────────── */
  *,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

  html, body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 11pt;
    line-height: 1.6;
    color: #000;
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  a { color: #000; text-decoration: none; }
  img { max-width: 100%; }

  /* ── 2. Hide Everything Non-Essential ─────────────── */
  .site-header,
  .site-footer,
  .mobile-sticky-cta,
  .back-to-top,
  .recipe-actions,
  .newsletter-section,
  .pinterest-cta,
  .comments-section,
  .related-recipes,
  .sidebar,
  .recipe-sidebar,
  .adsense-slot,
  .filters-bar,
  .cookie-banner,
  .search-overlay,
  .mobile-menu,
  .nav-overlay,
  .breadcrumbs,
  .faq-block,
  .seo-text-block,
  .internal-links,
  .hero,
  .slider-wrapper,
  .archive-hero,
  .tag-cloud,
  nav,
  .btn,
  button:not(.timer-btn) { display: none !important; }

  /* ── 3. Page Layout ───────────────────────────────── */
  @page {
    margin: 15mm 20mm;
    size: A4 portrait;
  }

  @page :first {
    margin-top: 10mm;
  }

  .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .single-recipe-layout {
    display: block;
    grid-template-columns: 1fr;
  }

  /* ── 4. Print Header (leckivo Branding) ─────────── */
  body::before {
    content: "leckivo.com";
    display: block;
    font-family: Georgia, serif;
    font-size: 10pt;
    font-weight: bold;
    letter-spacing: 4px;
    color: #2D6A4F;
    text-align: center;
    padding-bottom: 8pt;
    margin-bottom: 16pt;
    border-bottom: 2pt solid #2D6A4F;
  }

  /* ── 5. Recipe Hero Image ─────────────────────────── */
  .recipe-hero {
    display: block !important;
    max-height: 220pt;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 16pt;
    page-break-after: avoid;
  }

  .recipe-hero-img {
    width: 100%;
    max-height: 220pt;
    object-fit: cover;
  }

  .recipe-hero-overlay { display: none; }

  /* ── 6. Recipe Title & Meta ───────────────────────── */
  .recipe-header {
    margin-bottom: 14pt;
    page-break-after: avoid;
  }

  .recipe-title {
    font-family: Georgia, serif;
    font-size: 22pt;
    font-weight: bold;
    color: #1B4332;
    line-height: 1.2;
    margin-bottom: 8pt;
  }

  .recipe-meta-row {
    display: flex;
    gap: 16pt;
    flex-wrap: wrap;
    font-size: 9pt;
    color: #555;
    margin-bottom: 8pt;
  }

  .recipe-rating-display,
  .recipe-author-info,
  .recipe-date,
  .reading-time { font-size: 9pt; }

  /* ── 7. Quick Info Bar ────────────────────────────── */
  .quick-info-bar {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    border: 1.5pt solid #2D6A4F;
    border-radius: 4pt;
    padding: 8pt;
    gap: 4pt;
    margin-bottom: 14pt;
    background: #F3F4F6;
    page-break-inside: avoid;
  }

  .quick-info-item { text-align: center; padding: 4pt; }
  .quick-info-icon { font-size: 14pt; display: block; margin-bottom: 2pt; }
  .quick-info-label { font-size: 7pt; color: #666; display: block; text-transform: uppercase; letter-spacing: 0.04em; }
  .quick-info-value { font-size: 10pt; font-weight: bold; }

  /* ── 8. Ingredients ───────────────────────────────── */
  .ingredients-box {
    display: block !important;
    border: 1.5pt solid #E5E7EB;
    border-radius: 4pt;
    padding: 10pt;
    margin-bottom: 14pt;
    page-break-inside: avoid;
  }

  .ingredients-header { margin-bottom: 8pt; }

  .ingredients-title {
    font-family: Georgia, serif;
    font-size: 14pt;
    font-weight: bold;
    color: #1B4332;
    border-bottom: 1pt solid #ccc;
    padding-bottom: 4pt;
    margin-bottom: 8pt;
  }

  .servings-control { display: none; }

  .ingredient-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2pt 16pt;
  }

  .ingredient-item {
    display: flex;
    gap: 6pt;
    align-items: flex-start;
    padding: 3pt 0;
    border-bottom: 0.5pt solid #eee;
    font-size: 10pt;
    page-break-inside: avoid;
  }

  .ingredient-checkbox { display: none; }

  .ingredient-amount {
    font-weight: bold;
    color: #2D6A4F;
    min-width: 50pt;
    flex-shrink: 0;
  }

  .ingredient-item.checked {
    opacity: 1;
    text-decoration: none;
  }

  /* ── 9. Steps ─────────────────────────────────────── */
  .steps-list {
    display: grid;
    gap: 8pt;
    margin-bottom: 14pt;
  }

  .step-item {
    display: flex;
    gap: 8pt;
    padding: 8pt;
    border: 0.5pt solid #E5E7EB;
    border-radius: 4pt;
    page-break-inside: avoid;
  }

  .step-number {
    width: 22pt;
    height: 22pt;
    border-radius: 50%;
    background: #2D6A4F;
    color: #fff;
    font-weight: bold;
    font-size: 10pt;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .step-title {
    font-weight: bold;
    font-size: 10pt;
    margin-bottom: 3pt;
  }

  .step-text {
    font-size: 10pt;
    color: #333;
    line-height: 1.5;
  }

  /* ── 10. Nutrition Facts ──────────────────────────── */
  .nutrition-box {
    display: block !important;
    border: 2pt solid #1B4332;
    border-radius: 4pt;
    padding: 8pt;
    margin-bottom: 14pt;
    page-break-inside: avoid;
  }

  .nutrition-title {
    font-size: 13pt;
    text-align: center;
    border-bottom: 2pt solid #000;
    padding-bottom: 4pt;
    margin-bottom: 6pt;
  }

  .nutrition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2pt 12pt; }

  .nutrition-item {
    display: flex;
    justify-content: space-between;
    padding: 2pt 0;
    border-bottom: 0.5pt solid #ddd;
    font-size: 9pt;
  }

  /* ── 11. Tips Box ─────────────────────────────────── */
  .tips-box {
    display: block !important;
    border: 1.5pt solid #F4A261;
    border-radius: 4pt;
    padding: 8pt;
    margin-bottom: 14pt;
    page-break-inside: avoid;
    background: #FFF8F0;
  }

  .tips-title {
    font-size: 12pt;
    font-weight: bold;
    margin-bottom: 6pt;
    color: #E76F51;
  }

  .tip-item { page-break-inside: avoid; margin-bottom: 4pt; font-size: 9.5pt; }

  /* ── 12. Print Footer ─────────────────────────────── */
  body::after {
    content: "Mehr Rezepte auf leckivo.com  •  Alle Rechte vorbehalten © " attr(data-year);
    display: block;
    font-size: 8pt;
    color: #999;
    text-align: center;
    margin-top: 20pt;
    padding-top: 8pt;
    border-top: 0.5pt solid #ccc;
  }

  /* ── 13. Page Breaks ──────────────────────────────── */
  .ingredients-box,
  .steps-list,
  .nutrition-box { page-break-before: auto; }

  h2, h3 { page-break-after: avoid; }

  .step-item,
  .ingredient-item,
  .nutrition-item { page-break-inside: avoid; }

  /* ── 14. Timer (show time, hide controls) ─────────── */
  .timer-widget {
    display: block !important;
    border: 1pt solid #ccc;
    background: #f9f9f9 !important;
    color: #000 !important;
    padding: 6pt;
    margin-bottom: 10pt;
    border-radius: 4pt;
    text-align: center;
    font-size: 9pt;
  }

  .timer-display { color: #2D6A4F; font-size: 14pt; }
  .timer-controls { display: none; }

}


