/* ─── ThrowSense – Print stylesheet ───────────────────────────────────────
   Activated by the browser's print dialog. Strips navigation, sidebars, and
   interactive controls so a clean schedule/standings view prints on paper.
   Tier-gated: only included in league pages whose club has the
   'print_schedules' feature (League Team and up).
   ─────────────────────────────────────────────────────────────────────── */
@media print {
    /* Page setup */
    @page {
        size: A4 landscape;
        margin: 12mm;
    }

    html, body {
        background: #fff !important;
        color: #000 !important;
        font-family: Arial, Helvetica, sans-serif;
    }

    /* Hide everything that is not part of the printable content */
    nav, header, .lg-topbar, .lp-topbar, .lg-sidebar, .lg-navbar,
    .lp-footer, footer,
    .btn, button, .dropdown, .nav-tabs, .nav-pills,
    .lg-fx-actions, #captainActions, #adminAddActions,
    .club-switch-dropdown, .modal, .toast-container,
    .no-print, [data-no-print] {
        display: none !important;
    }

    /* Keep main content visible and use full page width */
    main, .container, .container-fluid, .lg-main, .row, .col,
    [class*="col-"], .lg-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 8px 0 !important;
        float: none !important;
        box-shadow: none !important;
        background: #fff !important;
        color: #000 !important;
        border: none !important;
    }

    /* Table overrides for legibility on paper */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: auto;
    }
    table, th, td {
        color: #000 !important;
        background: #fff !important;
    }
    th, td {
        border: 1px solid #888 !important;
        padding: 4px 6px !important;
        font-size: 11pt;
    }
    thead {
        display: table-header-group; /* repeat header on each page */
    }
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    /* Print URL next to external links so readers can find them offline */
    a[href^="http"]:not(.ts-no-url)::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #444;
    }

    .page-break {
        page-break-before: always;
    }
}
