/* Print Stylesheet for Fresh Kitchen Recipes */

@media print {
    /* Hide everything except print container */
    body.printing > *:not(#print-content) {
        display: none !important;
    }

    body.printing #print-content {
        display: block !important;
        max-width: 100%;
        margin: 0;
        padding: 0;
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 11pt;
        color: #000;
        line-height: 1.5;
    }

    /* Hide modal during print */
    #printModal {
        display: none !important;
    }

    @page {
        margin: 0;
    }

    body.printing #print-content {
        padding: 1.5cm;
    }

    /* Header */
    .print-header {
        text-align: center;
        border-bottom: 2px solid #333;
        padding-bottom: 8px;
        margin-bottom: 16px;
    }

    .print-site-name {
        font-size: 14pt;
        font-weight: bold;
        color: #333;
    }

    /* Title */
    .print-title {
        font-size: 22pt;
        font-weight: bold;
        margin: 0 0 4px 0;
        color: #000;
        page-break-after: avoid;
    }

    .print-author {
        font-size: 10pt;
        color: #555;
        margin: 0 0 12px 0;
    }

    /* Hero row: photo + meta side by side */
    .print-hero-row {
        display: flex;
        gap: 16px;
        align-items: flex-start;
        margin: 12px 0;
    }

    /* Photo */
    .print-photo {
        flex-shrink: 0;
    }

    .print-photo img {
        max-width: 240px;
        max-height: 180px;
        object-fit: cover;
        border: 1px solid #ccc;
    }

    /* Right column: meta + description */
    .print-hero-right {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    /* Time & Servings metadata */
    .print-meta {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 8px 12px;
        border: 1px solid #ccc;
        background: #f9f9f9;
        font-size: 10pt;
    }

    .print-meta-line {
        display: flex;
        gap: 16px;
    }

    /* Description */
    .print-description {
        font-style: italic;
        color: #444;
        margin: 0;
        font-size: 11pt;
    }

    /* Section blocks */
    .print-section {
        margin-bottom: 16px;
        break-inside: avoid;
    }

    .print-section h2 {
        font-size: 14pt;
        font-weight: bold;
        border-bottom: 1px solid #999;
        padding-bottom: 4px;
        margin: 0 0 8px 0;
        page-break-after: avoid;
    }

    /* Ingredients */
    .print-ingredients {
        list-style: disc;
        padding-left: 20px;
        margin: 0;
        columns: 3;
        column-gap: 24px;
    }

    .print-ingredients li {
        break-inside: avoid;
        margin-bottom: 4px;
        font-size: 10pt;
    }

    .print-sub {
        font-size: 9pt;
        color: #666;
    }

    /* Instructions */
    .print-instructions {
        padding-left: 24px;
        margin: 0;
        list-style: decimal;
    }

    .print-instructions li {
        margin-bottom: 8px;
        font-size: 10.5pt;
        break-inside: avoid;
    }

    /* Tips */
    .print-tips {
        padding: 8px 12px;
        border-left: 3px solid #999;
        background: #f9f9f9;
        font-size: 10pt;
    }

    /* Nutrition */
    .print-nutrition-note {
        font-size: 9pt;
        color: #666;
        margin: 0 0 4px 0;
    }

    .print-nutrition {
        width: 100%;
        max-width: 300px;
        border-collapse: collapse;
        font-size: 10pt;
    }

    .print-nutrition td {
        padding: 3px 8px;
        border-bottom: 1px solid #ddd;
    }

    .print-nutrition td:first-child {
        color: #555;
    }

    /* Photo Gallery */
    .print-gallery {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .print-gallery img {
        width: 100%;
        height: 120px;
        object-fit: cover;
        border: 1px solid #ccc;
    }

    /* Reviews & Comments */
    .print-review,
    .print-comment {
        border-bottom: 1px solid #eee;
        padding: 6px 0;
        font-size: 10pt;
        break-inside: avoid;
    }

    .print-review-title {
        font-weight: bold;
        font-size: 10.5pt;
    }

    .print-reply {
        margin-left: 20px;
        padding-left: 8px;
        border-left: 2px solid #ccc;
        margin-top: 4px;
        font-size: 9.5pt;
    }

    .print-date {
        color: #888;
        font-size: 9pt;
    }

    /* Footer */
    .print-footer {
        margin-top: 24px;
        padding-top: 8px;
        border-top: 2px solid #333;
        display: flex;
        justify-content: space-between;
        font-size: 8pt;
        color: #666;
    }

    /* General print rules */
    h2, h3 {
        page-break-after: avoid;
    }

    img {
        page-break-inside: avoid;
    }
}
