/*
=============================================================
SC_WEB Version 5.0
Datei: core/css/print.css
Build: 001.00
Zeichensatz: UTF-8 ohne BOM

Zweck:
Druckdarstellung des nächsten Termins im visuellen SC_WEB-CORE.

Regeln:
- Die normale CORE-Startseite wird vollständig ausgeblendet.
- Nur der aktivierte Druckbereich wird ausgegeben.
- Interaktive Bedienelemente werden nicht gedruckt.
- Der nächste Termin wird auf einer A4-Seite dargestellt.
=============================================================
*/
/* =========================================================
   SCHNELLNAVIGATION DRUCK
   @page -> allgemeine Druckdarstellung -> Einzeltermin

   WICHTIG:
   - Der aktive .print-sheet liegt direkt in .page-shell.
   - .page-shell > * blendet beim Drucken alle normalen CORE-Bereiche aus.
   - Die DOM-Ebene des Druckbereichs deshalb nicht ohne Anpassung ändern.
========================================================= */


/* =========================================================
   SEITENFORMAT
========================================================= */

@page {
    size: A4 portrait;
    margin: 10mm;
}

/* =========================================================
   DRUCKDARSTELLUNG
========================================================= */

@media print {

    html,
    body {
        width: auto;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
        background: #ffffff;
        color: #000000;
        font-family: Arial, Helvetica, sans-serif;
    }

    /*
    Die Druckausgabe liegt als direktes Kind in .page-shell.
    Deshalb werden nicht body oder .page-shell selbst,
    sondern alle anderen direkten CORE-Bereiche entfernt.
    */
    .page-shell > * {
        display: none !important;
    }

    .page-shell {
        display: block !important;
        width: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
    }

    .print-sheet {
        display: none !important;
        box-sizing: border-box;
        width: auto;
        max-width: none;
        min-height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
        background: #ffffff;
        color: #000000;
    }

    .page-shell > .print-sheet[aria-hidden="false"] {
        display: block !important;
    }

    .print-sheet[aria-hidden="false"] {
        break-after: avoid;
        page-break-after: avoid;
    }

    .print-sheet[aria-hidden="false"] > :last-child,
    .print-sheet[aria-hidden="false"] > :last-child > :last-child {
        margin-bottom: 0 !important;
    }

    button,
    audio,
    .site-navigation {
        display: none !important;
    }

    /* =====================================================
       EINZELTERMIN
    ===================================================== */

    .print-sheet--single,
    .print-single-header,
    .print-single-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .print-single-header {
        margin: 0 0 7mm;
        padding: 0;
    }

    .print-single-header h1 {
        margin: 0 0 2mm;
        font-size: 20pt;
        line-height: 1.1;
    }

    .print-single-header h2 {
        margin: 0;
        font-size: 15pt;
        line-height: 1.2;
    }

    .print-single-card {
        display: grid;
        grid-template-columns: 46% minmax(0, 1fr);
        gap: 8mm;
        margin: 0;
        padding: 0;
        border: 1px solid #000000;
    }

    .print-single-card__media {
        min-width: 0;
        max-height: 105mm;
        overflow: hidden;
    }

    .print-single-card__image {
        display: block;
        width: 100%;
        height: 100%;
        max-height: 105mm;
        object-fit: cover;
    }

    .print-single-card__body {
        min-width: 0;
        padding: 8mm 8mm 8mm 0;
    }

    .print-single-card__date {
        margin: 0 0 4mm;
        font-weight: 700;
    }

    .print-single-card__body h2 {
        margin: 0 0 5mm;
        font-size: 20pt;
        line-height: 1.1;
    }

    .print-single-card .next-event-card__details {
        display: grid;
        gap: 2mm;
        margin: 0;
    }

    .print-single-card .next-event-card__details div {
        display: grid;
        grid-template-columns: 26mm minmax(0, 1fr);
        gap: 3mm;
    }

    .print-single-card .next-event-card__details dt {
        font-weight: 700;
    }

    .print-single-card .next-event-card__details dd {
        margin: 0;
    }

    .print-single-card__description {
        margin: 5mm 0 0;
        line-height: 1.4;
    }

    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}
