/**
 * Print Stylesheet for Fahrzeuge (Vehicle Detail Pages)
 *
 * Optimized for professional, printer-friendly output
 * - Clean black & white layout
 * - Optimized page breaks
 * - Essential information only
 * - Professional formatting
 *
 * @package GeneratePress Child
 * @version 2.0.6
 */

/* ============================================
   PAGE SETUP
   ============================================ */

@page {
    margin: 1.5cm 2cm;
    size: A4 portrait;
}

@page :first {
    margin-top: 1cm;
}

/* ============================================
   GLOBAL PRINT RESETS
   ============================================ */

@media print {

    /* Remove all backgrounds for ink savings */
    * {
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Black text on white background */
    body {
        font-family: Georgia, 'Times New Roman', serif !important;
        font-size: 12pt;
        line-height: 1.6;
        color: #000 !important;
        background: #fff !important;
    }

    /* ============================================
       HIDE NON-ESSENTIAL ELEMENTS
       ============================================ */

    /* WordPress & Theme Elements */
    .site-header,
    .site-footer,
    .main-navigation,
    .nav-above,
    .nav-below,
    .sidebar,
    .widget,
    .comment-form,
    .comments-area,
    #wpadminbar,
    .generate-back-to-top,

    /* Hide logos and branding in print */
    .site-logo,
    .site-branding,
    img[src*="logo"],
    .custom-logo-link,
    .site-title,
    .site-description,

    /* Fahrzeug-specific UI Elements */
    .fahrzeug-navigation,
    .price-box-utility,         /* Hide print & share buttons */
    .utility-btn,
    .fahrzeug-related-section,  /* Hide related vehicles */
    .rzf-lightbox,             /* Hide lightbox */
    .price-box-trust,          /* Hide trust badges */

    /* Interactive Elements */
    button:not(.no-print),
    .btn-phone,                /* Hide call button */
    .btn-email,                /* Hide email button */
    .price-box-actions,        /* Hide all action buttons */

    /* Share functionality */
    #rzf-share-btn,
    .share-buttons {
        display: none !important;
    }

    /* ============================================
       LAYOUT & STRUCTURE
       ============================================ */

    /* Full width for print */
    .fahrzeug-single-wrapper,
    .fahrzeug-single-content,
    .fahrzeug-single-main {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
        display: block !important;
    }

    /* Remove sticky sidebar behavior */
    .fahrzeug-single-sidebar,
    .fahrzeug-price-box {
        position: static !important;
        top: auto !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        page-break-inside: avoid;
    }

    /* Move sidebar to top of page for print */
    .fahrzeug-single-wrapper {
        display: flex !important;
        flex-direction: column-reverse !important;
    }

    .fahrzeug-single-sidebar {
        order: -1 !important;
    }

    /* ============================================
       HEADER & TITLE
       ============================================ */

    .fahrzeug-single-header {
        margin-bottom: 0.2cm;
        padding-bottom: 0.2cm;
        border-bottom: 1pt solid #000;
        page-break-after: avoid;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .fahrzeug-single-title {
        font-size: 16pt;
        font-weight: bold;
        margin: 0;
        color: #000 !important;
        line-height: 1.1;
        flex: 1 1 60%;
    }

    .fahrzeug-reference {
        font-size: 8pt;
        margin: 0.05cm 0 0 0;
        color: #333 !important;
        width: 100%;
        order: 3;
    }

    /* Move price into header */
    .fahrzeug-single-header .fahrzeug-single-preis {
        flex: 0 0 auto;
        text-align: right;
        margin: 0;
    }

    .fahrzeug-reference strong {
        font-weight: bold;
    }

    /* ============================================
       PRICE BOX
       ============================================ */

    .fahrzeug-price-box {
        background: transparent !important;
        padding: 0.2cm 0 !important;
        margin: 0.2cm 0 0.3cm 0 !important;
        border: none !important;
    }

    .fahrzeug-single-preis,
    .price-display {
        font-size: 14pt;
        font-weight: bold;
        color: #000 !important;
        margin: 0;
        line-height: 1.1;
        display: inline-block;
    }

    .fahrzeug-preis-note,
    .price-note {
        font-size: 8pt;
        color: #666 !important;
        font-weight: normal;
        display: inline-block;
        margin-left: 0.2cm;
    }

    /* ============================================
       IMAGES
       ============================================ */

    /* Main vehicle image */
    .fahrzeug-featured-image,
    .fahrzeug-main-image {
        width: 100%;
        margin: 0.2cm 0 0.3cm 0;
        page-break-inside: avoid;
        page-break-after: avoid;
    }

    .fahrzeug-featured-image img,
    .fahrzeug-main-image img {
        width: 100% !important;
        height: auto !important;
        max-height: 8cm;
        object-fit: contain;
        border: 1pt solid #ccc;
    }

    /* Gallery grid - limit to 6 images, 2x3 grid */
    .fahrzeug-gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.25cm;
        margin: 0.3cm 0 0.5cm 0;
        page-break-inside: avoid;
    }

    .fahrzeug-gallery-item {
        page-break-inside: avoid;
    }

    .fahrzeug-gallery-item img {
        width: 100% !important;
        height: auto !important;
        max-height: 4cm;
        object-fit: cover;
        border: 1pt solid #ccc;
    }

    /* Hide gallery beyond 6 images to save ink */
    .fahrzeug-gallery-item:nth-child(n+7) {
        display: none !important;
    }

    /* ============================================
       QUICK FACTS / ECKDATEN
       ============================================ */

    .fahrzeug-quick-facts {
        margin: 0.2cm 0;
        page-break-inside: avoid;
    }

    .fahrzeug-quick-facts h2 {
        font-size: 11pt;
        font-weight: bold;
        margin: 0.2cm 0 0.15cm 0;
        padding-bottom: 0.1cm;
        border-bottom: 1pt solid #000;
        color: #000 !important;
        page-break-after: avoid;
        line-height: 1.1;
    }

    .fahrzeug-technical-details h2,
    .fahrzeug-beschreibung h2,
    .fahrzeug-equipment-section h2,
    .fahrzeug-consumption-section h2 {
        font-size: 12pt;
        font-weight: bold;
        margin: 0.3cm 0 0.15cm 0;
        padding-bottom: 0.1cm;
        border-bottom: 1pt solid #000;
        color: #000 !important;
        page-break-after: avoid;
        line-height: 1.1;
    }

    .fahrzeug-facts-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.15cm 0.3cm;
        margin: 0.15cm 0;
    }

    .fahrzeug-fact {
        display: flex;
        flex-direction: column;
        padding: 0.1cm;
        border-bottom: 1pt solid #ddd;
    }

    /* Hide emoji icons, use text only */
    .fact-icon {
        display: none !important;
    }

    .fact-label {
        font-size: 7pt;
        color: #666 !important;
        text-transform: uppercase;
        letter-spacing: 0.01em;
        margin-bottom: 0.05cm;
    }

    .fact-value {
        font-size: 9pt;
        font-weight: bold;
        color: #000 !important;
        line-height: 1.2;
    }

    /* ============================================
       STATUS BADGES
       ============================================ */

    .fahrzeug-status-badges {
        margin: 0.3cm 0;
        display: flex;
        flex-wrap: wrap;
        gap: 0.15cm;
    }

    .status-badge {
        display: inline-block;
        padding: 0.08cm 0.25cm;
        border: 1pt solid #000;
        font-size: 8pt;
        font-weight: bold;
        color: #000 !important;
    }

    .status-badge svg {
        display: none; /* Hide icons */
    }

    /* ============================================
       TECHNICAL DETAILS TABLE
       ============================================ */

    .fahrzeug-technical-details {
        margin: 0.5cm 0;
        page-break-inside: avoid;
    }

    .fahrzeug-details-table {
        width: 100%;
        border-collapse: collapse;
        margin: 0.25cm 0;
    }

    .fahrzeug-details-table tr {
        page-break-inside: avoid;
    }

    .fahrzeug-details-table td {
        padding: 0.15cm 0.25cm;
        border-bottom: 1pt solid #ddd;
        font-size: 9pt;
        line-height: 1.3;
    }

    .detail-label,
    .fahrzeug-details-table td:first-child {
        font-weight: normal;
        color: #666 !important;
        width: 40%;
    }

    .detail-value,
    .fahrzeug-details-table td:last-child {
        font-weight: bold;
        color: #000 !important;
    }

    /* ============================================
       DESCRIPTION / BESCHREIBUNG
       ============================================ */

    .fahrzeug-beschreibung {
        margin: 0.5cm 0;
    }

    .fahrzeug-content-text,
    .fahrzeug-beschreibung .fahrzeug-content-text {
        font-size: 10pt;
        line-height: 1.5;
        color: #000 !important;
    }

    .fahrzeug-content-text p {
        margin: 0.2cm 0;
        text-align: justify;
    }

    /* ============================================
       EQUIPMENT / AUSSTATTUNG
       ============================================ */

    .fahrzeug-equipment-section {
        margin: 0.5cm 0;
        page-break-inside: auto;
    }

    .equipment-groups {
        display: block;
    }

    .equipment-group {
        margin: 0.3cm 0;
        page-break-inside: avoid;
    }

    .equipment-group-title {
        font-size: 11pt;
        font-weight: bold;
        margin: 0.25cm 0 0.15cm 0;
        padding-left: 0.2cm;
        border-left: 3pt solid #000;
        color: #000 !important;
        line-height: 1.2;
    }

    .equipment-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.1cm 0.3cm;
        margin: 0.2cm 0;
    }

    .equipment-feature {
        font-size: 8pt;
        color: #000 !important;
        padding: 0.08cm 0.15cm;
        border-left: 2pt solid #ccc;
        line-height: 1.3;
    }

    /* ============================================
       CONSUMPTION / VERBRAUCH
       ============================================ */

    .fahrzeug-consumption-section {
        margin: 0.5cm 0;
        page-break-inside: avoid;
    }

    .consumption-table {
        width: 100%;
        border-collapse: collapse;
        margin: 0.25cm 0;
    }

    .consumption-table tr {
        page-break-inside: avoid;
    }

    .consumption-table td {
        padding: 0.15cm 0.25cm;
        border-bottom: 1pt solid #ddd;
        font-size: 9pt;
        line-height: 1.3;
    }

    .consumption-table td:first-child {
        color: #666 !important;
        width: 50%;
    }

    .consumption-table td:last-child {
        font-weight: bold;
        color: #000 !important;
        text-align: right;
    }

    .consumption-note {
        font-size: 7pt;
        color: #666 !important;
        margin-top: 0.2cm;
        line-height: 1.3;
        font-style: italic;
    }

    /* ============================================
       DISCLAIMER
       ============================================ */

    .fahrzeug-disclaimer {
        margin: 0.5cm 0 0 0;
        padding: 0.25cm 0.3cm;
        border: 1pt solid #ccc;
        background: #f9f9f9 !important;
        page-break-inside: avoid;
    }

    .fahrzeug-disclaimer p {
        font-size: 7pt;
        line-height: 1.4;
        color: #666 !important;
        margin: 0;
        text-align: justify;
    }

    /* ============================================
       CONTACT INFORMATION (Add to print)
       ============================================ */

    /* Show contact info in print */
    .print-only-contact {
        display: block !important;
        margin: 0.5cm 0 0.3cm 0;
        padding: 0.35cm 0.4cm;
        border: 2pt solid #000;
        background: #f5f5f5 !important;
        page-break-inside: avoid;
    }

    .print-only-contact h3 {
        font-size: 12pt;
        font-weight: bold;
        margin: 0 0 0.2cm 0;
        color: #000 !important;
        line-height: 1.2;
    }

    .print-only-contact p {
        font-size: 9pt;
        margin: 0.1cm 0;
        color: #000 !important;
        line-height: 1.4;
    }

    .print-only-contact strong {
        font-weight: bold;
    }

    /* ============================================
       LINKS
       ============================================ */

    /* Show URLs after links (optional) */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 8pt;
        color: #666 !important;
        font-style: italic;
    }

    /* Don't show URLs for anchors, tel, mailto */
    a[href^="#"]:after,
    a[href^="tel:"]:after,
    a[href^="mailto:"]:after {
        content: "";
    }

    /* ============================================
       PAGE BREAKS
       ============================================ */

    /* Prevent page breaks inside these elements */
    .fahrzeug-quick-facts,
    .fahrzeug-fact,
    .fahrzeug-status-badges,
    .equipment-group,
    .consumption-table,
    .fahrzeug-disclaimer,
    .print-only-contact,
    img,
    table,
    tr,
    blockquote {
        page-break-inside: avoid;
    }

    /* Avoid page breaks after headings */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    /* ============================================
       UTILITY CLASSES
       ============================================ */

    .screen-only {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    /* ============================================
       FOOTER WITH PAGE URL
       ============================================ */

    /* Add footer with URL and print date */
    @page {
        @bottom-right {
            content: "Seite " counter(page) " von " counter(pages);
            font-size: 8pt;
            color: #666;
        }
    }

    /* ============================================
       OPTIMIZE FOR BLACK & WHITE PRINTING
       ============================================ */

    /* Convert all colors to grayscale-friendly */
    .badge-new,
    .badge-highlight,
    .btn {
        border: 1pt solid #000 !important;
        color: #000 !important;
    }

} /* End @media print */
