/**
 * Print Styles for Travel Confirmation Document
 * This file is loaded separately to ensure print styles are applied
 */

@media print {
    /* ============================================
       GLOBAL PRINT SETTINGS
       ============================================ */
    
    @page {
        size: A4;
        margin: 8mm;
    }
    
    html, body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    /* ============================================
       PRINT DOCUMENT CONTAINER
       ============================================ */
    
    .print-document {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }
    
    .print-page {
        page-break-after: always !important;
        break-after: page !important;
        padding: 8mm !important;
        background: white !important;
    }
    
    .print-page:last-child {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }
    
    /* ============================================
       FORCE BACKGROUND COLORS
       ============================================ */
    
    /* All elements with inline background styles */
    [style*="background-color"],
    [style*="backgroundColor"],
    [style*="background:"] {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Gold backgrounds */
    [style*="rgba(201, 169, 78"] {
        background-color: rgba(201, 169, 78, 0.1) !important;
    }
    
    [style*="rgb(201, 169, 78)"] {
        background-color: rgb(201, 169, 78) !important;
    }
    
    [style*="#C9A94E"] {
        background-color: #C9A94E !important;
    }
    
    [style*="#A08840"] {
        background-color: #A08840 !important;
    }
    
    /* Gray backgrounds */
    [style*="#f9fafb"] {
        background-color: #f9fafb !important;
    }
    
    [style*="#f3f4f6"] {
        background-color: #f3f4f6 !important;
    }
    
    /* Blue backgrounds (seat badges) */
    [style*="#dbeafe"] {
        background-color: #dbeafe !important;
    }
    
    /* Green backgrounds (payment status) */
    [style*="#f0fdf4"] {
        background-color: #f0fdf4 !important;
    }
    
    [style*="#dcfce7"] {
        background-color: #dcfce7 !important;
    }
    
    /* ============================================
       FORCE TEXT COLORS
       ============================================ */
    
    [style*="color: rgb(201, 169, 78)"],
    [style*="color:#C9A94E"],
    [style*="color: #C9A94E"] {
        color: #C9A94E !important;
    }
    
    [style*="color: rgb(38, 50, 56)"],
    [style*="color:#263238"],
    [style*="color: #263238"] {
        color: #263238 !important;
    }
    
    [style*="color: rgb(107, 114, 128)"],
    [style*="color:#6b7280"],
    [style*="color: #6b7280"] {
        color: #6b7280 !important;
    }
    
    [style*="color: rgb(75, 85, 99)"],
    [style*="color:#4b5563"],
    [style*="color: #4b5563"] {
        color: #4b5563 !important;
    }
    
    [style*="color: white"],
    [style*="color: rgb(255, 255, 255)"] {
        color: white !important;
    }
    
    /* Blue text (seat badges) */
    [style*="color: rgb(29, 78, 216)"],
    [style*="color:#1d4ed8"],
    [style*="color: #1d4ed8"] {
        color: #1d4ed8 !important;
    }
    
    /* Green text */
    [style*="color: rgb(21, 128, 61)"],
    [style*="color:#15803d"],
    [style*="color: #15803d"] {
        color: #15803d !important;
    }
    
    /* ============================================
       BORDERS
       ============================================ */
    
    [style*="border-color: rgb(201, 169, 78)"],
    [style*="border-color:#C9A94E"],
    [style*="border: 2px solid #C9A94E"],
    [style*="border-bottom: 2px solid #C9A94E"] {
        border-color: #C9A94E !important;
    }
    
    [style*="border-color: rgb(229, 231, 235)"],
    [style*="border-color:#e5e7eb"],
    [style*="border: 1px solid #e5e7eb"] {
        border-color: #e5e7eb !important;
    }
    
    /* ============================================
       TABLES
       ============================================ */
    
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: avoid !important;
    }
    
    tr {
        page-break-inside: avoid !important;
    }
    
    thead {
        display: table-header-group !important;
    }
    
    /* ============================================
       IMAGES
       ============================================ */
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid !important;
    }
    
    /* Logo */
    img[alt*="Scherrer"],
    img[src*="logo"] {
        height: 40px !important;
        max-height: 40px !important;
    }
    
    /* Hotel images */
    .print-document img[alt]:not([alt*="Scherrer"]):not([src*="logo"]) {
        max-height: 150px !important;
        object-fit: cover !important;
    }
    
    /* ============================================
       LAYOUT PRESERVATION
       ============================================ */
    
    .grid {
        display: grid !important;
    }
    
    .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    
    .flex {
        display: flex !important;
    }
    
    .items-center {
        align-items: center !important;
    }
    
    .justify-between {
        justify-content: space-between !important;
    }
    
    /* ============================================
       HIDE NON-PRINT ELEMENTS
       ============================================ */
    
    .print\:hidden,
    [data-testid="print-pdf-button"],
    button {
        display: none !important;
    }
    
    /* ============================================
       ROUNDED CORNERS
       ============================================ */
    
    .rounded-lg {
        border-radius: 0.5rem !important;
    }
    
    .rounded-xl {
        border-radius: 0.75rem !important;
    }
    
    .rounded-full {
        border-radius: 9999px !important;
    }
    
    /* ============================================
       SHADOWS - Remove for cleaner print
       ============================================ */
    
    [class*="shadow"] {
        box-shadow: none !important;
    }
}
