/* Print Stylesheet for PharmFlow Assessments */

@media print {
    /* Hide non-printable elements */
    .header,
    .nav-menu,
    .user-menu,
    .btn,
    .button,
    .modal-close,
    .action-buttons,
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-icon,
    .no-print {
        display: none !important;
    }

    /* Page setup */
    @page {
        size: letter;
        margin: 0.5in;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.5;
    }

    /* Print header with logo */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 2px solid #1E5B7B;
    }

    .print-logo {
        max-width: 250px;
        height: auto;
        margin-bottom: 10px;
    }

    .print-title {
        font-size: 18pt;
        font-weight: bold;
        color: #1E5B7B;
        margin: 10px 0;
    }

    .print-subtitle {
        font-size: 10pt;
        color: #666;
    }

    /* Patient info section */
    .patient-info-print {
        margin-bottom: 20px;
        padding: 10px;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .patient-info-print h3 {
        font-size: 14pt;
        color: #1E5B7B;
        margin-bottom: 10px;
    }

    .patient-info-print .info-row {
        display: flex;
        margin-bottom: 5px;
    }

    .patient-info-print .info-label {
        font-weight: bold;
        width: 150px;
        flex-shrink: 0;
    }

    /* Assessment content */
    .assessment-print {
        page-break-inside: avoid;
        margin-bottom: 30px;
    }

    .assessment-print h2 {
        font-size: 16pt;
        color: #1E5B7B;
        margin: 20px 0 10px 0;
        border-bottom: 1px solid #ddd;
        padding-bottom: 5px;
    }

    .assessment-print h3 {
        font-size: 14pt;
        color: #333;
        margin: 15px 0 8px 0;
    }

    .assessment-print h4 {
        font-size: 12pt;
        color: #555;
        margin: 10px 0 5px 0;
    }

    /* Response items */
    .response-item {
        margin-bottom: 15px;
        padding-left: 10px;
        page-break-inside: avoid;
    }

    .response-question {
        font-weight: bold;
        margin-bottom: 5px;
    }

    .response-answer {
        padding-left: 20px;
        color: #333;
    }

    /* Red flags */
    .red-flags-print {
        background: #fff3cd;
        border: 2px solid #ff6b6b;
        padding: 10px;
        margin: 15px 0;
        page-break-inside: avoid;
    }

    .red-flags-print h4 {
        color: #dc3545;
        margin-top: 0;
    }

    .red-flags-print ul {
        margin: 5px 0;
        padding-left: 20px;
    }

    /* Recommendations */
    .recommendations-print {
        background: #e7f5ff;
        border: 1px solid #1E5B7B;
        padding: 10px;
        margin: 15px 0;
        page-break-inside: avoid;
    }

    .recommendations-print h4 {
        color: #1E5B7B;
        margin-top: 0;
    }

    .recommendations-print ul {
        margin: 5px 0;
        padding-left: 20px;
    }

    /* Tables */
    table {
        width: 100%;
        border-collapse: collapse;
        margin: 15px 0;
        page-break-inside: avoid;
    }

    table th {
        background: #f0f0f0;
        padding: 8px;
        text-align: left;
        border: 1px solid #ddd;
        font-weight: bold;
    }

    table td {
        padding: 8px;
        border: 1px solid #ddd;
    }

    /* Footer */
    .print-footer {
        display: block !important;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid #ddd;
        font-size: 9pt;
        text-align: center;
        color: #666;
    }

    /* Page breaks */
    .page-break {
        page-break-after: always;
    }

    .avoid-break {
        page-break-inside: avoid;
    }

    /* Ensure content is visible */
    .modal-content,
    .patient-profile {
        box-shadow: none !important;
        border: none !important;
    }

    /* Date/time stamps */
    .timestamp {
        font-size: 10pt;
        color: #666;
        font-style: italic;
    }

    /* Signatures */
    .signature-section {
        margin-top: 40px;
        page-break-inside: avoid;
    }

    .signature-line {
        border-top: 1px solid #333;
        width: 300px;
        margin: 30px 0 5px 0;
    }

    .signature-label {
        font-size: 10pt;
        color: #666;
    }
}

/* Print-specific classes (shown only when printing) */
.print-only {
    display: none;
}

@media print {
    .print-only {
        display: block !important;
    }
}
