/* ═══════════════════════════════════════════════════
   SPACE LAB — PRINT STYLES
   Formato A4 para impresión de sesiones MINEDU
   ═══════════════════════════════════════════════════ */

@media print {
    /* ─── Hide UI elements ─── */
    .app-header,
    .sidebar,
    .space-background,
    .toast-container,
    .confirm-overlay,
    .loader-overlay,
    .no-print,
    .preview-toolbar,
    .empty-state,
    .load-modal,
    #btn-menu-mobile {
        display: none !important;
    }

    /* ─── Reset page ─── */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html, body {
        background: #fff !important;
        color: #000 !important;
        font-family: 'Inter', Arial, Helvetica, sans-serif;
        font-size: 11pt;
        line-height: 1.4;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* ─── Page setup ─── */
    @page {
        size: A4 portrait;
        margin: 15mm 12mm 15mm 12mm;
    }

    /* ─── Layout reset ─── */
    .app-wrapper,
    .app-main,
    .preview-area,
    .print-preview {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .print-preview {
        animation: none !important;
    }

    /* ─── Session Sheet ─── */
    .session-sheet {
        background: #fff !important;
        color: #000 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        min-height: auto !important;
        font-size: 10pt;
        line-height: 1.4;
    }

    /* ─── Tables ─── */
    .session-sheet .session-header-table,
    .session-sheet .content-table,
    .session-sheet .eval-table {
        width: 100%;
        border-collapse: collapse;
        page-break-inside: auto;
    }

    .session-sheet .session-header-table td,
    .session-sheet .content-table th,
    .session-sheet .content-table td,
    .session-sheet .eval-table th,
    .session-sheet .eval-table td {
        border: 1px solid #333 !important;
        padding: 4px 6px;
        font-size: 9pt;
    }

    .session-sheet .content-table tr,
    .session-sheet .eval-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* ─── Header cells ─── */
    .session-sheet .label-cell {
        background: #e8e8f0 !important;
        font-weight: 700;
        font-size: 8pt;
        color: #000 !important;
    }

    .session-sheet .content-table th,
    .session-sheet .eval-table th {
        background: #e8e8f0 !important;
        color: #000 !important;
        font-weight: 700;
        font-size: 8pt;
    }

    /* ─── Title bar ─── */
    .session-sheet .session-title-bar {
        background: #1e3a5f !important;
        color: #fff !important;
        padding: 6px 10px;
        border-radius: 0;
        margin: 8px 0;
        font-size: 11pt;
        font-weight: 700;
    }

    /* ─── Section titles ─── */
    .session-sheet .section-title {
        background: #e8e8f0 !important;
        color: #000 !important;
        padding: 4px 8px;
        margin: 8px 0 4px;
        border-left: 3px solid #1e3a5f !important;
        border-radius: 0;
        font-size: 9pt;
    }

    /* ─── Moment labels ─── */
    .session-sheet .moment-label {
        background: #e8e8f0 !important;
        color: #000 !important;
    }

    /* ─── Logo ─── */
    .session-sheet .logo-cell img {
        max-width: 15mm;
        max-height: 15mm;
    }

    /* ─── Contenteditable: remove editing styles ─── */
    .session-sheet [contenteditable] {
        background: transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }

    /* ─── Links ─── */
    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    /* ─── Page breaks ─── */
    .page-break-before {
        break-before: page;
        page-break-before: always;
    }

    .page-break-after {
        break-after: page;
        page-break-after: always;
    }

    .no-break {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
