/* Only the new action has screen styles; all layout changes belong to print. */
body.single-stellenangebot .asta-print-actions {
    margin: 1.25rem 0;
}

body.single-stellenangebot .asta-print-button {
    cursor: pointer;
    font: inherit;
}

body.single-stellenangebot .asta-print-button:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 4px;
}

body.single-stellenangebot .asta-print-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

@media print {
    @page {
        /* YOOtheme can print its stylesheet after WordPress plugin assets. */
        size: A4 portrait !important;
        margin: 15mm !important;
    }

    html:has(body.single-stellenangebot),
    body.single-stellenangebot,
    body.single-stellenangebot .tm-page,
    body.single-stellenangebot .tm-page-container {
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: white !important;
    }

    body.single-stellenangebot {
        color: black !important;
        font: 11pt/1.35 Arial, Helvetica, sans-serif !important;
    }

    body.single-stellenangebot .tm-header,
    body.single-stellenangebot .tm-header-mobile,
    body.single-stellenangebot .tm-toolbar,
    body.single-stellenangebot footer,
    body.single-stellenangebot #wpadminbar,
    body.single-stellenangebot .cmplz-cookiebanner,
    body.single-stellenangebot .cmplz-manage-consent,
    body.single-stellenangebot .cmplz-cookiebanner-container,
    body.single-stellenangebot .trp-language-switcher-container,
    body.single-stellenangebot .uk-offcanvas,
    body.single-stellenangebot .uk-modal,
    body.single-stellenangebot .uk-notification,
    body.single-stellenangebot .uk-sticky-placeholder,
    body.single-stellenangebot .skip-link,
    body.single-stellenangebot .screen-reader-text,
    body.single-stellenangebot .asta-print-actions,
    body.single-stellenangebot .asta-print-hide,
    /* CSS fallback also excludes related jobs when JavaScript is disabled. */
    body.single-stellenangebot #tm-main > :has([uk-filter] .js-filter a[href*="/stellenangebot/"]),
    body.single-stellenangebot #tm-main > :has([data-uk-filter] .js-filter a[href*="/stellenangebot/"]) {
        display: none !important;
    }

    body.single-stellenangebot #tm-main {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.single-stellenangebot #tm-main *,
    body.single-stellenangebot #tm-main *::before,
    body.single-stellenangebot #tm-main *::after {
        box-sizing: border-box;
        color: black !important;
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        animation: none !important;
        transition: none !important;
        transform: none !important;
        position: static !important;
        float: none !important;
        font-family: Arial, Helvetica, sans-serif !important;
        letter-spacing: normal !important;
        text-transform: none !important;
    }

    body.single-stellenangebot #tm-main div {
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        border: 0 !important;
        /* Disable the multicolumn formatting context entirely. A count of 1
           still lets Chromium overlap text at a page boundary. */
        columns: auto !important;
        column-count: auto !important;
        column-width: auto !important;
        text-align: left !important;
        break-inside: auto;
    }

    /* Block flow fragments reliably across pages, unlike flex and grid cards. */
    body.single-stellenangebot #tm-main .uk-grid,
    body.single-stellenangebot #tm-main .uk-grid > *,
    body.single-stellenangebot #tm-main .uk-card,
    body.single-stellenangebot #tm-main .uk-panel {
        display: block !important;
        flex: none !important;
        page-break-inside: auto !important;
        break-inside: auto !important;
    }

    body.single-stellenangebot #tm-main .uk-grid::before,
    body.single-stellenangebot #tm-main .uk-grid::after,
    body.single-stellenangebot #tm-main .uk-grid-divider > *::before,
    body.single-stellenangebot #tm-main [uk-icon],
    body.single-stellenangebot #tm-main [data-uk-icon] {
        display: none !important;
    }

    body.single-stellenangebot #tm-main h1,
    body.single-stellenangebot #tm-main h2,
    body.single-stellenangebot #tm-main h3,
    body.single-stellenangebot #tm-main h4 {
        margin: 10pt 0 4pt !important;
        font-size: 13pt !important;
        font-weight: bold !important;
        line-height: 1.2 !important;
        text-align: left !important;
        page-break-after: avoid !important;
        break-after: avoid-page !important;
    }

    body.single-stellenangebot #tm-main .uk-heading-medium {
        margin-top: 0 !important;
        font-size: 20pt !important;
    }

    body.single-stellenangebot #tm-main h1.uk-h4 {
        margin: 0 0 4pt !important;
        font-size: 10pt !important;
    }

    /* The template places list text in extra divs. Keep these short task
       sections together so their headings cannot be stranded at page ends. */
    body.single-stellenangebot #tm-main .el-item:has(> h3) {
        page-break-inside: avoid !important;
        break-inside: avoid-page !important;
    }

    body.single-stellenangebot #tm-main div:has(> img) {
        page-break-after: avoid !important;
        break-after: avoid-page !important;
    }

    body.single-stellenangebot #tm-main h1 + div,
    body.single-stellenangebot #tm-main h2 + div,
    body.single-stellenangebot #tm-main h3 + div,
    body.single-stellenangebot #tm-main h4 + div,
    body.single-stellenangebot #tm-main h1 + div > :first-child,
    body.single-stellenangebot #tm-main h3 + div > :first-child {
        page-break-before: avoid !important;
        break-before: avoid-page !important;
    }

    body.single-stellenangebot #tm-main p,
    body.single-stellenangebot #tm-main ul,
    body.single-stellenangebot #tm-main ol {
        margin: 0 0 6pt !important;
        font-size: 11pt !important;
        line-height: 1.35 !important;
        orphans: 3;
        widows: 3;
    }

    body.single-stellenangebot #tm-main .uk-text-lead,
    body.single-stellenangebot #tm-main .uk-text-meta {
        margin: 0 0 6pt !important;
        font-size: 11pt !important;
        line-height: 1.35 !important;
    }

    body.single-stellenangebot #tm-main ul,
    body.single-stellenangebot #tm-main ol {
        padding-left: 5mm !important;
    }

    body.single-stellenangebot #tm-main li {
        margin: 0 0 3pt !important;
        padding: 0 !important;
        break-inside: avoid-page;
        page-break-inside: avoid;
    }

    body.single-stellenangebot #tm-main .uk-list {
        padding-left: 0 !important;
        list-style: none !important;
    }

    body.single-stellenangebot #tm-main .uk-list > li {
        border: 0 !important;
        margin-bottom: 5pt !important;
    }

    body.single-stellenangebot #tm-main img {
        display: block !important;
        width: auto !important;
        height: auto !important;
        max-width: 30mm !important;
        max-height: 18mm !important;
        margin: 6pt 0 !important;
        filter: brightness(0);
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.single-stellenangebot #tm-main a {
        color: black !important;
        text-decoration: underline !important;
        overflow-wrap: anywhere;
    }

    body.single-stellenangebot #tm-main a.uk-button {
        display: block !important;
        width: auto !important;
        min-height: 0 !important;
        margin: 0 0 6pt !important;
        padding: 0 !important;
        border: 0 !important;
        font-size: 11pt !important;
        line-height: 1.35 !important;
        text-align: left !important;
        text-transform: none !important;
        white-space: normal !important;
        break-inside: avoid;
    }

    body.single-stellenangebot #tm-main a[data-asta-print-url]::after {
        content: attr(data-asta-print-url);
        display: block;
        font-size: 9pt;
        font-weight: normal;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    /* Without JS, at least the original application URL remains on paper. */
    body.single-stellenangebot #tm-main a.uk-button[href]:not([data-asta-print-url])::after {
        content: attr(href);
        display: block;
        font-size: 9pt;
        overflow-wrap: anywhere;
    }
}
