/* ================================================================
   2TechHub Print Stylesheet
   Optimized for printing reports, tickets, and documents
   ================================================================ */

@media print {
    /* ─── Hide Navigation Elements ─── */
    .mud-appbar,
    .mud-drawer,
    .mud-drawer-overlay,
    .mobile-bottom-nav,
    .page-header-actions,
    .page-actions,
    .mud-fab,
    .mud-snackbar-provider,
    .bottom-nav-item,
    .bottom-nav-fab,
    button,
    .mud-button {
        display: none !important;
    }

    /* ─── Page Setup ─── */
    @page {
        margin: 2cm;
        size: A4;
    }

    html, body {
        background: white;
        color: black;
        font-size: 11pt;
        line-height: 1.4;
        margin: 0;
        padding: 0;
    }

    /* ─── Layout Adjustments ─── */
    .mud-layout,
    .mud-main-content,
    .main-content-responsive {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    /* ─── Tables ─── */
    .mud-table {
        width: 100%;
        page-break-inside: avoid;
        border-collapse: collapse;
    }

    .mud-table th,
    .mud-table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }

    .mud-table th {
        background: #f5f5f5 !important;
        font-weight: bold;
        color: black !important;
    }

    /* ─── Cards ─── */
    .mud-card {
        page-break-inside: avoid;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        background: white !important;
    }

    .stat-card,
    .section-card,
    .service-area-card {
        page-break-inside: avoid;
        border: 1px solid #ddd !important;
        background: white !important;
        box-shadow: none !important;
    }

    /* ─── Typography ─── */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: black !important;
    }

    .mud-typography-h1,
    .mud-typography-h2,
    .mud-typography-h3,
    .mud-typography-h4,
    .mud-typography-h5,
    .mud-typography-h6 {
        color: black !important;
    }

    /* ─── Links ─── */
    a {
        color: black;
        text-decoration: underline;
    }

    /* Show link URLs after text for external links */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }

    /* Don't show URLs for internal links */
    a[href^="/"]:after,
    a[href^="#"]:after {
        content: "";
    }

    /* ─── Colors ─── */
    * {
        color: black !important;
        background: white !important;
        box-shadow: none !important;
    }

    /* Preserve borders and text colors for important elements */
    .mud-chip,
    .priority-chip,
    .status-chip,
    .role-badge {
        border: 1px solid #333 !important;
        background: white !important;
        color: black !important;
        padding: 4px 8px;
    }

    /* ─── Report-Specific Styles ─── */
    .dashboard-welcome {
        background: #f5f5f5 !important;
        border: 1px solid #ddd !important;
        padding: 20px !important;
        page-break-inside: avoid;
    }

    .page-header-wrapper {
        background: white !important;
        border-bottom: 2px solid #333 !important;
        margin-bottom: 20px;
        padding-bottom: 10px;
        page-break-after: avoid;
    }

    /* ─── Ticket Details ─── */
    .ticket-detail-section {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        padding: 10px;
        margin-bottom: 10px;
    }

    /* ─── Hide Empty States ─── */
    .empty-state,
    .no-data-message {
        display: none !important;
    }

    /* ─── Prevent Widows and Orphans ─── */
    p, li {
        orphans: 3;
        widows: 3;
    }

    /* ─── Chart/Image Handling ─── */
    img, svg {
        max-width: 100%;
        page-break-inside: avoid;
    }

    /* ─── Footer ─── */
    .print-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 9pt;
        color: #666;
        padding: 10px;
        border-top: 1px solid #ddd;
    }

    .print-footer:after {
        content: "2TechHub — Sayfa " counter(page);
    }
}
