/* Print-friendly styles for ChurchMusician2025 */
/* Applied via media="print" */

@media print {
    /* Hide non-essential elements */
    .sidenav,
    .navbar,
    .topbar,
    .footer,
    .btn,
    .btn-group,
    .dropdown,
    .modal,
    .toast,
    .alert-dismissible .btn-close,
    .pagination,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_info,
    .dataTables_paginate,
    .skip-link,
    .theme-toggle,
    #signalr-connection-status,
    .action-buttons,
    .no-print {
        display: none !important;
    }

    /* Reset body styles */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Main content full width */
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    .container-fluid {
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }

    /* Cards */
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: 10pt !important;
    }

    .card-header {
        background: #f5f5f5 !important;
        border-bottom: 1px solid #ddd !important;
        padding: 8pt !important;
    }

    .card-body {
        padding: 10pt !important;
    }

    /* Tables */
    table {
        border-collapse: collapse !important;
        width: 100% !important;
    }

    table th,
    table td {
        border: 1px solid #ddd !important;
        padding: 6pt 8pt !important;
        text-align: left !important;
    }

    table thead th {
        background: #f5f5f5 !important;
        font-weight: bold !important;
    }

    table tbody tr:nth-child(even) {
        background: #fafafa !important;
    }

    /* Typography */
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        page-break-after: avoid;
    }

    h1 { font-size: 18pt !important; }
    h2 { font-size: 16pt !important; }
    h3 { font-size: 14pt !important; }
    h4 { font-size: 12pt !important; }
    h5, h6 { font-size: 11pt !important; }

    p {
        orphans: 3;
        widows: 3;
    }

    /* Links - show URL */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    a[href^="#"]:after,
    a[href^="javascript:"]:after,
    a.no-print-url:after {
        content: "";
    }

    /* Images */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* Badges - convert to text */
    .badge {
        border: 1px solid #999 !important;
        background: white !important;
        color: black !important;
        padding: 2pt 4pt !important;
    }

    /* Icons - hide or make smaller */
    .material-icons {
        font-size: 12pt !important;
    }

    /* Page breaks */
    .page-break-before {
        page-break-before: always;
    }

    .page-break-after {
        page-break-after: always;
    }

    .avoid-page-break {
        page-break-inside: avoid;
    }

    /* Print header/footer */
    @page {
        margin: 0.75in;
        size: letter;
    }

    @page :first {
        margin-top: 1in;
    }

    /* Roster specific styles */
    .roster-list {
        columns: 2;
        column-gap: 20pt;
    }

    .roster-list .member-card {
        break-inside: avoid;
        margin-bottom: 8pt;
    }

    /* Calendar specific */
    .fc-event {
        border: 1px solid #333 !important;
        background: white !important;
        color: black !important;
    }

    /* Forms - show values as text */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
    }

    /* Attendance sheet specific */
    .attendance-grid {
        font-size: 10pt !important;
    }

    .attendance-grid th,
    .attendance-grid td {
        padding: 4pt !important;
    }

    /* Show print-only elements */
    .print-only {
        display: block !important;
    }

    /* Hide dark theme styles for print */
    body.dark-theme {
        background: white !important;
        color: black !important;
    }

    body.dark-theme * {
        background-color: transparent !important;
        color: black !important;
        border-color: #ddd !important;
    }
}

/* Print preview helper class */
.print-preview {
    max-width: 8.5in;
    margin: 0 auto;
    padding: 0.75in;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
