/* Arkkids Jaarplanner – Print / PDF CSS v2.2.4 */

/* PDF export button */
.ajp-pdf-bar {
    margin: 0 0 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.ajp-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #1e6bd6;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.ajp-pdf-btn:hover {
    background: #1558b0;
}

/* Print styles — only applied when window.print() is called */
@media print {

    /* Hide everything except the taken table */
    body * {
        visibility: hidden;
    }

    .ajp-taken-wrap,
    .ajp-taken-wrap * {
        visibility: visible;
    }

    .ajp-taken-wrap {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    /* Hide interactive elements */
    .ajp-toolbar,
    .ajp-save-row,
    .ajp-del-row,
    .ajp-add-row,
    .ajp-person-add,
    .ajp-chip-rm,
    .ajp-pdf-bar,
    .ajp-actions-col,
    .ajp-check-col {
        display: none !important;
    }

    /* Hide acties and afgevinkt columns (last 2) */
    .ajp-table .ajp-head th:nth-child(8),
    .ajp-table .ajp-head th:nth-child(9),
    .ajp-table tbody td:nth-child(8),
    .ajp-table tbody td:nth-child(9) {
        display: none !important;
    }

    /* Table print styling */
    .ajp-table {
        width: 100% !important;
        font-size: 10pt;
        border-collapse: collapse;
        table-layout: fixed;
    }

    .ajp-table th,
    .ajp-table td {
        border: 1px solid #000 !important;
        padding: 4px 5px !important;
        word-break: break-word;
    }

    .ajp-title {
        background: #c00 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color: #fff !important;
    }

    .ajp-subtitle {
        background: #e8e8e8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .ajp-head th {
        background: #bfbfbf !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Make select/textarea show as plain text */
    .ajp-table textarea,
    .ajp-table select,
    .ajp-table input {
        border: none !important;
        background: transparent !important;
        resize: none !important;
        font-size: 10pt;
    }

    /* Person chips */
    .ajp-chip {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        display: inline !important;
    }

    .ajp-chips {
        display: inline !important;
    }

    .ajp-chip + .ajp-chip::before {
        content: ", ";
    }

    /* Page setup */
    @page {
        size: A4 landscape;
        margin: 1cm;
    }
}
