﻿@media print {

    @page {
        margin: 0.5in; /* or 1in, or 20mm, etc. */
        size: portrait;
    }

    /* Hide UI elements */
    .no-print,
    .btn,
    .alert,
    .navbar,
    .footer {
        display: none !important;
    }

    /* Clean layout */
    .container,
    .container-fluid {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    body,
    .card {
        background: white !important;
        box-shadow: none !important;
    }

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

    /* Multi-column layout */
    .print-columns {
        column-width: 21em;
        column-gap: 3em;
    }

    /* Page-break control */
    .category-block,
    .link-group {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .category {
        page-break-before: always;
    }

    /* Timestamp */
    .print-timestamp {
        text-align: center;
        font-size: 0.9em;
        color: #555;
        margin-bottom: 10px;
    }

    .report-header {
        text-align: center;
        margin-bottom: 1rem;
    }

    .report-title {
        font-size: 20pt;
        margin-bottom: 0.2in;
    }

    .report-timestamp {
        font-size: 10pt;
        color: #555;
    }

    .report-table th {
        border-bottom: 2px solid #000;
        font-weight: bold;
    }

    .report-table td {
        border-bottom: 1px solid #ccc;
        padding: 4px 6px;
    }



    .print-columns {
        column-count: 2;
        column-gap: 1in;
    }

    .resident-block {
        break-inside: avoid;
        margin-bottom: 0.25in;
        font-size: 11pt;
    }



    .card-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.25in;
    }

    .resident-card {
        border: 1px solid #ccc;
        padding: 0.2in;
        break-inside: avoid;
    }

        .resident-card .name {
            font-weight: bold;
            font-size: 12pt;
            margin-bottom: 0.1in;
        }

    .nowrap {
        white-space: nowrap !important;
    }

    /* Prevent browsers from appending URLs after link text */
    a[href]:after {
        content: none !important;
    }

    .building-section {
        page-break-inside: avoid;
        break-inside: avoid;
        margin-bottom: 0.5in;
    }

    .building-header {
        font-size: 18pt;
        margin-top: 0.25in;
        margin-bottom: 0.15in;
        text-align: center;
        font-weight: bold;
    }

    .print-table th {
        border-bottom: 2px solid #000;
    }

    .print-table td {
        border-bottom: 1px solid #ccc;
        padding: 4px 6px;
    }

    .form-label {
        font-weight: 500;
    }

    .page-break-after {
        page-break-after: always;
    }

    @media print {

        /* Remove modal-like layout constraints */
        .modal-emulate-container {
            display: block !important;
            padding: 0 !important;
            background: none !important;
            min-height: auto !important;
            margin: 0 !important;
        }

        .modal-emulate {
            width: 100% !important;
            max-width: none !important;
            padding: 0 !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            background: white !important;
        }

        /* Hide the close button */
        .modal-emulate-close {
            display: none !important;
        }
    }


}
