/* gantt/gantt.css — ten-week planner grid. Shared print rules: /master_print.css. */

.calendar-header {
    margin-top: 30px;
    padding-top: 12px;
    padding-bottom: 1cm;
}

body.page-gantt .gregorian-date {
    font-size: 12px;
}

/* Print layout (master_print.css) reads this for equal 10-week rows. */
.calendar-grid {
    --calendar-week-rows: 10;
}

@media screen and (max-width: 768px) {
    .calendar-header {
        margin-top: 6px;
        padding: 8px 0 10px;
    }
}

@media print {
    @page {
        size: auto;
        margin: 12mm 18mm 10mm;
    }

    body.page-gantt .calendar-header {
        padding-bottom: 1cm;
    }

    body.page-gantt .gregorian-date {
        font-size: 10px;
    }

    /* 174mm/261mm were master_print.css's own 186mm/273mm minus a fixed 12mm —
       an inset left over from this file's @page margin (12mm 18mm 10mm) not
       actually being the one applied at print time (the JS-injected 15mm 12mm
       10mm wins). calc(100% - 12mm) reproduces both values exactly on A4 but,
       unlike the old absolute mm, grows with whatever paper is picked.
       .calendar-container is nested INSIDE .container (gantt/index.html) —
       the inset must live on the outer element only, or the inner one's
       100% resolves against an already-inset parent and gets inset twice. */
    html[data-print-orientation="portrait"] body.page-gantt .container {
        width: calc(100% - 12mm);
    }

    html[data-print-orientation="portrait"] body.page-gantt .calendar-container {
        width: 100%;
    }

    html[data-print-orientation="landscape"] body.page-gantt .container {
        width: calc(100% - 12mm);
    }

    html[data-print-orientation="landscape"] body.page-gantt .calendar-container {
        width: 100%;
    }

    html[data-print-orientation="portrait"] body.page-gantt .calendar-header,
    html[data-print-orientation="landscape"] body.page-gantt .calendar-header {
        padding-bottom: 1cm;
    }
}
