/* notfallkoffer-print.css
   Nur print-spezifische Ergänzungen. Basis-Layout (.print-wrap, .p-section,
   .p-head, .p-row, .p-table usw.) kommt aus notfallkoffer.css, damit die
   Übersichtsseite denselben Card-Look wie der Rest des Wizards hat.
*/

.p-edit {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 6px;
    padding: 3px 10px;
    text-decoration: none;
    background: transparent;
}

    .p-edit:hover {
        background: rgba(255,255,255,.15);
    }

.print-lastsaved {
    font-size: 12px;
    color: var(--hf-dark, #3D4F51);
    opacity: 0.7;
    margin-top: -6px;
    margin-bottom: 10px;
}

/* Springt-nach-oben-Button (nur Bildschirm) */
.btn-scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--hf-dark, #3D4F51);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(45,59,61,.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 120;
}

    .btn-scroll-top.is-visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .btn-scroll-top:hover {
        background: var(--hf-green, #89BA17);
    }

.print-empty {
    padding: 24px;
    text-align: center;
    border: 1px dashed var(--hf-border, #e0dccf);
    border-radius: 10px;
    background: #fff;
    display: grid;
    gap: 14px;
    justify-items: center;
}

.p-divider {
    height: 12px;
}

.p-subsection {
    border: 1px solid var(--hf-border, #e0dccf);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

.p-subhead {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--hf-dark, #3D4F51);
}

/* sichtbare "Eingabebox" – auch wenn leer */
.p-boxval {
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid var(--hf-border, #e0dccf);
    border-radius: 6px;
    background: #faf9f6;
    white-space: pre-wrap;
}

/* kleine Checkbox Darstellung */
.p-check {
    display: inline-block;
    margin-right: 16px;
    font-weight: 700;
}

/* Step8 Cards */
.p-card {
    margin-bottom: 10px;
}

.p-q {
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--hf-dark, #3D4F51);
}

.p-ans {
    min-height: 44px;
}

.p-table {
    table-layout: fixed;
}

    .p-table th:nth-child(2),
    .p-table td:nth-child(2) {
        width: 38%;
        word-wrap: break-word;
    }

    .p-table th,
    .p-table td {
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }

    .p-table th:first-child,
    .p-table td:first-child {
        width: 45%;
    }

.p9-table {
    table-layout: fixed;
}

    .p9-table th,
    .p9-table td {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .p9-table th {
        white-space: normal;
    }

@page {
    size: A4;
    margin: 16mm 14mm 18mm 14mm;
}

@media print {
    .no-print,
    .p-edit,
    .print-lastsaved,
    .lp-sidebar,
    .sidebar-plus {
        display: none !important;
    }

    html, body {
        background: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color-adjust: exact;
    }

    .print-wrap {
        max-width: 100% !important;
        padding: 0 !important;
        background: #fff !important;
    }

    /* Seitenweiter dunkler Footer wäre im Ausdruck viel zu viel Tinte/unleserlich
       -> hell mit dunkler Schrift, Logo invertiert (ist eine weiße Grafik). */
    footer.lp-footer {
        background: #fff !important;
        color: #333 !important;
        margin-left: 0 !important;
        border-top: 1px solid #ddd;
    }

        footer.lp-footer h5 {
            color: #111 !important;
        }

        footer.lp-footer ul li a,
        footer.lp-footer .copyright {
            color: #333 !important;
        }

        footer.lp-footer .brand-hint a {
            color: #4a7a12 !important;
        }

        footer.lp-footer .footer-sep {
            border-top-color: #ccc;
        }

        /* Die weiße Logo-Grafik ist für dunklen Hintergrund gemacht; ein Filter
           würde auch das Grün verfälschen (z.B. zu Lila) -> im Druck ausblenden
           und stattdessen reinen Text zeigen, kein anderes/verändertes Logo. */
        footer.lp-footer .footer-logo {
            display: none !important;
        }

        footer.lp-footer .brand-hint::before {
            content: "HFMO Steuerberatung";
            display: block;
            font-weight: 700;
            font-size: 15px;
            color: #111;
            margin-bottom: 8px;
        }

    /* Rechtliches (Impressum/Datenschutz) im Ausdruck nicht relevant */
    .footer-grid > div:last-child {
        display: none !important;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr !important;
    }

    /* Seitenzahlen: wird von Chrome-Druck aktuell nicht unterstützt, aber
       schadet nicht als Fortschritt für Browser mit CSS-Paged-Media-Support
       (z.B. Firefox). Für Chrome: im Druckdialog "Kopf- und Fußzeilen"
       aktivieren, das fügt native Seitenzahlen hinzu. */
    @page {
        @bottom-right {
            content: counter(page) " / " counter(pages);
            font-size: 9px;
            color: #888;
        }
    }

    /* Im Druck: helle Kopfzeile statt dunkler Card-Optik (Tinte sparen) */
    .p-head {
        background: #f2f2f2 !important;
        color: #111 !important;
    }

    .p-section {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    /* Große Sections dürfen umbrechen, ihre Unterelemente nicht */
    .p-subsection,
    .p-card,
    .p-row,
    .p9-table tr,
    .p-table tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .p-head {
        page-break-after: avoid;
        break-after: avoid;
    }

    /* Tabellenkopf auf jeder Seite wiederholen */
    .p-table thead,
    .p9-table thead {
        display: table-header-group;
    }

    .p-table tfoot,
    .p9-table tfoot {
        display: table-footer-group;
    }

    .p-section {
        break-inside: auto;
    }
}
