/* Print styles for browser print */

@media print {
    /* Hide non-essential elements */
    .navbar,
    .sidebar,
    .d-print-none,
    footer,
    .indicator-nav {
        display: none !important;
    }

    /* Reset layout */
    body {
        font-size: 11pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    .content-area {
        padding: 0;
        margin: 0;
    }

    .content-container {
        max-width: 100%;
    }

    /* Headers */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        break-after: avoid;
    }

    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
    h4 { font-size: 12pt; }

    /* Prevent breaking inside elements */
    .card,
    .score-card,
    .calculation-rule,
    figure,
    table,
    pre {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Links */
    a {
        color: #000;
        text-decoration: underline;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }

    /* Tables */
    table {
        border-collapse: collapse;
    }

    th, td {
        border: 1px solid #000;
        padding: 0.25rem 0.5rem;
    }

    /* Images */
    img {
        max-width: 100%;
        max-height: 3in;
    }

    /* Score cards for print */
    .score-cards-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .score-card {
        border: 1px solid #000;
    }

    .score-card-header {
        border-bottom: 1px solid #000;
    }

    /* Ensure colors print */
    .bg-score-0, .score-0 .score-card-header {
        background-color: #d4edda !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .bg-score-1, .score-1 .score-card-header {
        background-color: #fff3cd !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .bg-score-2, .score-2 .score-card-header {
        background-color: #ffe5d0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .bg-score-3, .score-3 .score-card-header {
        background-color: #f8d7da !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Badges */
    .badge {
        border: 1px solid currentColor;
    }

    /* Metadata */
    .metadata-grid {
        margin-bottom: 1rem;
    }
}
