/* print.css
 * Wersja: v2.6.3
 * Ostatnia zmiana: 2026-08-04
 *
 * Zmiany v2.6.3:
 *   - NAPRAWIONO: .day-separator i .week-separator targetują teraz td (nie tr),
 *     aby pionowe linie między dniami/tygodniami renderowały się w drukarce.
 *
 * Zmiany v2.6.0:
 *   - ZMIENIONO: grubszy border (3px solid black) między pracownikami.
 *   - ZMIENIONO: emp-col-even z print-color-adjust: exact.
 *
 * Zmiany v2.6.1:
 *   - ZMIENIONO: zmniejszono padding th/td (4px 2px → 2px 1px) i dodano
 *     line-height: 1.1, aby wydruk Godzin pracy zmieścił się na jednej stronie.
 *   - ZMIENIONO: margines @page z 1cm na 0.5cm.
 *
 * Zmiany v2.4.0:
 *   - DODANO: padding 2px 6px w th/td wydruku.
 *   - DODANO: style .emp-col-even (szara co druga kolumna) dla wydruku.
 *   - DODANO: style .summary-row dla podsumowania nadgodzin.
 */

@media print {
    /* Ukryj elementy niepotrzebne na wydruku */
    .toolbar, 
    .compact-header, 
    .col-width-control, 
    button, 
    .program-nav, 
    #logoutBtn, 
    #userInfo,
    .month-nav,
    #todayBtn,
    #printBtn {
        display: none !important;
    }
    
    body, .app-container {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .month-table-wrapper {
        overflow: visible !important;
        max-height: none !important;
    }
    
    .schedule-table {
        border-collapse: collapse;
        width: 100%;
        font-size: 9pt;
        background: white !important;
    }
    
 .schedule-table th, 
 .schedule-table td {
     border: 1px solid black !important;
     padding: 2px 1px !important;
     text-align: center !important;
     vertical-align: middle !important;
     line-height: 1.0;
 }
    
    /* BRAK LINII między poranną a popołudniową zmianą (ten sam dzień) */
    .morning-row td {
        border-bottom: none !important;
    }
    
    .afternoon-row td {
        border-top: none !important;
    }
    
    /* Cienka linia między różnymi dniami */
    .day-separator td {
        border-top: 1px solid #999 !important;
    }
    
    /* Gruba linia między tygodniami (piątek → poniedziałek) */
    .week-separator td {
        border-top: 3px solid black !important;
    }

    /* oddziel kolumny pracowników grubsza linia */
    .schedule-table th.emp-col-even,
    .schedule-table td.emp-col-even {
        background: #f3f4f6 !important;
    }

    .schedule-table th.emp-separator,
    .schedule-table td.emp-separator {
        border-left: 3px solid black !important;
    }
    
    .schedule-table th {
        background: #f0f0f0 !important;
        font-weight: bold !important;
    }
    
    /* LEWA KOLUMNA */
    .col-day {
        background: #fefaf2 !important;
        font-size: 8pt !important;
        font-weight: bold !important;
        line-height: 1.0;
    }
    
    .day-name {
        font-size: 10pt !important;
        font-weight: bold !important;
    }
    
    .day-date {
        font-size: 10pt !important;
        font-weight: bold !important;
    }
    
    /* Usuń sticky na wydruku */
    .schedule-table thead tr,
    .schedule-table thead tr th,
    .schedule-table td:first-child,
    .schedule-table th:first-child {
        position: static !important;
    }
    
    /* STATUSY – TŁA */
    .status-x-active {
        background-color: #4a4a4a !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .status-xx-active {
        background-color: #d9d9d9 !important;
        color: black !important;
        font-weight: bold;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .status-url-active {
        background-color: #c0c0c0 !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .status-l4-active {
        background-color: #a0a0a0 !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .status-uz-active {
        background-color: #e0e0e0 !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .status-nu-active {
        background-color: #cccccc !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .status-q-active {
        background-color: #e5e5e5 !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .status-empty-active {
        background-color: white !important;
        color: #999 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        border: 1px solid #ccc !important;
    }
    
    .status-wol-active {
        background-color: #e8e8e8 !important;
        color: #333 !important;
        font-weight: bold;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .status-compact {
        border-radius: 0 !important;
        padding: 2px 2px !important;
        box-shadow: none !important;
        border: none !important;
        opacity: 1 !important;
        display: inline-block !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .summary-row td {
        font-weight: bold;
        background: #eef2f7 !important;
        border-top: 2px solid #333 !important;
    }
    
    @page {
        size: portrait;
        margin: 0.5cm;
    }
}
