﻿@media print {
    .no-print {
        display: none !important;
    }
    html, body {
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
        background-color: #ffffff !important;
    }
    
    .greyBody {
        background-color: #ffffff !important;
    }

    /* Reset margin for main content */
    .mud-main-content {
        margin: 0 !important; /* Remove margin caused by mud-drawer */
        padding-top: 0 !important; /* Remove padding caused by appbar height */
    }

    /* Adjust article padding */
    .mud-main-content > article.content {
        padding: 0 !important;
    }

    /* Optional: Adjust app-specific layout for print */
    .mud-appbar {
        display: none !important; /* Hide the app bar if it isn't needed for print */
    }

    /* Prevent drawer adjustments during print */
    .mud-drawer-open-responsive-md-left .mud-main-content {
        margin-left: 0 !important;
    }

    /* Adjust typography classes for print */
    .mud-typography-h1 { font-size: 20px !important; }
    .mud-typography-h2 { font-size: 18px !important; }
    .mud-typography-h3 { font-size: 16px !important; }
    .mud-typography-h4 { font-size: 14px !important; }
    .mud-typography-h5 { font-size: 12px !important; }
    .mud-typography-h6 { font-size: 10px !important; }
    .mud-typography-body1 { font-size: 12px !important; }
    .mud-typography-body2 { font-size: 10px !important; }
    .mud-typography-caption { font-size: 8px !important; }
    .mud-typography-overline { font-size: 8px !important; }
    .mud-typography-subtitle1 { font-size: 14px !important; }
    .mud-typography-subtitle2 { font-size: 12px !important; }

    /* Optional: Adjust line heights for better readability in print */
    .mud-typography-h1, .mud-typography-h2, .mud-typography-h3,
    .mud-typography-h4, .mud-typography-h5, .mud-typography-h6,
    .mud-typography-body1, .mud-typography-body2,
    .mud-typography-caption, .mud-typography-overline,
    .mud-typography-subtitle1, .mud-typography-subtitle2 {
        line-height: 1.2 !important;
    }

    /* Adjust font size for MudTable */
    .mud-table {
        /* page-break-inside: avoid !important; */
        font-size: 11px !important; /* Smaller font size for table text */
    }
    .mud-table tr {
        /* page-break-inside: avoid !important; */
    }
    .mud-table th {
        font-size: 11px !important; /* Adjust headers font size */
        font-weight: bold !important; /* Make headers bold */
        padding: 4px !important; /* Reduce padding for a compact look */
    }

    .mud-table td {
        font-size: 10px !important; /* Adjust cell font size */
        padding: 4px !important; /* Reduce padding */
    }
    
    /* Ensure proper line-height for table content */
    .mud-table th, .mud-table td {
        line-height: 1.2 !important;
        /* page-break-inside: avoid !important; */
        word-wrap: break-word;
    }

    /* Adjust typography for MudTable content */
    .mud-table .mud-typography-body1,
    .mud-table .mud-typography-body2 {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }

    /* Optional: Adjust table borders for print clarity */
    .mud-table th, .mud-table td {
        border: 1px solid #000 !important; /* Ensure borders are visible on print */
    }

    /* Avoid breaking tables across pages */
    table, tr, td, th {
        /* page-break-inside: avoid !important; */
    }

    /* Ensure table headers repeat on every page */
    thead {
        display: table-header-group !important;
    }

    tbody {
        display: table-row-group;
    }
}

/* Container (optional if you wrap in <div class="markdown-body">) */
.markdown-body {
    font-family: var(--mud-typography-default-font-family, sans-serif);
    line-height: 1.3;
    font-size: 1rem;
    color: var(--mud-palette-text-primary, #212121);
}

/* Headings */
.markdown-body h1 {
    font-size: 1.75rem;
    font-weight: bold;
    margin: 0 0 0.5rem;
}

.markdown-body h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 0.5rem;
}

.markdown-body h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0 0 0.0rem;
}

.markdown-body h4 {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0 0 0.0rem;
}

.markdown-body h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.0rem;
}

.markdown-body h6 {
    font-size: 0.9rem;
    font-weight: 600;
    font-style: italic;
    margin: 0 0 0.0rem;
}


/* Paragraphs */
.markdown-body p {
    margin-bottom: 1rem;
}

/* Lists */

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 1rem;
}


.markdown-body ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-left: 0;
}

.markdown-body ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-left: 0;
}

.markdown-body ol li::marker {
    font-weight: bold;
}

.markdown-body li {
    margin-bottom: 0.3rem;
}

.markdown-body li input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Blockquote */
.markdown-body blockquote {
    border-left: 4px solid #ccc;
    padding-left: 1rem;
    color: #666;
    margin: 1rem 0;
}

/* Code */
.markdown-body code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    font-family: monospace;
    font-size: 0.95rem;
    border-radius: 4px;
}

/* Horizontal rule */
.markdown-body hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 2rem 0;
}

/* Tables (if supported) */
.markdown-body table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1rem;
}

.markdown-body th,
.markdown-body td {
    border: 1px solid #ccc;
    padding: 0.5rem;
    text-align: left;
}

.markdown-body ul.contains-task-list {
    list-style: none;
    padding-left: 0;
}

.markdown-body .task-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.markdown-body input[type="checkbox"] {
    transform: scale(1.1);
    accent-color: var(--mud-palette-primary, #1976d2); /* Theme-safe color */
}


/* Links */
.markdown-body a {
    color: var(--mud-palette-primary, #1976d2);
    text-decoration: underline;
}
