/* p1875_print.css — стили печати для раздела poisk1875 */

#p1875-copy-toast {
    display: none;
    position: fixed;
    background: #fff;
    color: #1a2330;
    border: 1px solid #d0d4dc;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 300;
    z-index: 99999;
    pointer-events: none;
    white-space: nowrap;
}

@media print {
    /* Скрываем всё лишнее */
    header, footer, nav,
    .sticky-menu, .mmenu-bar, .zai-lcol,
    .p1875-searchbar,
    [id*="search"], [class*="search"],
    .p1875-breadcrumbs + span,  /* кнопки копировать/печать/pdf/консультация */
    button, input,
    #p1875-copy-toast,
    /* Навигация «предыдущая / следующая позиция» */
    [style*="display:flex;gap:10px;flex-wrap:wrap"] { display: none !important; }

    details, details > * { display: block !important; }

    body {
        font-size: 10px;
        color: #000;
        background: #fff;
        margin: 0;
        padding: 0;
    }

    a, a:visited { color: #000 !important; text-decoration: none !important; }
    a::after     { content: '' !important; }

    /* Основная колонка на всю ширину */
    main, .p1875-main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 6px !important;
        float: none !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    [style*="max-width:1240px"],
    [style*="max-width: 1240px"] {
        max-width: 100% !important;
        padding: 0 !important;
    }

    [style*="overflow"] { overflow: visible !important; }
    [style*="min-width"] { min-width: 0 !important; }

    /* Карточка позиции — убираем цветной фон */
    .p1875-pos-card {
        border: 1px solid #ccc !important;
        background: #fff !important;
        page-break-inside: avoid !important;
    }
    .p1875-pos-left {
        background: #f5f5f5 !important;
    }

    /* Таблицы */
    table {
        border-collapse: collapse !important;
        width: 100% !important;
        table-layout: auto !important;
        page-break-inside: auto !important;
    }
    thead { display: table-header-group !important; }
    tr    { page-break-inside: avoid !important; break-inside: avoid !important; }
    th, td {
        border: 1px solid #bbb !important;
        padding: 2px 4px !important;
        font-size: 8px !important;
        vertical-align: top !important;
        word-break: break-word !important;
        white-space: normal !important;
    }

    /* Цветные фоны строк таблицы перечней — оставляем лёгкими */
    [style*="background:rgba(220,53,69"] { background: #fdf2f2 !important; }
    [style*="background:rgba(13,110,253"] { background: #f0f5ff !important; }
    [style*="background:rgba(39,174,96"] { background: #f0fbf4 !important; }

    h1, h2, h3 { page-break-after: avoid !important; }

    /* Блок ссылок на ОКПД2 */
    [style*="background:#f5f6fa"] { border: 1px solid #ccc !important; background: #fff !important; }

    @page { size: A4; margin: 8mm; }
}
