/**
 * Print Styles for PropertyCMS
 * Clean, professional layout for printing property pages
 */

@media print {

    /* Hide non-essential elements */
    #mainnav,
    #footer,
    .navbar,
    .nav,
    .share-buttons,
    .filter-actions-bar,
    .quick-filters,
    .view-toggle,
    .copy-link-btn,
    .btn-contact,
    form,
    .sticky-top,
    .carousel-control-prev,
    .carousel-control-next,
    .toast-notification,
    #property-map-container,
    .similar-properties-section,
    .social-share-card {
        display: none !important;
    }

    /* Reset page margins */
    @page {
        margin: 0.75in;
        size: letter portrait;
    }

    /* Ensure clean backgrounds */
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt;
        line-height: 1.5;
    }

    /* Container full width for print */
    .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }

    /* Property Hero - Show first image as header */
    .position-relative[style*="height: 60vh"] {
        height: auto !important;
        max-height: none !important;
        page-break-after: avoid;
    }

    .carousel-item {
        display: block !important;
        position: relative !important;
    }

    .carousel-item:not(:first-child) {
        display: none !important;
    }

    .carousel-item .w-100 {
        height: 300px !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    /* Property Title */
    h1 {
        font-size: 24pt !important;
        margin-bottom: 0.5rem !important;
        page-break-after: avoid;
    }

    /* Key Specs - Inline for print */
    .row.g-3.mb-5.p-4.bg-light {
        background: #f5f5f5 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        padding: 1rem !important;
        margin-bottom: 1rem !important;
        page-break-inside: avoid;
    }

    .display-6 {
        font-size: 18pt !important;
    }

    /* Description */
    .prose {
        font-size: 11pt;
        line-height: 1.6;
    }

    /* Amenities */
    .bi-check-circle-fill {
        color: #000 !important;
    }

    /* Price sidebar - Move inline */
    .col-lg-4 .card {
        position: relative !important;
        top: 0 !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }

    /* Hide contact form in sidebar */
    .col-lg-4 form {
        display: none !important;
    }

    /* Keep price visible */
    .text-primary.fw-bold {
        color: #000 !important;
        font-size: 18pt !important;
    }

    /* Map section */
    #property-map {
        display: none !important;
    }

    .mb-5:has(#property-map) {
        display: none !important;
    }

    /* Links - Show URL for print */
    a[href]:after {
        content: none;
        /* Don't clutter with URLs */
    }

    /* Ensure breaks work correctly */
    h2,
    h3 {
        page-break-after: avoid;
    }

    .card {
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    /* Print header with property info */
    .print-header {
        display: block !important;
        border-bottom: 2px solid #000;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
    }

    /* Similar properties - hide for cleaner print */
    .py-5.bg-light:has(.similar-properties) {
        display: none !important;
    }

    /* Image gallery - Show only first few */
    .carousel-inner .carousel-item:nth-child(n+4) {
        display: none !important;
    }

    /* Ensure text is black */
    p,
    span,
    div {
        color: #000 !important;
    }

    /* Badges - ensure visibility */
    .badge {
        border: 1px solid #000 !important;
        background: #fff !important;
        color: #000 !important;
    }
}