/*
 * Leipziger Familienchor – CiviCRM / Drupal 11
 * Oberflächenanpassungen (bereinigt am 09.11.2026)
 *
 * Geltungsbereiche:
 *   1. SearchKit und Anwesenheitsliste – Bildschirm
 *   2. SearchDisplay 73 – Druck
 *   3. CKEditor 5 und FormBuilder
 *   4. Chorstatistik
 *
 * Die Druckregeln für die historische 10-Spalten-Liste sind entfallen.
 * Die Druckgestaltung setzt die Klasse .chorsystem-anwesenheit-druck
 * der aktuellen SearchKit-Anzeige 73 voraus.
 */

/* CiviCRM – Untermenüs deutlicher voneinander abgrenzen */

#civicrm-menu ul {
    box-shadow:
        0 0 18px 9px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(128, 128, 128, 0.6) !important;
}
/* Tiefere Menüebenen stärker hervorheben */
#civicrm-menu ul ul {
    box-shadow:
        0 0 24px 12px rgba(0, 0, 0, 0.3),
        0 0 0 2px rgba(128, 128, 128, 0.5) !important;
}


/* ============================================================
   1. SearchKit / Anwesenheitsliste – Bildschirm
   ============================================================ */

/* Abstand für reguläre CiviCRM-Sticky-Header. */
table.crm-sticky-header > thead > tr {
    top: calc(var(--crm-menubar-bottom, 0px) + 4px) !important;
}

/* Fortlaufende Zeilennummern nur in der Anwesenheitsliste. */
.crm-search-display-table:has(.chorprobe-lfdnr) {
    counter-reset: chorprobe-nr;
}

.crm-search-display-table .chorprobe-lfdnr {
    counter-increment: chorprobe-nr;
    display: inline-block;
    min-width: 2ch;
    text-align: right;
}

.crm-search-display-table .chorprobe-lfdnr::before {
    content: counter(chorprobe-nr);
}

/* Art-Spalte (P/F): Symbol zentrieren, sowohl am Bildschirm als auch im Druck. */
table.chorsystem-anwesenheit-druck :is(th, td):nth-child(2) {
    text-align: center !important;
}

table.chorsystem-anwesenheit-druck td:nth-child(2) .crm-i {
    display: inline-block !important;
    float: none !important;
    margin: 0 auto !important;
}

@media screen {
    /* Die Drucklisten-Tabelle wird auch am Bildschirm angezeigt. */
    table.chorsystem-anwesenheit-druck thead > tr {
        position: sticky !important;
        top: max(
            calc(var(--crm-menubar-bottom, 0px) + 4px),
            calc(var(--drupal-displace-offset-top, 0px) + 4px)
        ) !important;
        z-index: 20 !important;
    }

    table.chorsystem-anwesenheit-druck thead > tr > th {
        background-color: #f2f2f2 !important;
    }
}

/* ============================================================
   2. SearchDisplay 73 – Druck der Anwesenheitsliste
   ============================================================ */

/* Der Seitenrand ist eine seitenweite @page-Einstellung. */
@page {
    margin-bottom: 5mm;
}

