/* Print stylesheet: clean page layout for the notation table and Song Notes when printing. */


@media print {
    :root {
        --line-column-width: 28mm;
    }

    html,
    body {
        background: #fff !important;
    }

    body {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .noPrint,
    .rowMenuButton,
    .cellModeBadge,
    .isTrailingBlank,
    .lineHeader,
    .lineMetaCell,
    .tablaBolBadge {
        display: none !important;
    }

    .documentPage {
        width: 100%;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .compositionHeader {
        margin-bottom: 5mm;
    }

    .editableTitle,
    .editableSubtitle,
    .editableDescription,
    [contenteditable="true"]:hover,
    [contenteditable="true"]:focus {
        padding-left: 0;
        padding-right: 0;
        background: transparent !important;
    }

    [contenteditable="true"]:empty {
        display: none;
    }

    [contenteditable="true"]:empty::before {
        content: none;
    }

    .tableScroller {
        overflow: visible !important;
        border-radius: 0 !important;
        border: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .notationTable {
        min-width: 0 !important;
        width: 100% !important;
        table-layout: fixed;
        border-collapse: collapse !important;
        border: 1px solid #525b68 !important;
        box-sizing: border-box !important;
    }

    .notationTable thead {
        display: table-header-group;
    }

    .notationTable tbody {
        display: table-row-group;
    }

    .notationTable tr,
    .notationTable td,
    .notationTable th {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .notationTable th,
    .notationTable td {
        border: 1px solid #525b68 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .notationTable tr>*:last-child {
        border-right: 2.5px solid #525b68 !important;
    }

    .notationTable tbody tr:last-child>* {
        border-right: 2.5px solid #525b68 !important;
    }

    /* Khand separation highlight borders (bold / dark vertical lines) */
    .khandHeader:not(:first-child),
    .matraHeader.khandStart,
    .matraCell.khandStart {
        border-left: 2.5px solid #111827 !important;
    }

    .notationTable thead th {
        background: #f1f3f6 !important;
    }

    .taalNameHeader {
        background: #e9eef9 !important;
        padding: 2px !important;
    }

    .khandHeader {
        padding: 2px !important;
    }

    .lineMetaCell,
    .textRow td {
        background: #fff !important;
    }

    .lineMetaInner {
        padding: 2px !important;
    }

    .rowLabelInput,
    .repeatInput,
    .textRowInput {
        border: 0;
        padding-left: 0;
        padding-right: 0;
        background: transparent;
        box-shadow: none;
    }

    .rowLabelInput::placeholder,
    .repeatInput::placeholder,
    .textRowInput::placeholder {
        color: transparent;
    }

    .matraCell {
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .matraCellInner {
        height: auto !important;
        padding: 2px 0 !important;
        margin: 0 !important;
    }

    .matraCell.active {
        box-shadow: none;
    }

    .matraInput {
        display: none !important;
    }

    .textRowInner {
        padding: 0;
    }

    .textRowTag {
        display: none;
    }

    .songLinePair {
        padding: 6px 0;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .songLineLyrics,
    .songLineNotes {
        padding: 2px 0;
    }

    .songLineLyrics:empty,
    .songLineNotes:empty {
        display: none;
    }

    .songLineLyrics:empty::before,
    .songLineNotes:empty::before {
        content: none;
    }
}