/* Print-Friendly Styles */
@media print {
    /* Hide non-essential elements */
    .navbar,
    .dark-mode-toggle,
    footer,
    .breadcrumb,
    .btn,
    .cookie-consent-banner,
    #search-loading,
    #popular-hops,
    #by-style,
    #by-flavor,
    .hero-section,
    .bg-gradient {
        display: none !important;
    }
    
    /* Page setup */
    @page {
        margin: 0.5in;
        size: letter;
    }
    
    /* Reset colors for print */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt !important;
        line-height: 1.5 !important;
    }
    
    /* Typography */
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    h1 {
        font-size: 24pt !important;
        margin-bottom: 10pt !important;
    }
    
    h2 {
        font-size: 18pt !important;
        margin-top: 15pt !important;
    }
    
    h3 {
        font-size: 14pt !important;
    }
    
    /* Links */
    a {
        color: black !important;
        text-decoration: none !important;
    }
    
    /* Show URLs after links for hop pages */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
    
    /* But not for internal navigation links */
    a[href^="#"]:after,
    a[href^="/"]:after {
        content: "";
    }
    
    /* Cards and containers */
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: 15pt !important;
    }
    
    .card-header {
        background: #f8f9fa !important;
        color: black !important;
        border-bottom: 1px solid #ddd !important;
        padding: 8pt !important;
    }
    
    .card-body {
        padding: 10pt !important;
    }
    
    /* Tables */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: avoid;
    }
    
    th, td {
        border: 1px solid #ddd !important;
        padding: 5pt !important;
        text-align: left !important;
    }
    
    th {
        background: #f8f9fa !important;
        font-weight: bold !important;
    }
    
    /* Badges */
    .badge {
        border: 1px solid #666 !important;
        color: black !important;
        background: white !important;
        padding: 2pt 5pt !important;
        font-size: 10pt !important;
    }
    
    /* Lists */
    .list-group-item {
        border: none !important;
        padding: 5pt 0 !important;
    }
    
    /* Hide interactive elements */
    canvas,
    .progress,
    select,
    input[type="text"],
    .form-control {
        display: none !important;
    }
    
    /* Show print-only content */
    .print-only {
        display: block !important;
    }
    
    /* Hop comparison specific */
    #comparisonChart {
        display: none !important;
    }
    
    /* Add print-friendly chart alternative */
    #comparisonChart:after {
        content: "See digital version for interactive flavor chart";
        display: block;
        padding: 20pt;
        text-align: center;
        border: 1px dashed #999;
        color: #666;
    }
    
    /* Ensure content fits on page */
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .row {
        margin: 0 !important;
    }
    
    .col-md-6,
    .col-lg-4,
    .col-lg-3,
    .col-lg-8 {
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 10pt !important;
    }
    
    /* Add hop data sheet header */
    body.hop-page:before {
        content: "Hop Data Sheet";
        display: block;
        font-size: 10pt;
        text-align: right;
        color: #666;
        margin-bottom: 10pt;
    }
    
    /* Add printed date */
    body:after {
        content: "Printed from humuluslupulus.com on " attr(data-date);
        display: block;
        font-size: 10pt;
        text-align: center;
        color: #666;
        margin-top: 20pt;
        padding-top: 10pt;
        border-top: 1px solid #ddd;
    }
}