/* ================================
   css_print.css - Druck Styles für baustoffanzeiger
   ================================ */

@page {
    /* Rand: oben rechts unten links */
    margin: 2cm 1.5cm 3cm 1.5cm;
}

/* ========== BASIS ========== */
body {
    font-size: 9pt !important;      /* pt ist Standard für Druck */
    line-height: 1.2 !important;
    color: #000 !important;         /* spart Tinte, schärfer */
    margin: 0;
    padding: 0;
}

/* Überschriften */
h1 { font-size: 12pt !important; }
h2 { font-size: 10pt !important; }
h3 { font-size: 10pt !important; }
h2, h3 {
    page-break-after: avoid;        /* nicht allein am Seitenende */
}

/* Links */
a {
    text-decoration: none;
    color: #000;
}

/* ========== LAYOUT / CONTAINER ========== */
.wi1200, .tabl, .anzeigen-container {
    width: 100% !important;
    margin: 0 !important;
    border: none !important;
    display: block !important;
    float: none !important;
    page-break-inside: auto !important; /* darf umbrechen */
}

/* Flex Container für Bildergalerien */
summary div[style*="display: flex"] {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

/* Einzelne Bild-Boxen */
.tabl.ueberalles {
    display: inline-block !important;
    width: auto !important;
    margin: 10px !important;
    vertical-align: top !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important; /* moderner */
}

/* ========== BILDER ========== */
img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
    max-height: 450px; /* verhindert riesige Bilder */
}

/* Thumbs in Listen */
.thumb-responsive {
    width: 150px !important;
    height: 150px !important;
    object-fit: cover !important;
    border: 1px solid #eee;
}

.thumb-text {
    font-size: 8pt !important;
    width: 150px !important;
    display: block !important;
}

/* Großes Anzeigenbild + QR */
.anzeigen-bild {
    float: left !important;
    max-width: 200px !important;
    height: auto !important;
    max-height: 200px !important;
    border: 1px solid #eee;
    margin: 0 20px 20px 0;
}

.qr-code {
    float: right !important;
    width: 101px !important;
    height: 101px !important;
    margin-left: 20px !important;
}

.print-row::after {
    content: "";
    display: table;
    clear: both;
}

/* ========== SLIDER FÜR DRUCK ========== */
/* Slider ausblenden, alle Bilder untereinander zeigen */
.michel-slider {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    border: none !important;
}
.slider-track {
    display: block !important;
    transform: none !important;
}
.slide {
    display: inline-block !important;
    width: auto !important;
    padding: 5px !important;
}
.slider-btn {
    display: none !important; /* Pfeile weg */
}

/* ========== AUS/EINBLENDEN ========== */
.no-print,
header,
footer,
nav,
button,
.michel-dropzone,
.kamera-overlay {
    display: none !important;
}

.only-print {
    display: block !important;
}

.druck-stop ~ * {
    display: none !important;
}

.print-break {
    page-break-before: always;
}

/* ========== FOOTER ========== */
.only-print-footer {
    display: block !important;
    position: fixed; /* fixiert am unteren Seitenrand */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2cm;
    border-top: 1px solid #ccc;
    font-size: 10px;
    background: white;
    padding: 5px 0;
}

.only-print-header {
    margin-bottom: 20px !important;
}

/* Verhindert dass Inhalte in den Footer laufen */
img, .tabl, .balk_anz {
    page-break-inside: avoid;
}