/* Print styles for student details calendar - FULL PAGE SCALING */
@media print {
    /* --- BASIC SETUP --- */
    @page {
        size: A4 landscape;
        margin: 1.5cm;
    }
    
    /* Hide specific unwanted elements only */
    header, footer, nav, .navbar {
        display: none !important;
    }

    /* Hide pagination controls specifically */
    .pagination, .page-navigation, nav[role="navigation"], 
    .pagination-controls, .page-controls {
        display: none !important;
    }

    /* Hide everything by default */
    body * {
        visibility: hidden;
    }
   .ec-events{
        margin: 0 1px 0 1px;
    }
.ec-event {
      border: 1px solid;
}
    /* Make only the print area visible */
    .print-area{
        display: block !important;
    }
    #print-area, #print-area * {
        visibility: visible;
    }

    #print-area {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    /* Force-hide any element with the .no-print class */
    .no-print, #print-area .no-print {
        display: none !important;
    }

    /* --- GENERAL STYLES FOR FITTING ON ONE PAGE --- */
    #print-area {
        font-size: 10pt;
        transform: scale(1.0);
        transform-origin: top left;
        width: 100%;
        height: 100%;
    }

    /* --- MONTHLY CALENDAR STYLES (Fill entire page) --- */
    .print-monthly .table {
        page-break-inside: avoid !important;
        page-break-after: avoid !important;
        font-size: 9pt !important;
        width: 100% !important;
        table-layout: fixed !important;
    }
    
    .print-monthly th {
        font-size: 6pt !important;
        padding: 1px !important;
        height: 20px !important;
        vertical-align: top !important;
        border: 0.5px solid #000 !important;
        line-height: 1.1 !important;
    }
    
    .print-monthly td {
        font-size: 8pt !important;
        padding: 3px !important;
        vertical-align: top !important;
        border: 0.5px solid #000 !important;
    }
    
    .print-monthly div[style*="font-size:smaller"] {
        font-size: 7pt !important;
        margin: 2px !important;
        padding: 2px !important;
        line-height: 1.2 !important;
    }

    /* --- WEEKLY CALENDAR STYLES (Fill entire page) --- */
    .print-weekly .calendar-grid-container {
        page-break-inside: avoid !important;
        page-break-after: avoid !important;
        transform: scale(1.2);
        transform-origin: top left;
        width: 83%;
        height: 81vh;
        margin: 0;
        max-height: 100vh !important;
    }
    
    .print-weekly .calendar-header {
        font-size: 6pt !important;
        padding: 2px !important;
        font-weight: bold !important;
        height: 25px !important;
        line-height: 1.2 !important;
    }
    
    .print-weekly .time-slot {
        font-size: 6pt !important;
        padding-right: 1px !important;
        font-weight: bold !important;
    }
    
    .print-weekly .event-overlay {
        font-size: 5pt !important;
        padding: 1px !important;
        line-height: 1.1 !important;
    }
    
    /* Optimize grid rows to fill available height - larger header, content rows */
    .print-weekly .calendar-grid-container {
        grid-template-rows: 25px !important; /* Larger header row */
        grid-auto-rows: 16.8px !important; /* Content rows */
    }
    
    /* Ensure calendar fills the full height */
    .print-weekly {
        height: 70vh !important;
        width: 100% !important;
    }
}
