/**
 * Print Styles
 */

@media print {
    /* Reset colors for printing */
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Page setup */
    @page {
        margin: 2cm;
        size: A4;
    }

    /* Typography */
    body {
        font-size: 12pt;
        line-height: 1.5;
    }

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

    p, ul, ol {
        orphans: 3;
        widows: 3;
    }

    /* Hide non-essential elements */
    .sidebar,
    .message-input-area,
    .chat-actions,
    .modal-overlay,
    .btn,
    button,
    nav,
    .no-print {
        display: none !important;
    }

    /* Show main content full width */
    .chat-app,
    .chat-main,
    .chat-view {
        display: block;
        width: 100%;
        height: auto;
        overflow: visible;
    }

    /* Messages */
    .messages-container {
        overflow: visible;
        height: auto;
    }

    .message {
        max-width: 100%;
        page-break-inside: avoid;
    }

    .message-content {
        border: 1px solid #ddd;
    }

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

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

    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }

    /* Images */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* Header info for printed chat */
    .chat-header {
        border-bottom: 2px solid #000;
        padding-bottom: 1em;
        margin-bottom: 1em;
    }
}
