/* Print Stylesheet for Watson Recipes */
/* Ultra-compact layout - minimize paper usage */

@media print {
    /* Minimal margins for maximum space */
    @page {
        margin: 0.3in;
        size: letter;
    }
    
    body {
        font-size: 9pt;
        font-family: Georgia, "Times New Roman", serif;
        line-height: 1.3;
        color: #000;
        background: white;
        margin: 0;
        padding: 0;
    }
    
    /* Hide ALL UI chrome */
    header,
    footer,
    .search-form,
    .pagination,
    .back-link,
    .modal-close,
    .print-button,
    .modal-actions,
    .recipe-modal-overlay,
    .tag-pill,
    .recipe-tags,
    .filter-panel,
    .active-filters,
    .recipe-actions,
    .btn-edit,
    .btn-delete,
    nav,
    button {
        display: none !important;
    }
    
    /* When modal is open, hide everything except the modal */
    body.modal-open main,
    body.modal-open .container {
        display: none !important;
    }
    
    body.modal-open .recipe-modal {
        display: block !important;
    }
    
    /* Modal recipe printing */
    .recipe-modal {
        display: block !important;
        position: static !important;
    }
    
    .recipe-modal-container {
        max-width: 100% !important;
        max-height: none !important;
        margin: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    
    .recipe-detail-modal-content {
        padding: 0 !important;
    }
    
    /* Compact header */
    .modal-header {
        border-bottom: 2px solid #000;
        padding-bottom: 0.15in;
        margin-bottom: 0.15in;
    }
    
    .modal-header h1 {
        font-size: 14pt;
        font-weight: bold;
        margin: 0;
        line-height: 1.2;
    }
    
    /* Metadata on one compact line */
    .recipe-metadata {
        font-size: 8pt;
        margin: 0.1in 0;
        line-height: 1.2;
    }
    
    .meta-pill {
        display: inline;
        background: none !important;
        border: none !important;
        padding: 0 !important;
        margin-right: 0.15in;
        color: #000;
    }
    
    .meta-pill i {
        display: none;
    }
    
    /* Attribution - compact */
    .attribution {
        font-size: 8pt;
        margin: 0.05in 0;
        color: #333;
    }
    
    .attribution .source {
        margin-left: 0.1in;
    }
    
    /* Two-column layout: 35% ingredients | 60% directions */
    .modal-body {
        display: grid !important;
        grid-template-columns: 35% 60% !important;
        gap: 5% !important;
        margin-top: 0.15in !important;
    }
    
    .modal-column h2 {
        font-size: 11pt;
        font-weight: bold;
        margin: 0 0 0.1in 0;
        padding-bottom: 0.05in;
        border-bottom: 1px solid #333;
    }
    
    .modal-column h2 i {
        display: none;
    }
    
    /* Ingredients - compact list */
    .ingredients-list {
        margin: 0;
        padding-left: 0.15in;
        list-style-type: disc;
    }
    
    .ingredients-list li {
        margin-bottom: 0.05in;
        font-size: 9pt;
        line-height: 1.3;
    }
    
    .ingredients-list .empty {
        font-style: italic;
        color: #666;
    }
    
    /* Directions - compact paragraphs */
    .directions-text {
        font-size: 9pt;
        line-height: 1.3;
    }
    
    .directions-text p {
        margin: 0 0 0.1in 0;
        text-align: justify;
    }
    
    /* Note - if it fits */
    .modal-note {
        grid-column: 1 / -1;
        margin-top: 0.15in;
        padding: 0.1in;
        background: #f9f9f9 !important;
        border-left: 3px solid #666;
        page-break-before: auto;
    }
    
    .modal-note h3 {
        font-size: 10pt;
        margin: 0 0 0.05in 0;
    }
    
    .modal-note h3 i {
        display: none;
    }
    
    .modal-note p {
        font-size: 8pt;
        margin: 0;
        line-height: 1.3;
    }
    
    /* Full page recipe detail (non-modal) */
    .recipe-detail-container {
        display: grid;
        grid-template-columns: 35% 60%;
        gap: 5%;
        page-break-inside: avoid;
    }
    
    .recipe-header {
        grid-column: 1 / -1;
        margin-bottom: 0.15in;
    }
    
    .recipe-header h1 {
        font-size: 14pt;
        margin: 0 0 0.1in 0;
        border-bottom: 2px solid #000;
        padding-bottom: 0.1in;
    }
    
    .recipe-info {
        grid-column: 1 / -1;
        font-size: 8pt;
        margin-bottom: 0.1in;
        color: #333;
    }
    
    .recipe-info .info-item {
        display: inline-block;
        margin-right: 0.15in;
    }
    
    /* Ingredients column */
    .ingredients-section {
        grid-column: 1;
    }
    
    .ingredients-section h2 {
        font-size: 11pt;
        margin: 0 0 0.1in 0;
        border-bottom: 1px solid #333;
    }
    
    .ingredients-section h2 i {
        display: none;
    }
    
    .ingredients-section ul {
        margin: 0;
        padding-left: 0.15in;
        list-style-type: disc;
    }
    
    .ingredients-section li {
        margin-bottom: 0.05in;
        font-size: 9pt;
        line-height: 1.3;
    }
    
    /* Directions column */
    .directions-section {
        grid-column: 2;
    }
    
    .directions-section h2 {
        font-size: 11pt;
        margin: 0 0 0.1in 0;
        border-bottom: 1px solid #333;
    }
    
    .directions-section h2 i {
        display: none;
    }
    
    .directions-section p {
        margin: 0 0 0.1in 0;
        font-size: 9pt;
        line-height: 1.3;
        text-align: justify;
    }
    
    /* Comments - only if space */
    .comments-section {
        grid-column: 1 / -1;
        margin-top: 0.15in;
        page-break-before: auto;
        font-size: 8pt;
    }
    
    .comments-section h2 {
        font-size: 10pt;
        margin: 0.1in 0 0.05in 0;
    }
    
    .comment {
        font-size: 8pt;
        margin-bottom: 0.1in;
        padding: 0.05in;
        border-left: 2px solid #ccc;
        padding-left: 0.1in;
    }
    
    /* Recipe list - very compact */
    .recipe-grid {
        display: block;
    }
    
    .recipe-card {
        display: block;
        margin-bottom: 0.1in;
        padding: 0.1in;
        border: none;
        border-bottom: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .recipe-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .recipe-title {
        font-size: 10pt;
        font-weight: bold;
        margin: 0;
    }
    
    .recipe-title a {
        color: #000;
        text-decoration: none;
    }
    
    .recipe-title a::after {
        display: none;
    }
    
    .recipe-meta,
    .recipe-attribution {
        font-size: 8pt;
        color: #333;
    }
    
    .badge {
        border: 1px solid #333;
        background: transparent !important;
        color: #000 !important;
        padding: 1px 3px;
        font-size: 7pt;
    }
    
    /* Prevent orphans and widows */
    h1, h2, h3 {
        page-break-after: avoid;
        orphans: 3;
        widows: 3;
    }
    
    p {
        orphans: 3;
        widows: 3;
    }
    
    /* Links - no URLs printed */
    a {
        color: #000;
        text-decoration: none;
    }
    
    a::after {
        content: "" !important;
    }
}
