/* ========================================
   СТИЛИ ДЛЯ ПЕЧАТИ И ЭКСПОРТА В PDF
   ======================================== */

/* Основные настройки страницы */
@page {
    size: A4;
    margin: 15mm;
}

/* Базовые настройки для печати */
@media print {
    /* Скрываем все элементы кроме контента КП */
    body * { 
        visibility: hidden; 
    }
    
    #kpContent, #kpContent * { 
        visibility: visible; 
    }
    
    #kpContent { 
        position: absolute; 
        left: 0; 
        top: 0; 
        width: 100%; 
        height: auto;
    }
    
    /* Скрываем элементы, которые не должны печататься */
    .no-print, 
    .tab-button, 
    .tab-content:not(.active),
    button:not(.print-button),
    input,
    select,
    .discount-input,
    .project-buttons {
        display: none !important;
    }
    
    /* Убираем только тени, но сохраняем остальные стили */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Сохраняем оригинальные цвета и размеры */
    body {
        background: white !important;
    }
    
    /* Сохраняем оригинальные размеры шрифтов */
    .luxury-heading {
        font-size: inherit !important;
        font-weight: inherit !important;
        color: inherit !important;
    }
    
    .luxury-subheading {
        font-size: inherit !important;
        font-weight: inherit !important;
        color: inherit !important;
    }
    
    .luxury-accent {
        font-size: inherit !important;
        font-weight: inherit !important;
        color: inherit !important;
    }
    
    .luxury-text {
        font-size: inherit !important;
        color: inherit !important;
    }
    
    .luxury-price {
        font-size: inherit !important;
        font-weight: inherit !important;
        color: inherit !important;
    }
    
    .luxury-price-large {
        font-size: inherit !important;
        font-weight: inherit !important;
        color: inherit !important;
    }
    
    /* Сохраняем оригинальные отступы и размеры */
    .luxury-card-premium {
        margin-bottom: inherit !important;
        padding: inherit !important;
        border: inherit !important;
        break-inside: avoid;
    }
    
    .luxury-bg-light {
        background: inherit !important;
        padding: inherit !important;
    }
    
    /* Контроль разрывов страниц */
    .page-break-before {
        page-break-before: always;
    }
    
    .page-break-after {
        page-break-after: always;
    }
    
    .avoid-break {
        break-inside: avoid;
    }
    
    /* Изображения - сохраняем оригинальные размеры */
    .standard-item-image-container {
        width: inherit !important;
        height: inherit !important;
        margin-bottom: inherit !important;
    }
    
    .standard-item-image {
        width: inherit !important;
        height: inherit !important;
        object-fit: inherit !important;
        border: inherit !important;
    }
    
    .standard-item-image-placeholder {
        width: inherit !important;
        height: inherit !important;
        background: inherit !important;
        border: inherit !important;
        display: inherit !important;
        align-items: inherit !important;
        justify-content: inherit !important;
    }
    
    /* Сохраняем оригинальные сетки и флексбоксы */
    .grid {
        display: inherit !important;
    }
    
    .grid-cols-2 {
        display: inherit !important;
    }
    
    .grid-cols-2 > * {
        width: inherit !important;
        display: inherit !important;
        vertical-align: inherit !important;
        margin-right: inherit !important;
    }
    
    .grid-cols-3 {
        display: inherit !important;
    }
    
    .grid-cols-3 > * {
        width: inherit !important;
        display: inherit !important;
        vertical-align: inherit !important;
        margin-right: inherit !important;
    }
    
    .flex {
        display: inherit !important;
    }
    
    .flex-1 {
        width: inherit !important;
    }
    
    /* Сохраняем оригинальные отступы */
    .space-y-2 > * + * {
        margin-top: inherit !important;
    }
    
    .space-y-3 > * + * {
        margin-top: inherit !important;
    }
    
    .space-y-4 > * + * {
        margin-top: inherit !important;
    }
    
    .space-y-6 > * + * {
        margin-top: inherit !important;
    }
    
    .space-y-8 > * + * {
        margin-top: inherit !important;
    }
    
    .space-y-12 > * + * {
        margin-top: inherit !important;
    }
    
    /* Сохраняем оригинальные маргины */
    .mb-4 { margin-bottom: inherit !important; }
    .mb-6 { margin-bottom: inherit !important; }
    .mb-8 { margin-bottom: inherit !important; }
    .mb-12 { margin-bottom: inherit !important; }
    
    .mt-4 { margin-top: inherit !important; }
    .mt-6 { margin-top: inherit !important; }
    .mt-8 { margin-top: inherit !important; }
    .mt-12 { margin-top: inherit !important; }
    
    /* Сохраняем оригинальные паддинги */
    .px-12 { padding-left: inherit !important; padding-right: inherit !important; }
    .py-8 { padding-top: inherit !important; padding-bottom: inherit !important; }
    .py-4 { padding-top: inherit !important; padding-bottom: inherit !important; }
    .p-4 { padding: inherit !important; }
    .p-6 { padding: inherit !important; }
    .p-8 { padding: inherit !important; }
    .p-12 { padding: inherit !important; }
    
    /* Сохраняем оригинальные границы */
    .border { border: inherit !important; }
    .border-t { border-top: inherit !important; }
    .border-b { border-bottom: inherit !important; }
    .border-gray-100 { border-color: inherit !important; }
    
    /* Сохраняем оригинальное выравнивание текста */
    .text-center { text-align: inherit !important; }
    .text-right { text-align: inherit !important; }
    .text-left { text-align: inherit !important; }
    
    /* Сохраняем оригинальные веса шрифтов */
    .font-bold { font-weight: inherit !important; }
    .font-semibold { font-weight: inherit !important; }
    .font-medium { font-weight: inherit !important; }
    
    /* Сохраняем оригинальные цвета текста */
    .text-gray-500 { color: inherit !important; }
    .text-gray-600 { color: inherit !important; }
    .text-gray-700 { color: inherit !important; }
    .text-gray-900 { color: inherit !important; }
    .text-green-600 { color: inherit !important; }
    .text-blue-600 { color: inherit !important; }
    .text-red-600 { color: inherit !important; }
    
    /* Сохраняем оригинальные размеры текста */
    .text-xs { font-size: inherit !important; }
    .text-sm { font-size: inherit !important; }
    .text-base { font-size: inherit !important; }
    .text-lg { font-size: inherit !important; }
    .text-xl { font-size: inherit !important; }
    .text-2xl { font-size: inherit !important; }
    .text-3xl { font-size: inherit !important; }
    .text-4xl { font-size: inherit !important; }
    .text-5xl { font-size: inherit !important; }
    
    /* Сохраняем оригинальные специальные элементы */
    .luxury-divider {
        height: inherit !important;
        background: inherit !important;
        margin: inherit !important;
    }
    
    .luxury-status {
        background: inherit !important;
        color: inherit !important;
        padding: inherit !important;
        border: inherit !important;
        font-size: inherit !important;
        font-weight: inherit !important;
    }
    
    /* Сохраняем оригинальный размер логотипа */
    img[alt="Any-Home"] {
        height: inherit !important;
        width: inherit !important;
    }
    
    /* Скрываем элементы управления */
    .discount-badge,
    .project-group .flex.gap-3,
    .project-item .project-buttons {
        display: none !important;
    }
    
    /* Оптимизация для длинного контента */
    .luxury-card-premium {
        page-break-inside: avoid;
    }
    
    /* Сохраняем оригинальные заголовки проектов */
    .project-group h3 {
        font-size: inherit !important;
        font-weight: inherit !important;
        margin-bottom: inherit !important;
        color: inherit !important;
    }
    
    /* Сохраняем оригинальные элементы проектов */
    .project-item {
        margin-bottom: inherit !important;
        padding: inherit !important;
        border: inherit !important;
        break-inside: avoid;
    }
    
    /* Сохраняем оригинальные итоговые блоки */
    .luxury-bg-light {
        background: inherit !important;
        border: inherit !important;
        margin-top: inherit !important;
    }
}
