@import "fonts.css";

@media print {
    /* Seite */
    @page {
/*        size: A4 portrait;*/
        margin: 10mm 10mm 12mm 10mm; /* kompakt, aber sicher */
    }

    html, body {
        background: #ffffff !important;
        color: #000;
        padding: 0 !important;
    }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact;background: #ffffff !important; }

    #hsv-soccer-page{
        background: #ffffff !important;
        padding: 0 !important;
        border: none !important;
    }
    /* Alles Unnötige raus */
    .no-print, nav, header, footer, .site-header, .site-footer { display:none !important; }

    /* 1-Pager: kompakter Grundstil */
    body {
        font-size: 10pt;
        line-height: 1.25;
    }

    .hsv-print-table *{
        font-family: /*"Source Sans Pro","Manrope"*/,'Questrial','Nunito Sans','Helvetica Neue','Arial', sans-serif !important;
    }

    /* Wrapper deines Plans -> wir geben ihm die Klasse .a4-fit (siehe unten) */
    .a4-fit {
        /* Haupttrick: global schrumpfen, wenn nötig */
        zoom: 0.92;               /* Chrome/Edge/Safari */
        transform-origin: top center;
        transform: scale(0.92);   /* Fallback */
        width: 100%;            /* komp. Breite für transform-Fallback */
    }

    /* Überschrift */
    .print-h1 {
        font-size: 17pt !important;
        margin: 0 0 0 3mm !important;
        padding: 0 !important;
        line-height: 1.15;
    }
    .print-subline { margin: 0 0 4mm 0 !important; padding: 0 !important; font-size: 9pt; }

    /* Tagesblöcke: keines darf umbrechen */
    .day-table { page-break-inside: avoid; break-inside: avoid; margin: 0 0 5mm 0; }
    .day-head  { color:#009640 !important; font-weight:800; font-size: 14pt; margin: 0 0 2.5mm 0; }

    /* Tabellen kompakt & stabil */
    .hsv-print-table { width:190mm; border-collapse:collapse; table-layout: fixed; }
    .hsv-print-table thead { display: table-header-group; }
    .hsv-print-table tr { page-break-inside: avoid; break-inside: avoid; }
    .hsv-print-table th, .hsv-print-table td {
        padding: 2mm 1mm;
        border-bottom: 0.25mm solid #ddd;
        vertical-align: middle;
    }
    .hsv-print-table th { border-color:#000; font-weight:800; }

    /* Spaltenbreiten (Uhrzeit | Nr. | Art | Paarung | Kabine H | Kabine G | SR | Platz) – Gesamt ≈ 190mm */
    .hsv-print-table :is(th,td) { box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hsv-print-table :is(th,td):nth-child(1) { width: 16mm !important; min-width:16mm !important; max-width:16mm !important; } /* Uhrzeit */
    .hsv-print-table :is(th,td):nth-child(2) { width: 22mm !important; min-width:22mm !important; max-width:22mm !important; } /* Spiel-Nr. */
    .hsv-print-table :is(th,td):nth-child(3) { width: 22mm !important; min-width:22mm !important; max-width:22mm !important; } /* Mannschaftsart */
    .hsv-print-table :is(th,td):nth-child(4) { width: 90mm !important; min-width:90mm !important; max-width:90mm !important; } /* Paarung */
    .hsv-print-table :is(th,td):nth-child(5) { width: 10mm !important; min-width:10mm !important; max-width:10mm !important; text-align:right; border-left: 1px solid #009640;border-right: 1px solid #009640;font-weight: 800;} /* Kabine Heim */
    .hsv-print-table :is(th,td):nth-child(6) { width: 10mm !important; min-width:10mm !important; max-width:10mm !important; text-align:right; border-left: 1px solid #009640;border-right: 1px solid #009640;font-weight: 800;} /* Kabine Gast */
    .hsv-print-table :is(th,td):nth-child(7) { width: 10mm !important; min-width:10mm !important; max-width:10mm !important; text-align:right; border-left: 1px solid #009640;border-right: 1px solid #009640;font-weight: 800;} /* SR */
    .hsv-print-table :is(th,td):nth-child(8) { width: 10mm !important; min-width:10mm !important; max-width:10mm !important; text-align:right; border-left: 1px solid #009640;border-right: 1px solid #009640;font-weight: 800;} /* Platz */

    /* Eintragungslinien, wenn leer */
    .hsv-print-table td.textline:empty::after {
        content: "";
        letter-spacing: .5px;
    }

    /* Notfall-Schrumpfer, wenn es knapp wird: dichte Klassen (siehe PHP unten) */
    .density--tight  { zoom: 0.88; transform: scale(0.88); }
    .density--xtight { zoom: 0.84; transform: scale(0.84); }

    :is(th,td).w10mm  { width: 10mm !important; }
    :is(th,td).w20mm  { width: 20mm !important; }
    :is(th,td).w50mm  { width: 50mm !important; }
    :is(th,td).w100mm { width: 100mm !important; }

    .pfs-12pt{
        font-size: 12pt !important;
    }

    .fs-3{
        font-size: 12pt !important;
    }
}