@media print {
    /* Nur die Druckliste ausgeben. Diese bewährte Print-Isolation bleibt
       erhalten, da sie auch andere SearchKit-Anzeigen auf der Seite
       zuverlässig aus dem Ausdruck herausnimmt. */
    body:has(.chorprobe-lfdnr)
    *:not(:has(.chorprobe-lfdnr))
    :not(.crm-search-display-table:has(.chorprobe-lfdnr))
    :not(.crm-search-display-table:has(.chorprobe-lfdnr) *) {
        display: none !important;
    }

    /* 2.1 Drupal- und CiviCRM-Offsets beseitigen. */
    html:has(table.chorsystem-anwesenheit-druck) {
        --drupal-displace-offset-top: 0px !important;
        --drupal-displace-offset-left: 0px !important;
    }

    body:has(table.chorsystem-anwesenheit-druck) {
        --admin-toolbar-sidebar-width: 0px !important;
        --crm-menubar-bottom: 0px !important;
        --drupal-displace-offset-top: 0px;
        --drupal-displace-offset-left: 0px;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    /* Spezifischer Reset für Layouts, die einen administrativen Abstand erzwingen. */
    :is(body, #chorprobe-specificity-boost):has(table.chorsystem-anwesenheit-druck) {
        margin-top: 0 !important;
        margin-block-start: 0 !important;
        padding-top: 0 !important;
        padding-block-start: 0 !important;
    }

    /* 2.2 Bedienoberfläche, Navigationsleisten und Fußbereiche ausblenden. */
    body:has(table.chorsystem-anwesenheit-druck) :is(
        #admin-toolbar,
        #toolbar-administration,
        .admin-toolbar,
        .admin-toolbar-control-bar,
        .admin-toolbar-overlay,
        .top-bar.admin--navigation-top-bar,
        .region.admin--navigation-top-bar--offset,
        #civicrm-menu,
        #crm-menubar,
        .crm-menubar,
        .crm-menubar-wrapper,
        #crm-main-menu,
        .region-header,
        .region-breadcrumb,
        .block-page-title-block,
        .page-header,
        #page-title,
        .crm-page-title,
        .breadcrumb,
        .breadcrumb__list,
        nav:has(.breadcrumb__list),
        .crm-admin-block-context-dropdown,
        #access
    ),
    body:has(table.chorsystem-anwesenheit-druck) h1 {
        display: none !important;
    }

    /* 2.3 Druckbreite ohne Drupal-Containerabstände. */
    body:has(table.chorsystem-anwesenheit-druck) :is(
        .dialog-off-canvas-main-canvas,
        #page,
        #page-wrapper,
        #main-wrapper,
        #main,
        main,
        main.page-content,
        #content,
        .layout-container,
        .layout-content,
        .region-content,
        .block-system-main-block,
        #crm-container,
        .crm-container
    ) {
        margin: 0 !important;
        padding: 0 !important;
        margin-inline-start: 0 !important;
        padding-inline-start: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    body:has(table.chorsystem-anwesenheit-druck) :is(main, #content) {
        overflow: visible !important;
    }

    body:has(table.chorsystem-anwesenheit-druck)
    fieldset:has(table.chorsystem-anwesenheit-druck) {
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        min-width: 0;
    }

    /* 2.4 SearchKit-Container und Drucktitel. */
    .crm-search-display-table:has(table.chorsystem-anwesenheit-druck) {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    /* Sicherheits-Fallback: Der Titel bleibt auch bei verschachtelten
       SearchKit-Tabellen vorhanden; die direkte Tabelle nutzt den Titel
       der aktuellen Anzeige 73. */
    .crm-search-display-table:has(.chorprobe-lfdnr)::before {
        content: "Leipziger Familienchor – Anwesenheitsliste - Probe am: __________________________";
        display: block;
        font-size: 9pt !important;
        font-weight: bold;
        line-height: 1;
        white-space: pre-line;
        margin-bottom: 4mm !important;
        color: black;
    }

    .crm-search-display-table:has(> table.chorsystem-anwesenheit-druck)::before {
        content: "Anwesenheitsliste – Druck     |     Probe am: __________________";
        display: block;
        font-family: Arial, sans-serif;
        font-size: 9pt !important;
        font-weight: bold;
        line-height: 1;
        white-space: pre-line;
        color: black;
        margin: 0 0 4mm 0 !important;
        padding: 0;
    }

    .crm-search-display-table:has(table.chorsystem-anwesenheit-druck) > :is(
        .form-inline,
        details,
        div[ng-include*="Pager"]
    ) {
        display: none !important;
    }

    .crm-search-display-table:has(table.chorsystem-anwesenheit-druck) .table-responsive {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    /* 2.5 Drucktabelle – gemeinsame Typografie und Zellgestaltung. */
    table.chorsystem-anwesenheit-druck {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        font-family: Arial, sans-serif !important;
        font-size: 9pt !important;
        line-height: 1;
        background: white !important;
        color: black !important;
    }

    body:has(table.chorsystem-anwesenheit-druck)
    table.chorsystem-anwesenheit-druck :is(th, td, th *, td *) {
        font-size: 8.5pt !important;
        line-height: 1.2 !important;
    }

    table.chorsystem-anwesenheit-druck :is(th, td) {
        border: 0.3pt solid #777 !important;
        padding: 1mm !important;
        vertical-align: middle !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
        background: white !important;
        color: black !important;
    }

    table.chorsystem-anwesenheit-druck thead {
        display: table-header-group !important;
        position: static !important;
        top: auto !important;
        transform: none !important;
    }

    table.chorsystem-anwesenheit-druck thead tr,
    table.chorsystem-anwesenheit-druck thead th {
        position: static !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        box-shadow: none !important;
        z-index: auto !important;
    }

    table.chorsystem-anwesenheit-druck thead th {
        font-weight: bold;
        text-align: left;
        visibility: visible !important;
        opacity: 1 !important;
    }

    table.chorsystem-anwesenheit-druck tbody {
        display: table-row-group !important;
    }

    table.chorsystem-anwesenheit-druck tbody td {
        height: 8mm !important;
        min-height: 8mm;
    }

    table.chorsystem-anwesenheit-druck tbody tr {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    table.chorsystem-anwesenheit-druck thead th .crm-search-table-column-sort-icon {
        display: none !important;
    }

    /* 2.6 Spaltenbreiten: 12 Spalten, zusammen genau 100 %. */
    table.chorsystem-anwesenheit-druck th:nth-child(1)  { width: 3%; }  /* Nr. */
    table.chorsystem-anwesenheit-druck th:nth-child(2)  { width: 4%; }  /* P/F */
    table.chorsystem-anwesenheit-druck th:nth-child(3)  { width: 15%; } /* Nachname */
    table.chorsystem-anwesenheit-druck th:nth-child(4)  { width: 8%; } /* Vorname */
    table.chorsystem-anwesenheit-druck th:nth-child(5),
    table.chorsystem-anwesenheit-druck th:nth-child(6),
    table.chorsystem-anwesenheit-druck th:nth-child(7),
    table.chorsystem-anwesenheit-druck th:nth-child(8)  { width: 8%; }  /* Weitere Namen */
    table.chorsystem-anwesenheit-druck th:nth-child(9),
    table.chorsystem-anwesenheit-druck th:nth-child(10) { width: 4%; }  /* Kästchen */
    table.chorsystem-anwesenheit-druck th:nth-child(11) { width: 13%; } /* Stimmlage */
    table.chorsystem-anwesenheit-druck th:nth-child(12) { width: auto; } /* Bemerkung */

    /* Namen nicht mitten im Wort umbrechen. */
    table.chorsystem-anwesenheit-druck :is(th, td):nth-child(n+3):nth-child(-n+8) {
        text-align: left !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: manual !important;
    }

    table.chorsystem-anwesenheit-druck :is(th, td):nth-child(1),
    table.chorsystem-anwesenheit-druck :is(th, td):nth-child(9),
    table.chorsystem-anwesenheit-druck :is(th, td):nth-child(10) {
        text-align: center !important;
    }

    body:has(table.chorsystem-anwesenheit-druck)
    table.chorsystem-anwesenheit-druck :is(
        td:nth-child(9), td:nth-child(9) *,
        td:nth-child(10), td:nth-child(10) *
    ) {
        font-family: Arial, "DejaVu Sans", sans-serif;
        font-size: 12pt !important;
    }

}

/* ============================================================
   3. Personenzahl in der Anwesenheitsliste (Bildschirm + Druck)
   ============================================================ */

/* CSS-Counter: für die von SearchKit ausgegebenen Klassen 1 bis 30.
   Die Einzelregeln bleiben nötig, da CSS keinen Klassen-Suffix als
   numerischen Wert in counter-increment einsetzen kann. */
.crm-search-display-table:has(
    table.chorsystem-anwesenheit-druck .chorsystem-personenwert
) {
    counter-reset: chorsystem-personen;
}

.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-1 {
    counter-increment: chorsystem-personen 1;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-2 {
    counter-increment: chorsystem-personen 2;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-3 {
    counter-increment: chorsystem-personen 3;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-4 {
    counter-increment: chorsystem-personen 4;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-5 {
    counter-increment: chorsystem-personen 5;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-6 {
    counter-increment: chorsystem-personen 6;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-7 {
    counter-increment: chorsystem-personen 7;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-8 {
    counter-increment: chorsystem-personen 8;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-9 {
    counter-increment: chorsystem-personen 9;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-10 {
    counter-increment: chorsystem-personen 10;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-11 {
    counter-increment: chorsystem-personen 11;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-12 {
    counter-increment: chorsystem-personen 12;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-13 {
    counter-increment: chorsystem-personen 13;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-14 {
    counter-increment: chorsystem-personen 14;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-15 {
    counter-increment: chorsystem-personen 15;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-16 {
    counter-increment: chorsystem-personen 16;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-17 {
    counter-increment: chorsystem-personen 17;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-18 {
    counter-increment: chorsystem-personen 18;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-19 {
    counter-increment: chorsystem-personen 19;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-20 {
    counter-increment: chorsystem-personen 20;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-21 {
    counter-increment: chorsystem-personen 21;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-22 {
    counter-increment: chorsystem-personen 22;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-23 {
    counter-increment: chorsystem-personen 23;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-24 {
    counter-increment: chorsystem-personen 24;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-25 {
    counter-increment: chorsystem-personen 25;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-26 {
    counter-increment: chorsystem-personen 26;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-27 {
    counter-increment: chorsystem-personen 27;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-28 {
    counter-increment: chorsystem-personen 28;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-29 {
    counter-increment: chorsystem-personen 29;
}
.crm-search-display-table:has(table.chorsystem-anwesenheit-druck .chorsystem-personenwert) .chorsystem-personenwert-30 {
    counter-increment: chorsystem-personen 30;
}

.crm-search-display-table:has(
    table.chorsystem-anwesenheit-druck .chorsystem-personenwert
)::after {
    content: "Gesamtzahl Personen: " counter(chorsystem-personen);
    display: block;
    width: 100%;
    text-align: right;
    font-family: Arial, sans-serif;
    font-size: 9pt;
    font-weight: bold;
    padding-top: 2mm;
    padding-right: 5mm;
    color: #000;
}

@media print {
    .crm-search-display-table:has(
        table.chorsystem-anwesenheit-druck .chorsystem-personenwert
    )::after {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ============================================================
   4. CKEditor 5 / FormBuilder
   ============================================================ */

/* ==========================================================
   Chorsystem – CKEditor 5
   Größenänderbarer Eingabebereich
   ========================================================== */

@media screen {

    .ck.ck-editor__main > .ck.ck-editor__editable_inline {
        height: 300px;
        min-height: 150px;
        resize: vertical;
        overflow-y: auto;
        box-sizing: border-box;
    }

}

/* ===========================================
   FormBuilder – Suchformular-Dropdown
   =========================================== */

af-admin-list-menu[tab="search"] .dropdown-menu {
    width: 780px;
    min-width: 0;
    max-width: calc(100vw - 30px);

    /* Am rechten Rand ausrichten */
    left: auto;
    right: 0;

    /* Lange Listen scrollbar machen */
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Lange Einträge vollständig anzeigen */
af-admin-list-menu[tab="search"] .dropdown-menu li a {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.4;
    padding: 7px 12px;
}

/* Suchfeld an die neue Breite anpassen */
af-admin-list-menu[tab="search"] .dropdown-menu input[type="search"] {
    width: 100%;
    box-sizing: border-box;
}
/* ==========================================
   Chorsystem – Chorstatistik Altersstufen
   ========================================== */

/* Beide Altersstufen nebeneinander */
.chorsystem-statistik-alter
.crm-search-display-list-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;

    margin: 0;
    padding: 0;
    list-style: none;
}

/* Bezeichnung und Anzahl nebeneinander */
.chorsystem-statistik-alter
.crm-search-display-listitem {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;

    margin: 0;
    padding: 0;
    list-style: none;
}

/* Felder nicht über die gesamte Breite */
.chorsystem-statistik-alter
.crm-search-display-listitem
.crm-search-col-type-field {
    display: inline-block !important;
    width: auto !important;

    margin: 0;
    padding: 0;

    white-space: nowrap;
}

/* Doppelpunkt hinter der Altersstufe */
.chorsystem-statistik-alter
.crm-search-display-listitem
.crm-search-col-type-field:first-child
.crm-search-field-value::after {
    content: ":";
}

/* Anzahl hervorheben */
.chorsystem-statistik-alter
.crm-search-display-listitem
.crm-search-col-type-field:nth-child(2) {
    font-weight: 600;
}
/* ==========================================
   Chorsystem – Stimmlagenstatistik kompakt
   ========================================== */

/* Alle Stimmlagen nebeneinander */
.chorsystem-statistik-stimmen
.crm-search-display-list-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;

    margin: 0;
    padding: 0;
    list-style: none;

    overflow-x: auto;
}

/* Stimmlage und Anzahl zusammenhalten */
.chorsystem-statistik-stimmen
.crm-search-display-listitem {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;

    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Keine zusätzlichen Zeilenumbrüche */
.chorsystem-statistik-stimmen
.crm-search-col-type-field {
    display: inline-block !important;
    width: auto !important;
    white-space: nowrap;
}

/* Doppelpunkt hinter Stimmlagenbezeichnung */
.chorsystem-statistik-stimmen
.crm-search-col-type-field:first-child
.crm-search-field-value::after {
    content: ":";
}

/* Anzahl hervorheben */
.chorsystem-statistik-stimmen
.crm-search-col-type-field:nth-child(2) {
    font-weight: 600;
}
/* ==========================================
   Chorstatistik – Reihenfolge der Stimmlagen
   ========================================== */

/* Standardposition für alle übrigen Stimmlagen */
.chorsystem-statistik-stimmen
.crm-search-display-listitem {
    order: 10;
}

/* Kind */
.chorsystem-statistik-stimmen
.crm-search-display-listitem:has(.chorsystem-stimme-kind) {
    order: 0;
}

/* Sopran */
.chorsystem-statistik-stimmen
.crm-search-display-listitem:has(.chorsystem-stimme-sopran) {
    order: 1;
}

/* Alt */
.chorsystem-statistik-stimmen
.crm-search-display-listitem:has(.chorsystem-stimme-alt) {
    order: 2;
}

/* Tenor */
.chorsystem-statistik-stimmen
.crm-search-display-listitem:has(.chorsystem-stimme-tenor) {
    order: 3;
}

/* Bariton */
.chorsystem-statistik-stimmen
.crm-search-display-listitem:has(.chorsystem-stimme-bariton) {
    order: 4;
}
/* ==========================================
   Chorstatistik – Mitglieder und Gesamtzahl
   ========================================== */

/* Mitgliederwerte nebeneinander */
.chorsystem-statistik-mitglieder {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    min-width: 0;
}

/* Beschriftung und Gesamtzahl nebeneinander */
.chorsystem-statistik-gesamt {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap;
}

/* Listenformatierung der Gesamtzahl entfernen */
.chorsystem-statistik-gesamtzahl
.crm-search-display-list-container {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chorsystem-statistik-gesamtzahl
.crm-search-display-listitem {
    display: inline-flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Gesamtzahl hervorheben */
.chorsystem-statistik-gesamtzahl
.crm-search-field-value {
    font-weight: 600;
}
/* Anwesenheitsdruckliste 73:
   Spaltenüberschriften abkürzen */

@media print {

    /* Ursprüngliche Beschriftungen ausblenden */
    body:has(table.chorsystem-anwesenheit-druck)
    table.chorsystem-anwesenheit-druck thead
    :is(
        th:nth-child(9),
        th:nth-child(10),
        th:nth-child(9) *,
        th:nth-child(10) *
    ) {
        font-size: 0 !important;
    }

    /* Spalte 9: Anwesend → Anw */
    table.chorsystem-anwesenheit-druck
    thead th:nth-child(9)::after {
        content: "Anw";
        font-size: 8.5pt !important;
    }

    /* Spalte 10: Entschuldigt → Ent */
    table.chorsystem-anwesenheit-druck
    thead th:nth-child(10)::after {
        content: "Ent";
        font-size: 8.5pt !important;
    }
}