﻿@media print {
    body {
        font-family: "Times New Roman", serif;
        font-size: 5pt;
        color: #000;
        background: none;
    }

    .no-print {
        display: none;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    .card {
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0 0 1rem 0;
    }

    html, body {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    html, body {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    html, body {
        width: auto !important;
        max-width: none !important;
        overflow: visible !important;
        touch-action: auto !important;
    }

    body > div {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    *[style*="max-height: 100vh"],
    *[style*="max-height:100vh"],
    *[style*="height: 100vh"],
    *[style*="height:100vh"],
    *[style*="height: 90%"],
    *[style*="height:90%"] {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    html, body, body * {
        overflow: visible !important;
    }

    .main-layout,
    .main-layout > div,
    .layout-flex-container,
    .main-content,
    .document-query-container,
    .chat-interface,
    .chat-messages {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        position: static !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .main-layout.main-layout,
    .main-content.main-content,
    .document-query-container.document-query-container,
    .chat-interface.chat-interface,
    .chat-messages.chat-messages {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        position: static !important;
        display: block !important;
    }

    .chat-messages {
        overflow: visible !important;
        height: auto !important;
    }

    #chat-messages {
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        position: static !important;
    }

    .message-display-question {
        max-height: none !important;
        overflow: visible !important;
    }

    .message-answer,
    .message-content,
    .answer-content,
    .code-content {
        max-width: 100% !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }

    .chat-input,
    .analysis-panel,
    .chat-sidebar,
    .header-actions,
    .chat-header,
    .mobile-menu-toggle,
    .home-button,
    .action-buttons-section,
    #blazor-error-ui {
        display: none !important;
    }

    .chat-messages .message {
        break-after: page !important;
        page-break-after: always !important;
    }

    .chat-messages .message:last-child {
        break-after: auto !important;
        page-break-after: auto !important;
    }

    body.print-single-message .chat-messages .message {
        break-after: auto !important;
        page-break-after: auto !important;
    }

    body.print-single-message .chat-messages .message:not(.message-to-print) {
        display: none !important;
    }

    .print-section {
        page-break-before: always;
    }

    * {
        background: none !important;
        box-shadow: none !important;
    }
}
