/* =========================
   PRINT VERSION
   ========================= */

@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    html,
    body {
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }

    /*
     * Adjust these selectors if the header/footer in layout.html
     * use different class names.
     */
    header,
    footer,
    .site-header,
    .site-footer,
    .main-header,
    .main-footer,
    nav,
    #loadercontainer,
    .property-back-link,
    .property-actions,
    .property-favorite-btn,
    .property-toggle-btn,
    .auth-popup,
    .property-share-popup,
    .modal,
    .leaflet-control-container {
        display: none !important;
    }

    .property-page,
    .property-detail {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    .property-section-card,
    .property-identity-card,
    .property-price-card,
    .property-subcard,
    .property-district-card {
        box-shadow: none !important;
        border: 1px solid #dddddd !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .property-description-short {
        display: none !important;
    }

    .property-description-full {
        display: block !important;
        max-height: none !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .property-media-grid {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /*
     * Keep the primary image and a few gallery images.
     */
    .property-media-main,
    .property-media-thumb {
        display: block !important;
    }

    .property-media-main img,
    .property-media-thumb img,
    .property-district-card img,
    .classe-energie img {
        max-width: 100% !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    /*
     * Interactive Leaflet maps usually print poorly.
     * Hide only the map while keeping the location text.
     */
    .property-map-card {
        display: none !important;
    }

    a {
        color: inherit !important;
        text-decoration: none !important;
    }

    h1,
    h2,
    h3 {
        break-after: avoid;
        page-break-after: avoid;
    }

    p,
    li {
        orphans: 3;
        widows: 3;
    }
}