/* === Estilos de Impressão da Agenda === */

@media print {

    /* Papel paisagem A4 com margens mínimas */
    @page {
        size: A4 landscape;
        margin: 2mm;
    }

    /* Forçar cores */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* ====== OCULTAR ELEMENTOS ====== */

    aside,
    [class*="bg-purple"] {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        position: absolute !important;
        left: -9999px !important;
    }

    header.print-hidden,
    .print-hidden {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        position: absolute !important;
        left: -9999px !important;
    }

    /* ====== LAYOUT PRINCIPAL ====== */

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        overflow: visible !important;
        height: auto !important;
        width: 100% !important;
    }

    #root {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Remover flex da estrutura principal */
    .flex {
        display: block !important;
        margin: 0 !important;
    }

    .flex-1 {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .h-full {
        height: auto !important;
    }

    /* ====== TÍTULO ====== */

    .print-title {
        display: block !important;
        text-align: center !important;
        font-size: 11pt !important;
        font-weight: bold !important;
        padding: 2mm 0 !important;
        margin: 0 !important;
        border-bottom: 0.5pt solid #333 !important;
    }

    /* ====== CALENDÁRIO ====== */

    .flex-grow.bg-white {
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Overflow visível */
    .overflow-auto,
    .overflow-hidden,
    .overflow-y-auto,
    .overflow-x-auto {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    /* Remover sombras */
    [class*="shadow"] {
        box-shadow: none !important;
    }

    /* Remover bordas arredondadas */
    [class*="rounded"] {
        border-radius: 0 !important;
    }

    /* Sticky para relative */
    .sticky {
        position: relative !important;
    }

    /* ====== EVITAR QUEBRA ====== */

    [class*="border-l-4"] {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* Manter grid junto */
    [style*="grid-template-columns"] {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
}

@media screen {
    .print-title {
        display: none !important;
    }
}