/* 3. Legenda balk onder de kalender (exact gelijk aan PDF-legenda) */
.legend {
    order: 3;
    width: 100% !important;
    background: #ffffff !important;
    padding: 2.5px 8px !important;
    margin-top: 5px !important;
    margin-bottom: 5px !important;
    font-size: 6.8pt !important;
    line-height: 1.15 !important;
    justify-content: center !important;
    gap: 14px !important;
    border-radius: 4px !important;
    border: 0.6pt solid #cbd5e1 !important;
    box-shadow: none !important;
}

.legend .dot {
    width: 7px !important;
    height: 7px !important;
    border-radius: 1.5px !important;
}

.legend-item.hidden,
body.print-no-holidays .legend-holiday,
body.print-no-specials .legend-special,
body.print-no-legend .legend,
body.print-all-lists-hidden .legend {
    display: none !important;
}

/* 4. Overzichtslijsten onderaan (Schoolvakanties & Bouwvak onder elkaar in 1 kolom) */
.lists-wrapper,
body.print-portrait .lists-wrapper {
    order: 4;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    margin: 0 !important;
    gap: 6px !important;
}

.holiday-list.hidden,
body.print-no-holidays .section-holidays,
body.print-no-specials .section-specials,
body.print-all-lists-hidden .lists-wrapper {
    display: none !important;
}

.holiday-list {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    background: #ffffff !important;
    padding: 3.5px 5px !important;
    border-radius: 4px !important;
    border: 0.6pt solid #cbd5e1 !important;
    break-inside: avoid;
}

.holiday-list h2 {
    font-size: 6.6pt !important;
    line-height: 1.15 !important;
    margin: 0 0 2px 0 !important;
    color: #0f172a !important;
}

.holiday-list ul {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1px 6px !important;
}

.holiday-list:only-child ul {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.holiday-list.section-school ul,
.holiday-list.section-bouwvak ul {
    grid-template-columns: 1fr !important;
}

.holiday-list li {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    min-width: 0 !important;
    padding: 0 2px !important;
    margin: 0 !important;
    font-size: 5.5pt !important;
    line-height: 1.15 !important;
    background: transparent !important;
    border-radius: 0 !important;
}

/* Verborgen regio-items en uitgevinkte dagen ook tijdens het printen verbergen */
.holiday-list li.hidden,
.holiday-list li.event-hidden {
    display: none !important;
}

.holiday-list li > span:first-child {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.holiday-list li > span:last-child {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    font-weight: bold !important;
}

/* 5. Voettekst onderaan (exact gelijk aan PDF-voettekst) */
.print-footer {
    order: 5;
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    margin-top: 5px !important;
    padding-top: 2.5px !important;
    border-top: 0.6pt solid #cbd5e1 !important;
    font-size: 6.5pt !important;
    line-height: 1.15 !important;
    color: #64748b !important;
}
