/**
 * Print Styles for TM Catalog
 * 
 * Clean print layout for property pages
 * 
 * @package tm-catalog
 * @author Templines
 * @link https://templines.com
 */

@media print {
    /* Hide unnecessary elements */
    header,
    footer,
    nav,
    .site-header,
    .site-footer,
    .elementor-location-header,
    .elementor-location-footer,
    .property-post-actions,
    .print-item,
    .wishlist-item,
    .tm-post-action-report-abuse,
    .share-item,
    .elementor-widget-sidebar,
    .comments-area,
    .related-posts,
    button,
    .btn,
    .button,
    input[type="submit"],
    .tm-report-abuse-modal,
    .tmreviews-share-favorites-wrap,
    .tmreviews-share-favorites-btn,
    .tmreviews-copy-message,
    iframe,
    video,
    audio,.property-comments-wrap ,
    .main-screen-header,
    .single-property-item-aside,
    .tm-agent-card ,
    .amenities-icon-wrapper,
    .property-item-detail-wrap{
        display: none !important;
    }

    /* Page setup */
    @page {
        margin: 2cm;
        size: A4;
    }

    body {
        font-family: 'Georgia', 'Times New Roman', serif;
        font-size: 12pt;
        line-height: 1.6;
        color: #000;
        background: #fff;
        margin: 0;
        padding: 0;
    }

    /* Container */
    .container,
    .elementor-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Property Title */
    .entry-title,
    .property-title,
    h1 {
        font-size: 24pt;
        font-weight: bold;
        color: #000;
        margin-bottom: 10pt;
        page-break-after: avoid;
    }

    /* Property Meta */
    .property-meta,
    .property-info {
        font-size: 11pt;
        color: #333;
        margin-bottom: 15pt;
        border-bottom: 1pt solid #ddd;
        padding-bottom: 10pt;
    }

    /* Property Price */
    .property-price,
    .price {
        font-size: 18pt;
        font-weight: bold;
        color: #000;
        margin: 10pt 0;
    }

    /* Property Description */
    .property-description,
    .entry-content,
    .property-content {
        font-size: 11pt;
        line-height: 1.8;
        color: #000;
        margin-bottom: 15pt;
    }

    /* Headings */
    h2 {
        font-size: 16pt;
        font-weight: bold;
        color: #000;
        margin-top: 15pt;
        margin-bottom: 8pt;
        page-break-after: avoid;
    }

    h3 {
        font-size: 14pt;
        font-weight: bold;
        color: #000;
        margin-top: 12pt;
        margin-bottom: 6pt;
        page-break-after: avoid;
    }

    h4, h5, h6 {
        font-size: 12pt;
        font-weight: bold;
        color: #000;
        margin-top: 10pt;
        margin-bottom: 5pt;
        page-break-after: avoid;
    }

    /* Paragraphs */
    p {
        margin-bottom: 8pt;
        orphans: 3;
        widows: 3;
    }

    /* Lists */
    ul, ol {
        margin-left: 20pt;
        margin-bottom: 10pt;
    }

    li {
        margin-bottom: 4pt;
    }

    /* Property Features/Amenities */
    .property-features,
    .property-amenities,
    .amenities-list {
        margin-bottom: 15pt;
    }

    .property-features ul,
    .property-amenities ul,
    .amenities-list ul {
        list-style: disc;
        margin-left: 20pt;
    }

    .property-features li,
    .property-amenities li,
    .amenities-list li {
        font-size: 11pt;
        line-height: 1.6;
        margin-bottom: 4pt;
    }

    /* Property Specifications */
    .property-specifications,
    .property-details,
    .specifications-list {
        margin-bottom: 15pt;
    }

    .specification-item,
    .detail-item {
        display: block;
        margin-bottom: 6pt;
        font-size: 11pt;
    }

    .specification-label,
    .detail-label {
        font-weight: bold;
        display: inline-block;
        min-width: 120pt;
    }

    .specification-value,
    .detail-value {
        display: inline;
    }

    /* Images */
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
        margin: 10pt 0;
    }

    .property-image,
    .featured-image,
    .wp-post-image {
        max-width: 100%;
        height: auto;
        margin-bottom: 15pt;
    }

    /* Gallery */
    .property-gallery,
    .gallery {
        display: none; /* Hide gallery in print, keep only featured image */
    }

    /* Tables */
    table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 15pt;
        page-break-inside: avoid;
    }

    th, td {
        padding: 6pt;
        border: 1pt solid #ddd;
        text-align: left;
        font-size: 10pt;
    }

    th {
        background-color: #f5f5f5;
        font-weight: bold;
    }

    /* Links */
    a {
        color: #000;
        text-decoration: none;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }

    /* Don't show URLs for internal links */
    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    /* Property Address */
    .property-address,
    .address {
        font-size: 11pt;
        color: #333;
        margin-bottom: 10pt;
    }

    /* Property Contact */
    .property-contact,
    .contact-info {
        margin-top: 20pt;
        padding-top: 15pt;
        border-top: 1pt solid #ddd;
        font-size: 11pt;
    }

    /* Agent Info */
    .agent-info,
    .property-agent {
        margin-top: 20pt;
        padding: 10pt;
        border: 1pt solid #ddd;
        page-break-inside: avoid;
    }

    .agent-name {
        font-size: 12pt;
        font-weight: bold;
        margin-bottom: 5pt;
    }

    .agent-phone,
    .agent-email {
        font-size: 10pt;
        margin-bottom: 3pt;
    }

    /* Badges */
    .badge,
    .item-badge,
    .featured-badge,
    .custom-badge {
        display: inline-block;
        padding: 2pt 6pt;
        border: 1pt solid #000;
        font-size: 9pt;
        font-weight: bold;
        margin-right: 5pt;
    }

    /* Map placeholder */
    .property-map,
    .map-container,
    #map {
        display: none;
    }

    /* Add "Printed from" footer */
    body:after {
        content: "Printed from " attr(data-site-url);
        display: block;
        margin-top: 30pt;
        padding-top: 15pt;
        border-top: 1pt solid #ddd;
        font-size: 9pt;
        color: #666;
        text-align: center;
    }

    /* Page breaks */
    .page-break {
        page-break-before: always;
    }

    /* Avoid breaking inside these elements */
    .property-item,
    .property-card,
    .specification-item,
    .amenity-item,
    blockquote,
    pre {
        page-break-inside: avoid;
    }

    /* Elementor specific */
    .elementor-section {
        margin-bottom: 15pt;
    }

    .elementor-widget {
        margin-bottom: 10pt;
    }

    .elementor-column {
        width: 100% !important;
        float: none !important;
    }

    /* Remove shadows and backgrounds */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
        background-image: none !important;
    }

    /* Keep only essential backgrounds */
    .highlight,
    .featured {
        background-color: #f5f5f5 !important;
    }
}
